Package com.complexible.common.rdf.query
Class GraphQueryResultIterator
- All Implemented Interfaces:
CloseableIterator<Statement>,StatementIterator,AutoCloseable,Iterator<Statement>
public final class GraphQueryResultIterator
extends com.google.common.collect.AbstractIterator<Statement>
implements StatementIterator
Iteration implementation over graph query results. Optionally will apply a context to the results as they are returned so we can have the effect of doing construct queries which return statements w/ non-null contexts.
- Since:
- 0.2
- Version:
- 6.0
- 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
ConstructorsConstructorDescriptionGraphQueryResultIterator(GraphQueryResult theResult) Create a new GraphQueryResultIterationGraphQueryResultIterator(GraphQueryResult theResult, Resource theContext) Create a new GQRIterator -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns namespaces associated with this statement iteration if any.Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peekMethods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, removeMethods inherited from interface com.complexible.common.rdf.StatementIterator
process, toGraph
-
Constructor Details
-
GraphQueryResultIterator
Create a new GraphQueryResultIteration- Parameters:
theResult- the query result
-
GraphQueryResultIterator
Create a new GQRIterator- Parameters:
theResult- the query resulttheContext- the context to be applied to the results, or null if the context should not be altered
-
-
Method Details
-
namespaces
Returns namespaces associated with this statement iteration if any.- Specified by:
namespacesin interfaceStatementIterator- Returns:
- possibly empty namespaces but never
null
-
computeNext
- Specified by:
computeNextin classcom.google.common.collect.AbstractIterator<Statement>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableIterator<Statement>
-