Package com.complexible.common.rdf.query
Class IteratorAsTupleQueryResult
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<T>
-
- com.google.common.collect.AbstractIterator<T>
-
- com.complexible.common.rdf.query.IteratorAsTupleQueryResult
-
- All Implemented Interfaces:
CloseableIterator<BindingSet>
,QueryResult<BindingSet>
,SelectQueryResult
,java.lang.AutoCloseable
,java.util.Iterator<BindingSet>
public final class IteratorAsTupleQueryResult extends com.google.common.collect.AbstractIterator<T> implements SelectQueryResult
Adapter class for using a BindingSetIteration as a TupleQueryResult
- Since:
- 0.4
- Author:
- Michael Grove
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.complexible.common.base.CloseableIterator
CloseableIterator.AbstractCloseableIterator<T>, CloseableIterator.DelegatingCloseableIterator<T>, CloseableIterator.EmptyCloseableIterator<T>
-
-
Constructor Summary
Constructors Constructor Description IteratorAsTupleQueryResult(CloseableIterator<BindingSet> theIter, java.util.List<java.lang.String> theBindingNames)
IteratorAsTupleQueryResult(CloseableIterator<BindingSet> theIter, java.util.List<java.lang.String> theBindingNames, java.lang.Runnable theOnClose, java.lang.Runnable theOnSuccess, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> theOnError)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected T
computeNext()
java.util.List<java.lang.String>
variables()
Return the list of projected variables from the query-
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peek
-
-
-
-
Constructor Detail
-
IteratorAsTupleQueryResult
public IteratorAsTupleQueryResult(CloseableIterator<BindingSet> theIter, java.util.List<java.lang.String> theBindingNames)
-
IteratorAsTupleQueryResult
public IteratorAsTupleQueryResult(CloseableIterator<BindingSet> theIter, java.util.List<java.lang.String> theBindingNames, java.lang.Runnable theOnClose, java.lang.Runnable theOnSuccess, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> theOnError)
-
-
Method Detail
-
variables
public java.util.List<java.lang.String> variables()
Return the list of projected variables from the query- Specified by:
variables
in interfaceSelectQueryResult
- Returns:
- the projection
-
close
public void close() throws QueryExecutionFailure
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceCloseableIterator<T>
- Throws:
QueryExecutionFailure
-
computeNext
protected T computeNext()
- Specified by:
computeNext
in classcom.google.common.collect.AbstractIterator<T>
-
-