Class IteratingGraphQueryResult
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<Statement>
org.eclipse.rdf4j.common.iteration.IterationWrapper<Statement>
org.eclipse.rdf4j.query.impl.IteratingGraphQueryResult
- All Implemented Interfaces:
AutoCloseable, Iterable<Statement>, Iterator<Statement>, CloseableIteration<Statement>, GraphQueryResult, QueryResult<Statement>
public class IteratingGraphQueryResult
extends IterationWrapper<Statement>
implements GraphQueryResult
An iterating implementation of the
GraphQueryResult interface.- Author:
- Arjohn Kampman, Jeen Broekstra
-
Field Summary
Fields inherited from class IterationWrapper
wrappedIterModifier and TypeFieldDescriptionprotected final CloseableIteration<? extends Statement> Deprecated.This will be changed to private, possibly with an accessor in future.Fields inherited from interface CloseableIteration
EMPTY_STATEMENT_ITERATION -
Constructor Summary
ConstructorsConstructorDescriptionIteratingGraphQueryResult(Map<String, String> namespaces, Iterator<? extends Statement> statementIter) IteratingGraphQueryResult(Map<String, String> namespaces, CloseableIteration<? extends Statement> statementIter) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves relevant namespaces from the query result.Methods inherited from class IterationWrapper
handleClose, hasNext, next, removeModifier and TypeMethodDescriptionprotected voidDeprecated.Closes this Iteration and also closes the wrapped Iteration if it is aCloseableIteration.booleanhasNext()Deprecated.Checks whether the wrapped Iteration contains more elements, closing this Iteration when this is not the case.next()Deprecated.Returns the next element from the wrapped Iteration.voidremove()Deprecated.Removes the last element that has been returned from the wrapped Iteration.Methods inherited from class AbstractCloseableIteration
close, isClosedModifier and TypeMethodDescriptionfinal voidclose()CallsAbstractCloseableIteration.handleClose()upon first call and makes sure the resource closures are only executed once.final booleanisClosed()Checks whether this CloseableIteration has been closed.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Iterator
forEachRemainingMethods inherited from interface QueryResult
hasNext, iterator, next, stream
-
Constructor Details
-
IteratingGraphQueryResult
-
IteratingGraphQueryResult
-
IteratingGraphQueryResult
public IteratingGraphQueryResult(Map<String, String> namespaces, CloseableIteration<? extends Statement> statementIter)
-
-
Method Details
-
getNamespaces
Description copied from interface:GraphQueryResultRetrieves relevant namespaces from the query result.
The contents of the Map may be modified after it is returned, as the initial return may be performed when the first RDF Statement is encountered.- Specified by:
getNamespacesin interfaceGraphQueryResult- Returns:
- a Map<String, String> object containing (prefix, namespace) pairs.
-