@Test public void FindStatements() { ID sub = new UID(TEST.NS, UUID.randomUUID().toString()); assertTrue(IteratorAdapter.asList(connection.findStatements(sub, null, null, null, false)).isEmpty()); repository.execute(new Addition(new STMT(sub, RDF.type, RDFS.Class))); assertFalse(findStatements(sub, null, null, null).isEmpty()); assertFalse(findStatements(sub, RDF.type, null, null).isEmpty()); assertFalse(findStatements(null, RDF.type, RDFS.Class, null).isEmpty()); }
@Override public CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred) { Iterator<Quad> triples = graph.find(convert(context), convert(subject), convert(predicate), convert(object)); if (triples.hasNext()) { return new QuadsIterator(dialect, triples); } else { return EMPTY_RESULTS; } }
JenaConnection implements RDFConnection { @Override public CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred) { Iterator<Quad> triples = graph.find(convert(context), convert(subject), convert(predicate), convert(object)); if (triples.hasNext()) { return new QuadsIterator(dialect, triples); } else { return EMPTY_RESULTS; } } }
JenaConnection implements RDFConnection { @Override public CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred) { Iterator<Quad> triples = graph.find(convert(context), convert(subject), convert(predicate), convert(object)); if (triples.hasNext()) { return new QuadsIterator(dialect, triples); } else { return EMPTY_RESULTS; } } JenaConnection(DatasetGraph graph, Dataset dataset, JenaDialect dialect); }
JenaConnection implements RDFConnection { @Override public CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred) { Iterator<Quad> triples = graph.find(convert(context), convert(subject), convert(predicate), convert(object)); if (triples.hasNext()) { return new QuadsIterator(dialect, triples); } else { return EMPTY_RESULTS; } } JenaConnection(DatasetGraph graph, Dataset dataset, JenaDialect dialect); @Override RDFBeanTransaction beginTransaction(boolean readOnly, int txTimeout, int isolationLevel); @Override void clear(); @Override void close(); @Override BID createBNode(); @SuppressWarnings("unchecked") @Override Q createUpdate(UpdateLanguage<D, Q> updateLanguage, D definition); @SuppressWarnings("unchecked") @Override Q createQuery(QueryLanguage<D, Q> queryLanguage, D definition); @Override boolean exists(ID subject, UID predicate, NODE object, UID context, boolean includeInferred); @Override CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred); @Override long getNextLocalId(); @Override void remove(ID subject, UID predicate, NODE object, UID context); @Override void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements); @Override QueryOptions getQueryOptions(); @Override InferenceOptions getInferenceOptions(); }
JenaConnection implements RDFConnection { @Override public CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred) { Iterator<Quad> triples = graph.find(convert(context), convert(subject), convert(predicate), convert(object)); if (triples.hasNext()) { return new QuadsIterator(dialect, triples); } else { return EMPTY_RESULTS; } } JenaConnection(DatasetGraph graph, Dataset dataset, JenaDialect dialect); @Override RDFBeanTransaction beginTransaction(boolean readOnly, int txTimeout, int isolationLevel); @Override void clear(); @Override void close(); @Override BID createBNode(); @SuppressWarnings("unchecked") @Override Q createUpdate(UpdateLanguage<D, Q> updateLanguage, D definition); @SuppressWarnings("unchecked") @Override Q createQuery(QueryLanguage<D, Q> queryLanguage, D definition); @Override boolean exists(ID subject, UID predicate, NODE object, UID context, boolean includeInferred); @Override CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred); @Override long getNextLocalId(); @Override void remove(ID subject, UID predicate, NODE object, UID context); @Override void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements); @Override QueryOptions getQueryOptions(); @Override InferenceOptions getInferenceOptions();  }