Search in sources :

Example 36 with Node

use of org.apache.jena.graph.Node in project jena by apache.

the class RdfTypesTest method tuple_writable_01.

/**
     * Basic tuple writable round tripping test
     * 
     * @throws IOException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     */
@Test
public void tuple_writable_01() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
    Tuple<Node> t = tuple(NodeFactory.createURI("http://one"), NodeFactory.createURI("http://two"), NodeFactory.createLiteral("value"), NodeFactory.createLiteral("foo"), NodeFactory.createURI("http://three"));
    NodeTupleWritable tw = new NodeTupleWritable(t);
    testWriteRead(tw, tw);
}
Also used : Node(org.apache.jena.graph.Node) NodeTupleWritable(org.apache.jena.hadoop.rdf.types.NodeTupleWritable) Test(org.junit.Test)

Example 37 with Node

use of org.apache.jena.graph.Node 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 38 with Node

use of org.apache.jena.graph.Node 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 39 with Node

use of org.apache.jena.graph.Node 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 40 with Node

use of org.apache.jena.graph.Node 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

Node (org.apache.jena.graph.Node)1250 Test (org.junit.Test)440 Triple (org.apache.jena.graph.Triple)201 Var (org.apache.jena.sparql.core.Var)164 Graph (org.apache.jena.graph.Graph)121 ArrayList (java.util.ArrayList)104 Binding (org.apache.jena.sparql.engine.binding.Binding)80 Quad (org.apache.jena.sparql.core.Quad)73 GeometryWrapper (org.apache.jena.geosparql.implementation.GeometryWrapper)64 RDFNode (org.apache.jena.rdf.model.RDFNode)64 DatasetGraph (org.apache.jena.sparql.core.DatasetGraph)62 Literal (org.apache.jena.rdf.model.Literal)61 PropFuncArg (org.apache.jena.sparql.pfunction.PropFuncArg)56 SpatialArguments (org.apache.jena.geosparql.spatial.property_functions.SpatialArguments)51 SearchEnvelope (org.apache.jena.geosparql.spatial.SearchEnvelope)46 HashMap (java.util.HashMap)44 TriplePath (org.apache.jena.sparql.core.TriplePath)36 Model (org.apache.jena.rdf.model.Model)33 NodeValue (org.apache.jena.sparql.expr.NodeValue)31 WhereValidator (org.apache.jena.arq.querybuilder.WhereValidator)30