public class EvaluationStrategyImpl extends Object implements EvaluationStrategy
TupleExpr
on the given TripleSource
, optionally using the
given Dataset
.Modifier and Type | Field and Description |
---|---|
protected Dataset |
dataset |
protected FederatedServiceResolver |
serviceResolver |
protected TripleSource |
tripleSource |
Constructor and Description |
---|
EvaluationStrategyImpl(TripleSource tripleSource,
Dataset dataset,
FederatedServiceResolver serviceResolver) |
EvaluationStrategyImpl(TripleSource tripleSource,
Dataset dataset,
FederatedServiceResolver serviceResolver,
long iterationCacheSyncTreshold) |
EvaluationStrategyImpl(TripleSource tripleSource,
FederatedServiceResolver serviceResolver) |
protected final TripleSource tripleSource
protected final Dataset dataset
protected final FederatedServiceResolver serviceResolver
public EvaluationStrategyImpl(TripleSource tripleSource, FederatedServiceResolver serviceResolver)
public EvaluationStrategyImpl(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver)
public EvaluationStrategyImpl(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold)
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 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 sp, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
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 ValueExprEvaluationException, QueryEvaluationException
EvaluationStrategy
evaluate
in interface EvaluationStrategy
bindings
- The variables bindings to use for evaluating the expression, if
applicable.ValueExprEvaluationException
QueryEvaluationException
public Value evaluate(Var var, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(ValueConstant valueConstant, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(BNodeGenerator node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Bound node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(Str node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Label node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Lang node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Datatype node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Namespace node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(LocalName node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(IsResource node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
ValueExprEvaluationException
QueryEvaluationException
public Value evaluate(IsURI node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
ValueExprEvaluationException
QueryEvaluationException
public Value evaluate(IsBNode node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
ValueExprEvaluationException
QueryEvaluationException
public Value evaluate(IsLiteral node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
ValueExprEvaluationException
QueryEvaluationException
public Value evaluate(IsNumeric node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
ValueExprEvaluationException
QueryEvaluationException
public URI evaluate(IRIFunction node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
node
- represents an invocation of the SPARQL IRI functionbindings
- used to generate the value that the URI is based onValueExprEvaluationException
QueryEvaluationException
public Value evaluate(Regex node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
regex
operator.ValueExprEvaluationException
QueryEvaluationException
public Value evaluate(LangMatches node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Like node, BindingSet bindings) throws ValueExprEvaluationException, 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.ValueExprEvaluationException
QueryEvaluationException
public Value evaluate(FunctionCall node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(And node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Or node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Not node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Now node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(SameTerm node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Coalesce node, BindingSet bindings) throws ValueExprEvaluationException
ValueExprEvaluationException
public Value evaluate(Compare node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(MathExpr node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(If node, BindingSet bindings) throws QueryEvaluationException
QueryEvaluationException
public Value evaluate(In node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(ListMemberOperator node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(CompareAny node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(CompareAll node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException
public Value evaluate(Exists node, BindingSet bindings) throws ValueExprEvaluationException, 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)
Copyright © 2001–2016 Aduna. All rights reserved.