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 BindingSet
private final Var
private long
private PathIteration.ValuePair
private final Var
private final boolean
private static final String
private final TupleExpr
private final Set
<PathIteration.ValuePair> private final StatementPattern.Scope
private final Var
private final boolean
private final EvaluationStrategy
private 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 boolean
add
(Set<PathIteration.ValuePair> valueSet, PathIteration.ValuePair vp) private void
addBinding
(MutableBindingSet bs, String name, Value value) protected boolean
addToQueue
(Queue<PathIteration.ValuePair> valueQueue2, PathIteration.ValuePair vp) createAnonVar
(String varName) private Var
createAnonVar
(String varName, Value v, boolean anonymous) private void
protected BindingSet
Gets the next element.private Value
getVarValue
(Var var, boolean fixedValue, BindingSet bindingSet) protected void
Called byAbstractCloseableIteration.close()
when it is called for the first time.private boolean
protected boolean
isUnbound
(Var var, BindingSet bindings) private BindingSet
removeIntermediateJoinVars
(QueryBindingSet nextElement) private PathIteration.ValuePair
valuePairFromStartAndEnd
(MutableBindingSet nextElement) Methods inherited from class org.eclipse.rdf4j.common.iteration.LookAheadIteration
hasNext, next, remove
Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration
close, isClosed
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.common.iteration.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:LookAheadIteration
Gets the next element. Subclasses should implement this method so that it returns the next element.- Specified by:
getNextElement
in 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:AbstractCloseableIteration
Called 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:
handleClose
in 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
-