Class PathIteration
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<BindingSet, QueryEvaluationException>
org.eclipse.rdf4j.common.iteration.LookAheadIteration<BindingSet, QueryEvaluationException>
org.eclipse.rdf4j.query.algebra.evaluation.iterator.PathIteration
- All Implemented Interfaces:
AutoCloseable, CloseableIteration<BindingSet, QueryEvaluationException>, Iteration<BindingSet, QueryEvaluationException>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BindingSetprivate final Varprivate longprivate PathIteration.ValuePairprivate final Varprivate final booleanprivate static final Stringprivate final TupleExprprivate final Set<PathIteration.ValuePair> private final StatementPattern.Scopeprivate final Varprivate final booleanprivate final EvaluationStrategyprivate final Set<PathIteration.ValuePair> private final Queue<PathIteration.ValuePair> -
Constructor Summary
ConstructorsConstructorDescriptionPathIteration(EvaluationStrategy strategy, StatementPattern.Scope scope, Var startVar, TupleExpr pathExpression, Var endVar, Var contextVar, long minLength, BindingSet bindings) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanadd(Set<PathIteration.ValuePair> valueSet, PathIteration.ValuePair vp) private voidaddBinding(MutableBindingSet bs, String name, Value value) protected booleanaddToQueue(Queue<PathIteration.ValuePair> valueQueue2, PathIteration.ValuePair vp) createAnonVar(String varName) private VarcreateAnonVar(String varName, Value v, boolean anonymous) private voidprotected BindingSetGets the next element.private ValuegetVarValue(Var var, boolean fixedValue, BindingSet bindingSet) protected voidCalled byAbstractCloseableIteration.close()when it is called for the first time.private booleanprotected booleanisUnbound(Var var, BindingSet bindings) private BindingSetremoveIntermediateJoinVars(QueryBindingSet nextElement) private PathIteration.ValuePairvaluePairFromStartAndEnd(MutableBindingSet nextElement) Methods inherited from class LookAheadIteration
hasNext, next, removeMethods inherited from class AbstractCloseableIteration
close, isClosedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseableIteration
stream
-
Field Details
-
strategy
-
currentLength
private long currentLength -
currentIter
-
bindings
-
scope
-
startVar
-
endVar
-
startVarFixed
private final boolean startVarFixed -
endVarFixed
private final boolean endVarFixed -
valueQueue
-
reportedValues
-
unreportedValues
-
pathExpression
-
contextVar
-
currentVp
-
JOINVAR_PREFIX
- See Also:
-
namedIntermediateJoins
-
-
Constructor Details
-
PathIteration
public PathIteration(EvaluationStrategy strategy, StatementPattern.Scope scope, Var startVar, TupleExpr pathExpression, Var endVar, Var contextVar, long minLength, BindingSet bindings) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
-
Method Details
-
getNextElement
Description copied from class:LookAheadIterationGets the next element. Subclasses should implement this method so that it returns the next element.- Specified by:
getNextElementin classLookAheadIteration<BindingSet, QueryEvaluationException>- Returns:
- The next element, or null if no more elements are available.
- Throws:
QueryEvaluationException
-
removeIntermediateJoinVars
-
valuePairFromStartAndEnd
-
addBinding
-
handleClose
Description copied from class:AbstractCloseableIterationCalled byAbstractCloseableIteration.close()when it is called for the first time. This method is only called once on each iteration. By default, this method does nothing.- Overrides:
handleClosein classLookAheadIteration<BindingSet, QueryEvaluationException>- Throws:
QueryEvaluationException
-
addToQueue
protected boolean addToQueue(Queue<PathIteration.ValuePair> valueQueue2, PathIteration.ValuePair vp) throws QueryEvaluationException - Parameters:
valueQueue2-vp-- Throws:
QueryEvaluationException
-
add
protected boolean add(Set<PathIteration.ValuePair> valueSet, PathIteration.ValuePair vp) throws QueryEvaluationException - Parameters:
valueSet-vp-- Throws:
QueryEvaluationException
-
getVarValue
-
isCyclicPath
-
createIteration
- Throws:
QueryEvaluationException
-
isUnbound
-
createAnonVar
-
createAnonVar
-