Package com.complexible.common.rdf.query
Class IteratorAsGraphQueryResult
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<T>
-
- com.google.common.collect.AbstractIterator<T>
-
- com.complexible.common.rdf.query.IteratorAsGraphQueryResult
-
- All Implemented Interfaces:
CloseableIterator<Statement>
,GraphQueryResult
,QueryResult<Statement>
,java.lang.AutoCloseable
,java.util.Iterator<Statement>
public final class IteratorAsGraphQueryResult extends com.google.common.collect.AbstractIterator<T> implements GraphQueryResult
Adapter class for using a StatementIteration as a Sesame GraphQueryResult.
- 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 IteratorAsGraphQueryResult(CloseableIterator<Statement> theIter)
IteratorAsGraphQueryResult(CloseableIterator<Statement> theIter, java.lang.Iterable<Namespace> theNamespacesProvider, java.lang.Runnable theOnClose, java.lang.Runnable theOnSuccess, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> theOnFailure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected T
computeNext()
Namespaces
namespaces()
The set of namespaces, if specified, that are to be used with the result set.-
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peek
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.stardog.stark.query.GraphQueryResult
toGraph
-
-
-
-
Constructor Detail
-
IteratorAsGraphQueryResult
public IteratorAsGraphQueryResult(CloseableIterator<Statement> theIter)
-
IteratorAsGraphQueryResult
public IteratorAsGraphQueryResult(CloseableIterator<Statement> theIter, java.lang.Iterable<Namespace> theNamespacesProvider, java.lang.Runnable theOnClose, java.lang.Runnable theOnSuccess, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> theOnFailure)
-
-
Method Detail
-
namespaces
@Nonnull public Namespaces namespaces()
The set of namespaces, if specified, that are to be used with the result set.- Specified by:
namespaces
in interfaceGraphQueryResult
- Returns:
- the namespaces
-
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>
-
-