gate.creole.ontology
Interface OntologyTupleQuery

All Superinterfaces:
ClosableIterator<Vector<LiteralOrONodeID>>, Iterator<Vector<LiteralOrONodeID>>

public interface OntologyTupleQuery
extends ClosableIterator<Vector<LiteralOrONodeID>>

This represents a tuple query of the triple store for the ontology. To create a tuple query object you must use the ontology's factory method Ontology.createTupleQuery(String, gate.creole.ontology.OConstants.QueryLanguage).

NOTE: querying the ontology triple store directly should be avoided and only done in exceptional cases. Using the methods to query and access ontology entities should be preferred whenever possible!

The query object implements a closable iterator that auto-closes when all its elements are exhausted. However, you must close it if you stop retrieving elements before all elements have been exhausted (i.e. before the hasNext() method has returned false). Closing the query object is necessary to free the considerable resources allocated by it.

To use a query object properly, be sure to follow the following steps: