Class SailTripleSource
java.lang.Object
org.eclipse.rdf4j.federated.evaluation.TripleSourceBase
org.eclipse.rdf4j.federated.evaluation.SailTripleSource
- All Implemented Interfaces:
TripleSource
A triple source to be used on any repository.
- Author:
- Andreas Schwarte
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.rdf4j.federated.evaluation.TripleSourceBase
TripleSourceBase.ConnectionOperation<T>, TripleSourceBase.ResultHolder<T>
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.federated.evaluation.TripleSourceBase
endpoint, federationContext, monitoringService
-
Method Summary
Modifier and TypeMethodDescriptionReturn the statements matching the given pattern as aStatement
iteration.getStatements
(StatementPattern stmt, BindingSet bindings, FilterValueExpr filterExpr, QueryInfo queryInfo) Evaluate the query expression on the provided endpoint.getStatements
(TupleExpr preparedQuery, BindingSet bindings, FilterValueExpr filterExpr, QueryInfo queryInfo) Evaluate the prepared query in its internal representation on the provided endpoint.boolean
hasStatements
(StatementPattern stmt, BindingSet bindings, QueryInfo queryInfo, Dataset dataset) Check if the provided statement can return results.boolean
usePreparedQuery
(StatementPattern stmt, QueryInfo queryInfo) Methods inherited from class org.eclipse.rdf4j.federated.evaluation.TripleSourceBase
applyMaxExecutionTimeUpperBound, configureInference, getStatements, getStatements, hasStatements, hasStatements, monitorRemoteRequest, withConnection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.federated.evaluation.TripleSource
getStatements, getStatements, getStatements, hasStatements, hasStatements, usePreparedQuery
-
Method Details
-
getStatements
public CloseableIteration<BindingSet,QueryEvaluationException> getStatements(StatementPattern stmt, BindingSet bindings, FilterValueExpr filterExpr, QueryInfo queryInfo) throws RepositoryException, MalformedQueryException, QueryEvaluationException Description copied from interface:TripleSource
Evaluate the query expression on the provided endpoint.- Specified by:
getStatements
in interfaceTripleSource
- Parameters:
stmt
- the stmt expression to evaluatebindings
- the bindings to usefilterExpr
- the filter expression to apply or null if there is no filter or if it is evaluated already- Returns:
- the resulting iteration
- Throws:
RepositoryException
MalformedQueryException
QueryEvaluationException
-
getStatements
public CloseableIteration<Statement,QueryEvaluationException> getStatements(Resource subj, IRI pred, Value obj, QueryInfo queryInfo, Resource... contexts) throws RepositoryException, MalformedQueryException, QueryEvaluationException Description copied from interface:TripleSource
Return the statements matching the given pattern as aStatement
iteration.- Specified by:
getStatements
in interfaceTripleSource
- Returns:
- the resulting iteration
- Throws:
RepositoryException
MalformedQueryException
QueryEvaluationException
-
hasStatements
public boolean hasStatements(StatementPattern stmt, BindingSet bindings, QueryInfo queryInfo, Dataset dataset) throws RepositoryException, MalformedQueryException, QueryEvaluationException Description copied from interface:TripleSource
Check if the provided statement can return results.- Specified by:
hasStatements
in interfaceTripleSource
bindings
- a binding set. in case no bindings are present, anEmptyBindingSet
can be used (i.e. never null)- Returns:
- whether the source can return results
- Throws:
RepositoryException
MalformedQueryException
QueryEvaluationException
-
usePreparedQuery
- Specified by:
usePreparedQuery
in interfaceTripleSource
- Returns:
- true if a prepared query is to be used preferably, false otherwise
-
getStatements
public CloseableIteration<BindingSet,QueryEvaluationException> getStatements(TupleExpr preparedQuery, BindingSet bindings, FilterValueExpr filterExpr, QueryInfo queryInfo) throws RepositoryException, MalformedQueryException, QueryEvaluationException Description copied from interface:TripleSource
Evaluate the prepared query in its internal representation on the provided endpoint.- Specified by:
getStatements
in interfaceTripleSource
- Parameters:
preparedQuery
- a prepared query to evaluatebindings
- the bindings to usefilterExpr
- the filter expression to apply or null if there is no filter or if it is evaluated already- Returns:
- the resulting iteration
- Throws:
RepositoryException
MalformedQueryException
QueryEvaluationException
-