Package org.eclipse.rdf4j.sail.base
Class SailDatasetTripleSource
- java.lang.Object
-
- org.eclipse.rdf4j.sail.base.SailDatasetTripleSource
-
- All Implemented Interfaces:
RDFStarTripleSource,TripleSource
@InternalUseOnly public class SailDatasetTripleSource extends Object implements RDFStarTripleSource
Implementation of the TripleSource interface usingSailDataset
-
-
Field Summary
-
Fields inherited from interface org.eclipse.rdf4j.query.algebra.evaluation.TripleSource
EMPTY_ITERATION, EMPTY_TRIPLE_ITERATION
-
-
Constructor Summary
Constructors Constructor Description SailDatasetTripleSource(ValueFactory vf, SailDataset dataset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseableIteration<? extends Triple>getRdfStarTriples(Resource subj, IRI pred, Value obj)Gets all Triple nodes that have a specific subject, predicate and/or object.CloseableIteration<? extends Statement>getStatements(Resource subj, IRI pred, Value obj, Resource... contexts)Gets all statements that have a specific subject, predicate and/or object.ValueFactorygetValueFactory()Gets a ValueFactory object that can be used to create URI-, blank node- and literal objects.StringtoString()
-
-
-
Constructor Detail
-
SailDatasetTripleSource
public SailDatasetTripleSource(ValueFactory vf, SailDataset dataset)
-
-
Method Detail
-
getStatements
public CloseableIteration<? extends Statement> getStatements(Resource subj, IRI pred, Value obj, Resource... contexts) throws QueryEvaluationException
Description copied from interface:TripleSourceGets all statements that have a specific subject, predicate and/or object. All three parameters may be null to indicate wildcards. Optionally a (set of) context(s) may be specified in which case the result will be restricted to statements matching one or more of the specified contexts.- Specified by:
getStatementsin interfaceTripleSource- Parameters:
subj- A Resource specifying the subject, or null for a wildcard.pred- A URI specifying the predicate, or null for a wildcard.obj- A Value specifying the object, or null for a wildcard.contexts- The context(s) to get the statements from. Note that this parameter is a vararg and as such is optional. If no contexts are supplied the method operates on the entire repository.- Returns:
- An iterator over the relevant statements.
- Throws:
QueryEvaluationException- If the triple source failed to get the statements.
-
getValueFactory
public ValueFactory getValueFactory()
Description copied from interface:TripleSourceGets a ValueFactory object that can be used to create URI-, blank node- and literal objects.- Specified by:
getValueFactoryin interfaceTripleSource- Returns:
- a ValueFactory object for this TripleSource.
-
getRdfStarTriples
public CloseableIteration<? extends Triple> getRdfStarTriples(Resource subj, IRI pred, Value obj) throws QueryEvaluationException
Description copied from interface:RDFStarTripleSourceGets all Triple nodes that have a specific subject, predicate and/or object. All three parameters may be null to indicate wildcards.- Specified by:
getRdfStarTriplesin interfaceRDFStarTripleSource- Parameters:
subj- A Resource specifying the triple's subject, or null for a wildcard.pred- A URI specifying the triple's predicate, or null for a wildcard.obj- A Value specifying the triple's object, or null for a wildcard.- Returns:
- An iterator over the relevant triples.
- Throws:
QueryEvaluationException- If the rdf star triple source failed to get the statements.
-
-