Search in sources :

Example 16 with NodeWritable

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

the class RdfTypesTest method node_writable_literal_02.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void node_writable_literal_02() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = NodeFactory.createLiteral("language", "en", 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)

Example 17 with NodeWritable

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

the class RdfTypesTest method node_writable_uri_02.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void node_writable_uri_02() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = NodeFactory.createURI("http://user:password@example.org/some/path?key=value#id");
    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 18 with NodeWritable

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

the class RdfTypesTest method node_writable_bnode_02.

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

Example 19 with NodeWritable

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

the class RdfTypesTest method node_writable_literal_01.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void node_writable_literal_01() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = NodeFactory.createLiteral("simple");
    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 20 with NodeWritable

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

the class RdfTypesTest method node_writable_variable_01.

/**
     * Basic node writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
@Ignore
public void node_writable_variable_01() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Node n = NodeFactory.createVariable("x");
    NodeWritable nw = new NodeWritable(n);
    testWriteRead(nw, nw);
}
Also used : NodeWritable(org.apache.jena.hadoop.rdf.types.NodeWritable) Node(org.apache.jena.graph.Node) Ignore(org.junit.Ignore) 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