Class SPARQLCrossProductIteration
- java.lang.Object
-
- org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E>
-
- org.eclipse.rdf4j.common.iteration.LookAheadIteration<org.eclipse.rdf4j.query.BindingSet>
-
- org.eclipse.rdf4j.repository.sparql.federation.SPARQLCrossProductIteration
-
- All Implemented Interfaces:
AutoCloseable,Iterator<org.eclipse.rdf4j.query.BindingSet>,org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet>
public class SPARQLCrossProductIteration extends org.eclipse.rdf4j.common.iteration.LookAheadIteration<org.eclipse.rdf4j.query.BindingSet>Iteration which forms the cross product of a list of materialized input bindings with each result obtained from the inner iteration. Example:inputBindings := {b1, b2, ...} resultIteration := {r1, r2, ...} getNextElement() returns (r1,b1), (r1, b2), ..., (r2, b1), (r2, b2), ... i.e. compute the cross product per result binding Note that this class is a fully equivalent copy oforg.eclipse.rdf4j.query.algebra.evaluation.iterator.CrossProductIteration, and is only included here to avoid a circular dependency between the algebra-evaluation module and the sparql-repository module.- Author:
- Andreas Schwarte
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.rdf4j.query.BindingSetcurrentInputBindingprotected List<org.eclipse.rdf4j.query.BindingSet>inputBindingsprotected Iterator<org.eclipse.rdf4j.query.BindingSet>inputBindingsIteratorprotected org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet>resultIteration
-
Constructor Summary
Constructors Constructor Description SPARQLCrossProductIteration(org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet> resultIteration, List<org.eclipse.rdf4j.query.BindingSet> inputBindings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.rdf4j.query.BindingSetgetNextElement()protected voidhandleClose()-
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 java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
inputBindings
protected final List<org.eclipse.rdf4j.query.BindingSet> inputBindings
-
resultIteration
protected final org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet> resultIteration
-
inputBindingsIterator
protected Iterator<org.eclipse.rdf4j.query.BindingSet> inputBindingsIterator
-
currentInputBinding
protected org.eclipse.rdf4j.query.BindingSet currentInputBinding
-
-
Constructor Detail
-
SPARQLCrossProductIteration
public SPARQLCrossProductIteration(org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet> resultIteration, List<org.eclipse.rdf4j.query.BindingSet> inputBindings)
-
-
Method Detail
-
getNextElement
protected org.eclipse.rdf4j.query.BindingSet getNextElement() throws org.eclipse.rdf4j.query.QueryEvaluationException- Specified by:
getNextElementin classorg.eclipse.rdf4j.common.iteration.LookAheadIteration<org.eclipse.rdf4j.query.BindingSet>- Throws:
org.eclipse.rdf4j.query.QueryEvaluationException
-
handleClose
protected void handleClose() throws org.eclipse.rdf4j.query.QueryEvaluationException- Specified by:
handleClosein classorg.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<org.eclipse.rdf4j.query.BindingSet>- Throws:
org.eclipse.rdf4j.query.QueryEvaluationException
-
-