kaos.core.csi.query
Interface QueryState


public interface QueryState

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

Author:
KAoS Team $Revision: 1.3 $

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.lang.String getUniqueValueForProperty(java.lang.String property, java.lang.String subject)
          Get a single value 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

getUniqueValueForProperty

java.lang.String getUniqueValueForProperty(java.lang.String property,
                                           java.lang.String subject)
                                           throws DirectoryFailure,
                                                  QueryFailure
Get a single value of the variable satisfing the KIF query: (property subject ?val).

Parameters:
property - String containing the name of the property.
subject - String containing the name of the subject.
Returns:
String containing the single value for the property on this subject.
Throws:
DirectoryFailure - if the connection to the DS cannot be established.
QueryFailure - if reasoning failed.


Copyright © 2005 IHMC All Rights Reserved.