kaos.core.csi.query
Interface QueryState

All Known Implementing Classes:
QueryStateImpl

public interface QueryState

Defines the operations to query the different aspect of state stored in the Directory Service


Method Summary
 java.util.Set askQuery(java.lang.String variableName, java.lang.String multiplyVariablesQuery)
          Get values of the selected variable satisfing the KIF query with possibly many variable.
 java.util.Set getInstancesOf(java.lang.String conceptName)
          Get set of instances of the given concept; if the concept is an instance itself the set contains just this instance.
 java.util.Set getValuesForProperty(java.lang.String property, java.lang.String subject)
          Get values of the variable satisfing the KIF query: (property subject ?val).
 boolean testTrue(java.lang.String statement)
          Test if the KIF statemant is true according to the ontologies in the ontology repository.
 

Method Detail

testTrue

boolean testTrue(java.lang.String statement)
                 throws DirectoryFailure,
                        QueryFailure
Test if the KIF statemant is true according to the ontologies in the ontology repository.

Parameters:
statement - to be tested for truth
Returns:
true if the statement is true and false in the opposite case
Throws:
DirectoryFailure - if the connection to the DS cannot be established
QueryFailure - if query failed

askQuery

java.util.Set askQuery(java.lang.String variableName,
                       java.lang.String multiplyVariablesQuery)
                       throws DirectoryFailure,
                              QueryFailure
Get values of the selected variable satisfing the KIF query with possibly many variable.

Parameters:
variableName - the name of the selected variable
multiplyVariablesQuery - the query
Returns:
a set with values satisfing the query
Throws:
DirectoryFailure - if the connection to the DS cannot be established
QueryFailure - if query failed.

getInstancesOf

java.util.Set getInstancesOf(java.lang.String conceptName)
                             throws DirectoryFailure,
                                    UnknownConceptException
Get set of instances of the given concept; if the concept is an instance itself the set contains just this instance.

Parameters:
conceptName - The name of the concept
Returns:
Set of instance ids
Throws:
DirectoryFailure - if the connection to the DS cannot be established
UnknownConceptException - if conceptName is unknow

getValuesForProperty

java.util.Set getValuesForProperty(java.lang.String property,
                                   java.lang.String subject)
                                   throws DirectoryFailure,
                                          QueryFailure
Get values of the variable satisfing the KIF query: (property subject ?val).

Parameters:
property - the name of the property
subject - the name of the subject
Returns:
a set with values for the property on this subject
Throws:
DirectoryFailure - if the connection to the DS cannot be established
QueryFailure - if query failed