Class RepositoryTripleSource
java.lang.Object
org.eclipse.rdf4j.repository.evaluation.RepositoryTripleSource
- All Implemented Interfaces:
AvailableStatementOrder, TripleSource
-
Field Summary
Fields inherited from interface TripleSource
EMPTY_ITERATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDifferent underlying datastructures may have different ways of ordering statements.CloseableIteration<? extends Statement> getStatements(Resource subj, IRI pred, Value obj, Resource... contexts) Gets all statements that have a specific subject, predicate and/or object.Gets a ValueFactory object that can be used to create IRI-, blank node- and literal objects.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TripleSource
getStatementCount, getStatements, getSupportedOrdersModifier and TypeMethodDescriptiondefault longgetStatementCount(Resource subj, IRI pred, Value obj, Resource... contexts) Counts statements matching the supplied pattern without requiring callers to materialize converted bindings.default CloseableIteration<? extends Statement> getStatements(StatementOrder order, Resource subj, IRI pred, Value obj, Resource... contexts) Gets all statements that have a specific subject, predicate and/or object.default Set<StatementOrder> getSupportedOrders(Resource subj, IRI pred, Value obj, Resource... contexts) The underlying store may support some, but not all, statement orders based on the statement pattern.
-
Constructor Details
-
RepositoryTripleSource
-
RepositoryTripleSource
-
-
Method Details
-
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 IRI 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
Description copied from interface:TripleSourceGets a ValueFactory object that can be used to create IRI-, blank node- and literal objects.- Specified by:
getValueFactoryin interfaceTripleSource- Returns:
- a ValueFactory object for this TripleSource.
-
getComparator
Description copied from interface:TripleSourceDifferent underlying datastructures may have different ways of ordering statements. On-disk stores typically use a long to represent a value and only stores the actual value in a dictionary, in this case the order would be the order that values where inserted into the dictionary. Stores that instead store values in SPARQL-order can return an instance ofValueComparatorwhich may allow for further optimizations.Note that this method is experimental and may be changed or removed without notice.
- Specified by:
getComparatorin interfaceTripleSource- Returns:
- a comparator that matches the order of values in the store
-