com.hp.hpl.jena.sparql.resultset
Class ResultSetPeeking

java.lang.Object
  extended by com.hp.hpl.jena.sparql.resultset.ResultSetPeeking
All Implemented Interfaces:
ResultSet, ResultSetPeekable, Iterator<QuerySolution>, Closeable

public class ResultSetPeeking
extends Object
implements ResultSetPeekable, Closeable

A wrapper around another result set that provides peek capabilities


Field Summary
static boolean warnOnSyncErrors
          Controls whether a log warning is printed if someone modifies the underlying result set externally to us
 
Constructor Summary
ResultSetPeeking(ResultSet results)
          Creates a peeking wrapper around another result set
 
Method Summary
 void close()
           
 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 for the current iterator item
 boolean hasNext()
          Is there another result?
 QuerySolution next()
          Moves onto the next result.
 Binding nextBinding()
          Move to the next binding (low level)
 QuerySolution nextSolution()
          Moves onto the next result (legacy - use .next()).
 QuerySolution peek()
          Peek at the next query solution
 Binding peekBinding()
          Peek at the next binding
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

warnOnSyncErrors

public static boolean warnOnSyncErrors
Controls whether a log warning is printed if someone modifies the underlying result set externally to us

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: ResultSet
Is there another result?

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

next

public QuerySolution next()
Description copied from interface: ResultSet
Moves onto the next result.

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

nextSolution

public QuerySolution nextSolution()
Description copied from interface: ResultSet
Moves onto the next result (legacy - use .next()).

Specified by:
nextSolution in interface ResultSet

nextBinding

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

Specified by:
nextBinding in interface ResultSet

getRowNumber

public int getRowNumber()
Description copied from interface: ResultSet
Return the "row" number for the current iterator item

Specified by:
getRowNumber in interface ResultSet

getResultVars

public List<String> 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 interface ResultSet

getResourceModel

public Model getResourceModel()
Description copied from interface: ResultSet
Get the model that resources are created against - may be null

Specified by:
getResourceModel in interface ResultSet

remove

public void remove()
Specified by:
remove in interface Iterator<QuerySolution>

peek

public QuerySolution peek()
Description copied from interface: ResultSetPeekable
Peek at the next query solution

Specified by:
peek in interface ResultSetPeekable
Returns:
Next solution if available

peekBinding

public Binding peekBinding()
Description copied from interface: ResultSetPeekable
Peek at the next binding

Specified by:
peekBinding in interface ResultSetPeekable
Returns:
Next binding if available

close

public void close()
Specified by:
close in interface Closeable


Licenced under the Apache License, Version 2.0