Package org.apache.jena.sparql.resultset
Class ResultSetPeeking
- java.lang.Object
-
- org.apache.jena.sparql.resultset.ResultSetPeeking
-
- All Implemented Interfaces:
java.util.Iterator<QuerySolution>,org.apache.jena.atlas.lib.Closeable,ResultSet,ResultSetPeekable
public class ResultSetPeeking extends java.lang.Object implements ResultSetPeekable, org.apache.jena.atlas.lib.Closeable
A wrapper around another result set that provides peek capabilities
-
-
Field Summary
Fields Modifier and Type Field Description static booleanwarnOnSyncErrorsControls whether a log warning is printed if someone modifies the underlying result set externally to us
-
Constructor Summary
Constructors Constructor Description ResultSetPeeking(ResultSet results)Creates a peeking wrapper around another result set
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ModelgetResourceModel()Get the model that resources are created against - may be nulljava.util.List<java.lang.String>getResultVars()Get the variable names for the projection.intgetRowNumber()Return the "row" number for the current iterator itembooleanhasNext()Is there another result?QuerySolutionnext()Moves onto the next result.BindingnextBinding()Move to the next binding (low level)QuerySolutionnextSolution()Moves onto the next result (legacy - use .next()).QuerySolutionpeek()Peek at the next query solutionBindingpeekBinding()Peek at the next binding-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jena.query.ResultSet
rewindable
-
-
-
-
Constructor Detail
-
ResultSetPeeking
public ResultSetPeeking(ResultSet results)
Creates a peeking wrapper around another result set- Parameters:
results- Inner results
-
-
Method Detail
-
hasNext
public boolean hasNext()
Description copied from interface:ResultSetIs there another result?- Specified by:
hasNextin interfacejava.util.Iterator<QuerySolution>- Specified by:
hasNextin interfaceResultSet
-
next
public QuerySolution next()
Description copied from interface:ResultSetMoves onto the next result.- Specified by:
nextin interfacejava.util.Iterator<QuerySolution>- Specified by:
nextin interfaceResultSet
-
nextSolution
public QuerySolution nextSolution()
Description copied from interface:ResultSetMoves onto the next result (legacy - use .next()).- Specified by:
nextSolutionin interfaceResultSet
-
nextBinding
public Binding 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
public java.util.List<java.lang.String> 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 Model getResourceModel()
Description copied from interface:ResultSetGet the model that resources are created against - may be null- Specified by:
getResourceModelin interfaceResultSet
-
peek
public QuerySolution peek()
Description copied from interface:ResultSetPeekablePeek at the next query solution- Specified by:
peekin interfaceResultSetPeekable- Returns:
- Next solution if available
-
peekBinding
public Binding peekBinding()
Description copied from interface:ResultSetPeekablePeek at the next binding- Specified by:
peekBindingin interfaceResultSetPeekable- Returns:
- Next binding if available
-
close
public void close()
- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-
-