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.4 2003/03/19 17:16:55 andy_seaborne Exp $
Author:
Andy Seaborne
See Also:
Query, QueryEngine, ResultBinding, 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

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

hasNext

public boolean hasNext()
Is there another possibility?

Specified by:
hasNext in interface java.util.Iterator

next

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

Specified by:
next in interface java.util.Iterator

close

public 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

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


getResultVars

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


getAll

public 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 ResultBindings.

Returns:
List


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.