Search in sources :

Example 6 with NodeWritable

use of org.apache.jena.hadoop.rdf.types.NodeWritable in project jena by apache.

the class RdfTypesTest method node_writable_literal_03.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void node_writable_literal_03() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = NodeFactory.createLiteral("string", XSDDatatype.XSDstring);
    NodeWritable nw = new NodeWritable(n);
    testWriteRead(nw, nw);
}
Also used : NodeWritable(org.apache.jena.hadoop.rdf.types.NodeWritable) Node(org.apache.jena.graph.Node) Test(org.junit.Test)

Example 7 with NodeWritable

use of org.apache.jena.hadoop.rdf.types.NodeWritable in project jena by apache.

the class RdfTypesTest method node_writable_bnode_01.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void node_writable_bnode_01() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = NodeFactory.createBlankNode();
    NodeWritable nw = new NodeWritable(n);
    testWriteRead(nw, nw);
}
Also used : NodeWritable(org.apache.jena.hadoop.rdf.types.NodeWritable) Node(org.apache.jena.graph.Node) Test(org.junit.Test)

Example 8 with NodeWritable

use of org.apache.jena.hadoop.rdf.types.NodeWritable in project jena by apache.

the class RdfTypesTest method node_writable_uri_01.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void node_writable_uri_01() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = NodeFactory.createURI("http://example.org");
    NodeWritable nw = new NodeWritable(n);
    testWriteRead(nw, nw);
}
Also used : NodeWritable(org.apache.jena.hadoop.rdf.types.NodeWritable) Node(org.apache.jena.graph.Node) Test(org.junit.Test)

Example 9 with NodeWritable

use of org.apache.jena.hadoop.rdf.types.NodeWritable in project jena by apache.

the class RdfTypesTest method node_writable_literal_05.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void node_writable_literal_05() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = NodeFactory.createLiteral("123.4", XSDDatatype.XSDdecimal);
    NodeWritable nw = new NodeWritable(n);
    testWriteRead(nw, nw);
}
Also used : NodeWritable(org.apache.jena.hadoop.rdf.types.NodeWritable) Node(org.apache.jena.graph.Node) Test(org.junit.Test)

Example 10 with NodeWritable

use of org.apache.jena.hadoop.rdf.types.NodeWritable in project jena by apache.

the class RdfTypesTest method node_writable_null.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void node_writable_null() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = null;
    NodeWritable nw = new NodeWritable(n);
    testWriteRead(nw, nw);
}
Also used : NodeWritable(org.apache.jena.hadoop.rdf.types.NodeWritable) Node(org.apache.jena.graph.Node) Test(org.junit.Test)

Aggregations

NodeWritable (org.apache.jena.hadoop.rdf.types.NodeWritable)29 Test (org.junit.Test)19 Node (org.apache.jena.graph.Node)16 LongWritable (org.apache.hadoop.io.LongWritable)10 NullWritable (org.apache.hadoop.io.NullWritable)6 CharacteristicSetWritable (org.apache.jena.hadoop.rdf.types.CharacteristicSetWritable)5 Ignore (org.junit.Ignore)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 TreeMap (java.util.TreeMap)1 Tuple (org.apache.jena.atlas.lib.tuple.Tuple)1 Triple (org.apache.jena.graph.Triple)1 CharacteristicWritable (org.apache.jena.hadoop.rdf.types.CharacteristicWritable)1 NodeTupleWritable (org.apache.jena.hadoop.rdf.types.NodeTupleWritable)1 QuadWritable (org.apache.jena.hadoop.rdf.types.QuadWritable)1 TripleWritable (org.apache.jena.hadoop.rdf.types.TripleWritable)1 Quad (org.apache.jena.sparql.core.Quad)1