use of org.apache.jena.sparql.core.Quad in project jena by apache.
the class TestFactoryRDF method factoryRDF_quad_01.
@Test
public void factoryRDF_quad_01() {
Node g = factory.createURI("http://test/g");
Node s = factory.createURI("http://test/s");
Node p = factory.createURI("http://test/p");
Node o = factory.createURI("http://test/o");
Quad quad = factory.createQuad(g, s, p, o);
assertEquals(g, quad.getGraph());
assertEquals(s, quad.getSubject());
assertEquals(p, quad.getPredicate());
assertEquals(o, quad.getObject());
}
use of org.apache.jena.sparql.core.Quad in project jena by apache.
the class TestSerializable method serialize_quad_01.
@Test
public void serialize_quad_01() throws Exception {
Quad q = SSE.parseQuad("(:g :s :p :o)");
Quad q1 = roundTrip(q);
assertEquals(q, q1);
}
use of org.apache.jena.sparql.core.Quad in project jena by apache.
the class TestSerializable method serialize_quad_02.
@Test
public void serialize_quad_02() throws Exception {
Quad q = SSE.parseQuad("(_ :s :p :o)");
Quad q1 = roundTrip(q);
assertEquals(q, q1);
assertNotEquals(q.getSubject(), q1.getObject());
}
use of org.apache.jena.sparql.core.Quad in project jena by apache.
the class TestSerializable method serialize_quad_03.
@Test
public void serialize_quad_03() throws Exception {
Quad q = SSE.parseQuad("(<_:abc> ?y ?x <_:abc>)");
Quad q1 = roundTrip(q);
assertEquals(q, q1);
assertEquals(q.getGraph(), q1.getObject());
}
use of org.apache.jena.sparql.core.Quad in project jena by apache.
the class spatialindexer method exec.
@Override
protected void exec() {
// Set<Node> properties = getIndexedProperties() ;
spatialIndex.startIndexing();
Iterator<Quad> quadIter = dataset.find(Node.ANY, Node.ANY, Node.ANY, Node.ANY);
for (; quadIter.hasNext(); ) {
Quad quad = quadIter.next();
context.index(quad.getGraph(), quad.getSubject(), quad.getPredicate(), quad.getObject());
progressMonitor.progressByOne();
}
spatialIndex.finishIndexing();
progressMonitor.close();
}
Aggregations