java.lang.Object
org.apache.jena.sparql.resultset.ResultSetPeeking
- All Implemented Interfaces:
Iterator<QuerySolution>,org.apache.jena.atlas.lib.Closeable,ResultSet,ResultSetPeekable
public class ResultSetPeeking
extends Object
implements ResultSetPeekable, org.apache.jena.atlas.lib.Closeable
A wrapper around another result set that provides peek capabilities
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanControls whether a log warning is printed if someone modifies the underlying result set externally to us -
Constructor Summary
ConstructorsConstructorDescriptionResultSetPeeking(ResultSet results) Creates a peeking wrapper around another result set -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidforEachRemaining(Consumer<? super QuerySolution> action) org.apache.jena.rdf.model.ModelGet the model that resources are created against - may be nullGet the variable names for the projection.intReturn the "row" number for the current iterator itembooleanhasNext()Is there another result?next()Moves onto the next result.Move to the next binding (low level)Moves onto the next result (legacy - use .next()).peek()Peek at the next query solutionPeek at the next bindingMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.query.ResultSet
materialise, rewindable
-
Field Details
-
warnOnSyncErrors
public static boolean warnOnSyncErrorsControls whether a log warning is printed if someone modifies the underlying result set externally to us
-
-
Constructor Details
-
ResultSetPeeking
Creates a peeking wrapper around another result set- Parameters:
results- Inner results
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:ResultSetIs there another result?- Specified by:
hasNextin interfaceIterator<QuerySolution>- Specified by:
hasNextin interfaceResultSet
-
next
Description copied from interface:ResultSetMoves onto the next result.- Specified by:
nextin interfaceIterator<QuerySolution>- Specified by:
nextin interfaceResultSet
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceIterator<QuerySolution>- Specified by:
forEachRemainingin interfaceResultSet
-
nextSolution
Description copied from interface:ResultSetMoves onto the next result (legacy - use .next()).- Specified by:
nextSolutionin interfaceResultSet
-
nextBinding
Description copied from interface:ResultSetMove to the next binding (low level)- Specified by:
nextBindingin interfaceResultSet
-
getRowNumber
public int getRowNumber()Description copied from interface:ResultSetReturn the "row" number for the current iterator item- Specified by:
getRowNumberin interfaceResultSet
-
getResultVars
Description copied from interface:ResultSetGet the variable names for the projection. Not all query solutions from a result have every variable defined.- Specified by:
getResultVarsin interfaceResultSet
-
getResourceModel
public org.apache.jena.rdf.model.Model getResourceModel()Description copied from interface:ResultSetGet the model that resources are created against - may be null- Specified by:
getResourceModelin interfaceResultSet
-
peek
Description copied from interface:ResultSetPeekablePeek at the next query solution- Specified by:
peekin interfaceResultSetPeekable- Returns:
- Next solution if available
-
peekBinding
Description copied from interface:ResultSetPeekablePeek at the next binding- Specified by:
peekBindingin interfaceResultSetPeekable- Returns:
- Next binding if available
-
close
public void close()
-