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
Modifier and TypeFieldDescriptionstatic boolean
Controls whether a log warning is printed if someone modifies the underlying result set externally to us -
Constructor Summary
ConstructorDescriptionResultSetPeeking
(ResultSet results) Creates a peeking wrapper around another result set -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
forEachRemaining
(Consumer<? super QuerySolution> action) org.apache.jena.rdf.model.Model
Get the model that resources are created against - may be nullGet the variable names for the projection.int
Return the "row" number for the current iterator itemboolean
hasNext()
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, wait
Methods 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:ResultSet
Is there another result?- Specified by:
hasNext
in interfaceIterator<QuerySolution>
- Specified by:
hasNext
in interfaceResultSet
-
next
Description copied from interface:ResultSet
Moves onto the next result.- Specified by:
next
in interfaceIterator<QuerySolution>
- Specified by:
next
in interfaceResultSet
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceIterator<QuerySolution>
- Specified by:
forEachRemaining
in interfaceResultSet
-
nextSolution
Description copied from interface:ResultSet
Moves onto the next result (legacy - use .next()).- Specified by:
nextSolution
in interfaceResultSet
-
nextBinding
Description copied from interface:ResultSet
Move to the next binding (low level)- Specified by:
nextBinding
in interfaceResultSet
-
getRowNumber
public int getRowNumber()Description copied from interface:ResultSet
Return the "row" number for the current iterator item- Specified by:
getRowNumber
in interfaceResultSet
-
getResultVars
Description copied from interface:ResultSet
Get the variable names for the projection. Not all query solutions from a result have every variable defined.- Specified by:
getResultVars
in interfaceResultSet
-
getResourceModel
public org.apache.jena.rdf.model.Model getResourceModel()Description copied from interface:ResultSet
Get the model that resources are created against - may be null- Specified by:
getResourceModel
in interfaceResultSet
-
peek
Description copied from interface:ResultSetPeekable
Peek at the next query solution- Specified by:
peek
in interfaceResultSetPeekable
- Returns:
- Next solution if available
-
peekBinding
Description copied from interface:ResultSetPeekable
Peek at the next binding- Specified by:
peekBinding
in interfaceResultSetPeekable
- Returns:
- Next binding if available
-
close
public void close()
-