public class StrictEvaluationStrategy extends Object implements EvaluationStrategy, FederatedServiceResolverClient, UUIDable
TupleExpr
on the given
TripleSource
, optionally using the given Dataset
.ExtendedEvaluationStrategy
Modifier and Type | Field and Description |
---|---|
protected Dataset |
dataset |
protected FederatedServiceResolver |
serviceResolver |
protected TripleSource |
tripleSource |
Constructor and Description |
---|
StrictEvaluationStrategy(TripleSource tripleSource,
Dataset dataset,
FederatedServiceResolver serviceResolver) |
StrictEvaluationStrategy(TripleSource tripleSource,
Dataset dataset,
FederatedServiceResolver serviceResolver,
long iterationCacheSyncTreshold,
EvaluationStatistics evaluationStatistics) |
StrictEvaluationStrategy(TripleSource tripleSource,
Dataset dataset,
FederatedServiceResolver serviceResolver,
long iterationCacheSyncTreshold,
EvaluationStatistics evaluationStatistics,
boolean trackResultSize) |
StrictEvaluationStrategy(TripleSource tripleSource,
FederatedServiceResolver serviceResolver) |
protected final TripleSource tripleSource
protected final Dataset dataset
protected FederatedServiceResolver serviceResolver
public StrictEvaluationStrategy(TripleSource tripleSource, FederatedServiceResolver serviceResolver)
public StrictEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver)
public StrictEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold, EvaluationStatistics evaluationStatistics)
public StrictEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold, EvaluationStatistics evaluationStatistics, boolean trackResultSize)
public UUID getUUID()
UUIDable
public void setFederatedServiceResolver(FederatedServiceResolver resolver)
FederatedServiceResolverClient
FederatedServiceResolver
to use for this client.setFederatedServiceResolver
in interface FederatedServiceResolverClient
resolver
- The resolver to use.public FederatedService getService(String serviceUrl) throws QueryEvaluationException
EvaluationStrategy
FederatedService
registered for serviceUrl. If there is no service registered for
serviceUrl, a new SPARQLFederatedService
is created and registered.getService
in interface EvaluationStrategy
getService
in interface FederatedServiceResolver
serviceUrl
- URL of the service.FederatedService
registered for the serviceUrl.QueryEvaluationException
- If there was an exception generated while retrieving the service.FederatedServiceResolver.getService(java.lang.String)
public void setOptimizerPipeline(QueryOptimizerPipeline pipeline)
EvaluationStrategy
QueryOptimizerPipeline
to use for optimizing any incoming queries.setOptimizerPipeline
in interface EvaluationStrategy
pipeline
- the QueryOptimizerPipeline
.EvaluationStrategy.optimize(TupleExpr, EvaluationStatistics, BindingSet)
public TupleExpr optimize(TupleExpr expr, EvaluationStatistics evaluationStatistics, BindingSet bindings)
QueryOptimizerPipeline
on the given TupleExpr
to optimize its execution plan.optimize
in interface EvaluationStrategy
expr
- the TupleExpr
to optimize.evaluationStatistics
- this param is ignored!bindings
- a-priori bindings supplied for the query, which can potentially be inlined.TupleExpr
.setOptimizerPipeline(QueryOptimizerPipeline)
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(TupleExpr expr, BindingSet bindings) throws QueryEvaluationException
EvaluationStrategy
evaluate
in interface EvaluationStrategy
expr
- The Tuple Expression to evaluatebindings
- The variables bindings to use for evaluating the expression, if applicable.QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(ArbitraryLengthPath alp, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(ZeroLengthPath zlp, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
protected ZeroLengthPathIteration getZeroLengthPathIterator(BindingSet bindings, Var subjectVar, Var objVar, Var contextVar, Value subj, Value obj)
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Service service, String serviceUri, CloseableIteration<BindingSet,QueryEvaluationException> bindings) throws QueryEvaluationException
EvaluationStrategy
evaluate
in interface EvaluationStrategy
service
- The Service Expression to evaluateserviceUri
- TODObindings
- The variables bindings iterator to use for evaluating the expression, if applicable.QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Service service, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(DescribeOperator operator, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(StatementPattern statementPattern, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
protected boolean isUnbound(Var var, BindingSet bindings)
protected Value getVarValue(Var var, BindingSet bindings)
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(UnaryTupleOperator expr, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(BindingSetAssignment bsa, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Projection projection, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(MultiProjection multiProjection, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Filter filter, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Slice slice, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Extension extension, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Distinct distinct, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Reduced reduced, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Group node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Order node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(BinaryTupleOperator expr, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Join join, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(LeftJoin leftJoin, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Union union, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Intersection intersection, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Difference difference, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(SingletonSet singletonSet, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(EmptySet emptySet, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(ExternalSet external, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(ValueExpr expr, BindingSet bindings) throws QueryEvaluationException
EvaluationStrategy
evaluate
in interface EvaluationStrategy
bindings
- The variables bindings to use for evaluating the expression, if applicable.QueryEvaluationException
public Value evaluate(Var var, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(ValueConstant valueConstant, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(BNodeGenerator node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Bound node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Str node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Label node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Lang node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Datatype node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Namespace node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(LocalName node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(IsResource node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(IsURI node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(IsBNode node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(IsLiteral node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(IsNumeric node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public IRI evaluate(IRIFunction node, BindingSet bindings) throws QueryEvaluationException
node
- represents an invocation of the SPARQL IRI functionbindings
- used to generate the value that the URI is based onQueryEvaluationException
public Value evaluate(Regex node, BindingSet bindings) throws QueryEvaluationException
regex
operator.QueryEvaluationException
public Value evaluate(LangMatches node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Like node, BindingSet bindings) throws QueryEvaluationException
like
operator. The operator is defined as
a string comparison with the possible use of an asterisk (*) at the end and/or the start of the second operand to
indicate substring matching.QueryEvaluationException
public Value evaluate(FunctionCall node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(And node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Or node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Not node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Now node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(SameTerm node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Coalesce node, BindingSet bindings) throws ValueExprEvaluationException
ValueExprEvaluationException
public Value evaluate(Compare node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(MathExpr node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(If node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(In node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(ListMemberOperator node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(CompareAny node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(CompareAll node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Exists node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public boolean isTrue(ValueExpr expr, BindingSet bindings) throws QueryEvaluationException
EvaluationStrategy
isTrue
in interface EvaluationStrategy
bindings
- The variables bindings to use for evaluating the expression, if applicable.ValueExprEvaluationException
- If the value expression could not be evaluated, for example when comparing
two incompatible operands. When thrown, the result of the boolean expression
is neither true nor false , but unknown.QueryEvaluationException
protected boolean isReducedOrDistinct(QueryModelNode node)
protected long getLimit(QueryModelNode node)
public Value evaluate(ValueExprTripleRef node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public CloseableIteration<BindingSet,QueryEvaluationException> evaluate(TripleRef ref, BindingSet bindings)
ref
- to evaluatebindings
- with the solutionspublic void setTrackResultSize(boolean trackResultSize)
EvaluationStrategy
setTrackResultSize
in interface EvaluationStrategy
trackResultSize
- true to enable tracking.public void setTrackTime(boolean trackTime)
EvaluationStrategy
setTrackTime
in interface EvaluationStrategy
trackTime
- true to enable tracking.Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.