edu.stanford.smi.protegex.owl.model.query
Interface QueryResults

All Known Implementing Classes:
SPARQLQueryResults

public interface QueryResults

An object wrapping the results of a query. A query results in an Iterator of variable bindings, where each variable can be bound to an RDFObject.

Author:
Holger Knublauch

Method Summary
 List getVariables()
          Gets a list of all variables that have been declared in the query.
 boolean hasNext()
          Checks if there are more results available.
 Map next()
          Gets the next results, where each result is a Map from variables to bindings.
 

Method Detail

getVariables

public List getVariables()
Gets a list of all variables that have been declared in the query. The variables are the keys in the Maps returned by the next() method.

Returns:
a List of Objects (e.g. Strings)
See Also:
next()

hasNext

public boolean hasNext()
Checks if there are more results available.

Returns:
true if there are more results

next

public Map next()
Gets the next results, where each result is a Map from variables to bindings. This method can only be called as long as hasNext() delivers true.

Returns:
a Map (keys are the members of the getVariables() call).
See Also:
getVariables()