com.hp.hpl.jena.sparql.engine
Class ResultSetStream

java.lang.Object
  extended by com.hp.hpl.jena.sparql.engine.ResultSetStream
All Implemented Interfaces:
ResultSet, Iterator<QuerySolution>

public class ResultSetStream
extends 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
ResultSetStream(List<String> resultVars, com.hp.hpl.jena.rdf.model.Model m, QueryIterator iter)
           
 
Method Summary
 com.hp.hpl.jena.rdf.model.Model getModel()
           
 com.hp.hpl.jena.rdf.model.Model getResourceModel()
          Get the model that resources are created against - may be null
 List<String> getResultVars()
          Get the variable names for the projection
 int getRowNumber()
          Return the "row number" - a count of the number of possibilities returned so far.
 boolean hasNext()
          Is there another possibility?
 QuerySolution next()
          Moves onto the next result possibility.
 Binding nextBinding()
          Move to the next binding (low level)
 QuerySolution nextSolution()
          Moves onto the next result possibility.
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetStream

public ResultSetStream(List<String> resultVars,
                       com.hp.hpl.jena.rdf.model.Model m,
                       QueryIterator iter)
Method Detail

remove

public void remove()
            throws UnsupportedOperationException
Specified by:
remove in interface Iterator<QuerySolution>
Throws:
UnsupportedOperationException - Always thrown.

hasNext

public boolean hasNext()
Is there another possibility?

Specified by:
hasNext in interface ResultSet
Specified by:
hasNext in interface Iterator<QuerySolution>

nextBinding

public Binding nextBinding()
Description copied from interface: ResultSet
Move to the next binding (low level)

Specified by:
nextBinding in interface ResultSet

nextSolution

public QuerySolution nextSolution()
Moves onto the next result possibility. The returned object is actual the binding for this result.

Specified by:
nextSolution in interface ResultSet

next

public QuerySolution next()
Moves onto the next result possibility.

Specified by:
next in interface ResultSet
Specified by:
next in interface Iterator<QuerySolution>

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:
getRowNumber in interface ResultSet

getResultVars

public List<String> getResultVars()
Get the variable names for the projection

Specified by:
getResultVars in interface ResultSet

getModel

public com.hp.hpl.jena.rdf.model.Model getModel()

getResourceModel

public com.hp.hpl.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 interface ResultSet


Licenced under the Apache License, Version 2.0