Package org.apache.jena.sparql.engine
Class ResultSetStream
- java.lang.Object
-
- org.apache.jena.sparql.engine.ResultSetStream
-
- All Implemented Interfaces:
java.util.Iterator<QuerySolution>,ResultSet
public class ResultSetStream extends java.lang.Object implements ResultSet
The main ResultSet implementation for returning results from queries. This version is "use once" - you can not reset the result set because the results of the query are not remembered so as not to consume potentially large amounts of memory.
-
-
Constructor Summary
Constructors Constructor Description ResultSetStream(java.util.List<java.lang.String> resultVars, Model m, java.util.Iterator<Binding> iter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelgetModel()ModelgetResourceModel()Get the model that resources are created against - may be nulljava.util.List<java.lang.String>getResultVars()Get the variable names for the projectionintgetRowNumber()Return the "row number" - a count of the number of possibilities returned so far.booleanhasNext()Is there another possibility?QuerySolutionnext()Moves onto the next result possibility.BindingnextBinding()Move to the next binding (low level)QuerySolutionnextSolution()Moves onto the next result possibility.-
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
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Is there another possibility?- Specified by:
hasNextin interfacejava.util.Iterator<QuerySolution>- Specified by:
hasNextin interfaceResultSet
-
nextBinding
public Binding nextBinding()
Description copied from interface:ResultSetMove to the next binding (low level)- Specified by:
nextBindingin interfaceResultSet
-
nextSolution
public QuerySolution nextSolution()
Moves onto the next result possibility. The returned object is actual the binding for this result.- Specified by:
nextSolutionin interfaceResultSet
-
next
public QuerySolution next()
Moves onto the next result possibility.- Specified by:
nextin interfacejava.util.Iterator<QuerySolution>- Specified by:
nextin interfaceResultSet
-
getRowNumber
public int getRowNumber()
Return the "row number" - a count of the number of possibilities returned so far. Remains valid (as the total number of possibilities) after the iterator ends.- Specified by:
getRowNumberin interfaceResultSet
-
getResultVars
public java.util.List<java.lang.String> getResultVars()
Get the variable names for the projection- Specified by:
getResultVarsin interfaceResultSet
-
getModel
public Model getModel()
-
getResourceModel
public Model getResourceModel()
Description copied from interface:ResultSetGet the model that resources are created against - may be null- Specified by:
getResourceModelin interfaceResultSet
-
-