com.hp.hpl.jena.rdql
Interface QueryResults

All Superinterfaces:
java.util.Iterator
All Known Subinterfaces:
QueryResultsRewindable
All Known Implementing Classes:
QueryResultsMem, QueryResultsStream

public interface QueryResults
extends java.util.Iterator

Results from a query in a "ResultSet"-like manner. Each row corresponds to a set of bindings which fulfil the conditions of the query. Access to the results is by variable name.

Version:
$Id: QueryResults.java,v 1.9 2005/02/21 12:15:25 andy_seaborne Exp $
Author:
Andy Seaborne
See Also:
Query, QueryEngine, ResultBindingImpl, QueryResultsStream

Method Summary
 void close()
          Close the results iterator and stop query evaluation as soon as convenient.
 java.util.List getAll()
          Deprecated. Use QueryResultsMem to get all the results of a query.
 java.util.List getResultVars()
          Get the variable names for the projection
 int getRowNumber()
          Return the "row" number for the current iterator item
 boolean hasNext()
          Is there another possibility?
 java.lang.Object next()
          Moves onto the next result possibility.
 void remove()
           
 

Method Detail

remove

void remove()
            throws java.lang.UnsupportedOperationException
Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - Always thrown.

hasNext

boolean hasNext()
Is there another possibility?

Specified by:
hasNext in interface java.util.Iterator

next

java.lang.Object next()
Moves onto the next result possibility. The returned object should be of class ResultBindingImpl

Specified by:
next in interface java.util.Iterator

close

void close()
Close the results iterator and stop query evaluation as soon as convenient. It is important to close query result iterators inorder to release resources such as working memory and to stop the query execution. Some storage subsystems require explicit ends of operations and this operation will cause those to be called where necessary.


getRowNumber

int getRowNumber()
Return the "row" number for the current iterator item


getResultVars

java.util.List getResultVars()
Get the variable names for the projection


getAll

java.util.List getAll()
Deprecated. Use QueryResultsMem to get all the results of a query.

Convenience function to consume a query. Returns a list of ResultBindingImpls.

Returns:
List


Copyright © 2000, 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP