gate.creole.ontology
Interface OntologyBooleanQuery


public interface OntologyBooleanQuery

This represents a boolean query of the triple store for the ontology. To create a boolean query object you must use the ontology's factory method Ontology.createBooleanQuery(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!

Author:
Johann Petrak

Method Summary
 boolean evaluate()
          Evaluate the boolean query and return whether it evaluates to true or false;
 void setBinding(String varName, LiteralOrONodeID value)
          Re-assign a query variable to a new value.
 

Method Detail

setBinding

void setBinding(String varName,
                LiteralOrONodeID value)
Re-assign a query variable to a new value. This will let you query the triple store with the same query but a different value for the variable. Depending on the implemenation, this might avoid the necessity to recompile the whole query.

Parameters:
varName - - the name of the variable to be reassigned
value - - a LiteralOrONodeID object representing either a literal or either an URI or a blank node identifier.

evaluate

boolean evaluate()
Evaluate the boolean query and return whether it evaluates to true or false;

Returns:
- a boolean representing the result of the boolean query