kaos.core.csi.ontology
Interface OntologyService


public interface OntologyService


Method Summary
 kaos.ontology.util.SerializableOntModelImpl getConstructedOntologyStructure(java.lang.String structureId)
          This method retrieves user defined ontology structure identified by the id from the repository.
 java.util.List<kaos.ontology.util.SerializableOntModelImpl> getConstructedOntologyStructures()
          This method retrieves all user defined ontology structures in the repository.
 java.util.Set<java.lang.String> getImmediateSubClassesOf(java.lang.String className)
          Get set of immediate subclasses of the given class (direct children of the class).
 java.util.Set<java.lang.String> 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<java.lang.String> getListOfLoadedOntologies()
          This method returns a set of urls depicting ontologies loaded into the Ontology Service
 java.util.Set<java.lang.String> getOntologyDefinitionForConcept(java.lang.String conceptName)
          Get set of urls for the given short concept name.
 java.util.List<java.lang.String> getPropertiesApplicableTo(java.lang.String className)
          Get properties applicable to the given class
 java.lang.String getRangeOnPropertyForClass(java.lang.String className, java.lang.String propertyName)
          Get the name of the class defining the range of the specified property for the given class.
 java.util.List<java.lang.String> getSchema(java.lang.String conceptName)
          Get XML schema of the given concept if such a schema is available
 java.util.Set<java.lang.String> getSubClassesOf(java.lang.String className)
          Get set of subclasses of the given class.
 java.util.Set<java.lang.String> getSubPropertiesOf(java.lang.String propertyName)
          Get set of subproperties of the given property.
 java.util.Set<java.lang.String> getSuperPropertiesOf(java.lang.String propertyName)
          Get set of superproperties of the given property.
 java.util.Set<java.lang.String> getUltimateOntologyTypesOfIndividual(java.lang.String individualName)
          Finds the ultimate Ontology type of the provided individual
 java.util.Set<java.lang.String> getValuesForProperty(java.lang.String property, java.lang.String subject)
          Get the values of a given property for a given subject
 java.util.List<kaos.ontology.repository.OntClassPropertyDescription> initiateActionClassTargets(java.lang.String actionClassName, java.lang.String actorClassName)
          Get properties applicable to the action class
 void loadOntologies(java.util.List<kaos.ontology.util.SerializableOntModelImpl> myOntModelList, boolean recursiveLoad)
          Adds ontology included in the provide objects into the ontology repository.
 void loadOntology(kaos.ontology.util.SerializableOntModelImpl myOntModel, boolean recursiveLoad)
          Adds ontology included in the provide objects into the ontology repository.
 void loadOntology(java.lang.String loadedOWL)
          Loads ontology in OWL into the repository of the Ontology Service
 void loadOntology(java.lang.String myURL, boolean recursiveLoad)
          Loads ontology in OWL from given URL into the repository of the Ontology Service
 void putSchema(java.lang.String conceptName, java.lang.String xmlSchema)
          Add an XML schema for the given concept
 void removeConstructedOntologyStructure(java.lang.String structureId)
          This method removes a user defined ontology structure identified by the id from the repository.
 void removeConstructedOntologyStructures(java.util.List<java.lang.String> structureIds)
          This method removes multiple user defined ontology structure identified by the id from the repository.
 boolean testTrue(java.lang.String statement)
          Test if the KIF statemant is true according to the ontologies in the ontology repository.
 

Method Detail

loadOntology

void loadOntology(java.lang.String loadedOWL)
                  throws kaos.ontology.repository.OntologyRepository.ReasoningException,
                         DirectoryFailure
Loads ontology in OWL into the repository of the Ontology Service

Parameters:
loadedOWL - string containing a syntactically correctly OWL
Throws:
kaos.ontology.repository.OntologyRepository.ReasoningException - when loading of the ontology failed.
DirectoryFailure

loadOntology

void loadOntology(kaos.ontology.util.SerializableOntModelImpl myOntModel,
                  boolean recursiveLoad)
                  throws kaos.ontology.repository.OntologyRepository.ReasoningException,
                         java.io.IOException
Adds ontology included in the provide objects into the ontology repository.

Parameters:
myOntModel - The object of type Jena OntModel containing the added ontology
recursiveLoad - Indicates if the imported ontologies (by the ontology contained in myOntModel) should also be recursively loaded.
Throws:
kaos.ontology.util.QueryFailure - or IOException when loading of the ontology failed.
kaos.ontology.repository.OntologyRepository.ReasoningException
java.io.IOException

loadOntologies

void loadOntologies(java.util.List<kaos.ontology.util.SerializableOntModelImpl> myOntModelList,
                    boolean recursiveLoad)
                    throws kaos.ontology.repository.OntologyRepository.ReasoningException,
                           java.io.IOException
Adds ontology included in the provide objects into the ontology repository.

Parameters:
myOntModel - The object of type Jena OntModel containing the added ontology
recursiveLoad - Indicates if the imported ontologies (by the ontology contained in myOntModel) should also be recursively loaded.
Throws:
kaos.ontology.util.QueryFailure - or IOException when loading of the ontology failed.
kaos.ontology.repository.OntologyRepository.ReasoningException
java.io.IOException

loadOntology

void loadOntology(java.lang.String myURL,
                  boolean recursiveLoad)
                  throws kaos.ontology.repository.OntologyRepository.ReasoningException,
                         java.io.IOException,
                         DirectoryFailure
Loads ontology in OWL from given URL into the repository of the Ontology Service

Parameters:
myURI - string containing a syntactically correct URI to an OWL source
recursiveLoad - whether to load the OWL imported by the given URI
Throws:
kaos.ontology.repository.OntologyRepository.ReasoningException - when loading of the ontology failed.
java.io.IOException
DirectoryFailure

getInstancesOf

java.util.Set<java.lang.String> getInstancesOf(java.lang.String conceptName)
                                               throws kaos.ontology.management.UnknownConceptException,
                                                      DirectoryFailure
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 in the Jena format
Returns:
Set of instance ids
Throws:
java.lang.Exception - if forActor is unknown for the ontology repository
kaos.ontology.management.UnknownConceptException
DirectoryFailure

getUltimateOntologyTypesOfIndividual

java.util.Set<java.lang.String> getUltimateOntologyTypesOfIndividual(java.lang.String individualName)
                                                                     throws kaos.ontology.management.UnknownConceptException,
                                                                            DirectoryFailure
Finds the ultimate Ontology type of the provided individual

Parameters:
individualName - the name of the individual
Returns:
the set of names of the Ontology classes being the most narrow ones for the given individual
Throws:
kaos.ontology.management.UnknownConceptException - if concept unknown or any problem with JTP approached
DirectoryFailure

getSubClassesOf

java.util.Set<java.lang.String> getSubClassesOf(java.lang.String className)
                                                throws kaos.ontology.management.UnknownConceptException,
                                                       DirectoryFailure
Get set of subclasses of the given class.

Parameters:
className - The name of the class
Returns:
Set of subclasses names
Throws:
java.lang.Exception - if className is unknown for the ontology repository
kaos.ontology.management.UnknownConceptException
DirectoryFailure

getImmediateSubClassesOf

java.util.Set<java.lang.String> getImmediateSubClassesOf(java.lang.String className)
                                                         throws kaos.ontology.management.UnknownConceptException,
                                                                DirectoryFailure
Get set of immediate subclasses of the given class (direct children of the class).

Parameters:
className - The name of the class in Jena format
Returns:
Set of subclasses names in Jena format
Throws:
kaos.ontology.management.UnknownConceptException
kaos.ontology.management.UnknownConceptException - if className is unknown for the ontology repository
DirectoryFailure

getSuperPropertiesOf

java.util.Set<java.lang.String> getSuperPropertiesOf(java.lang.String propertyName)
                                                     throws kaos.ontology.management.UnknownConceptException,
                                                            DirectoryFailure
Get set of superproperties of the given property.

Parameters:
propertyName - The name of the property
Returns:
Set of superproperties names
Throws:
java.lang.Exception - if propertyName is unknown for the ontology repository
kaos.ontology.management.UnknownConceptException
DirectoryFailure

getSubPropertiesOf

java.util.Set<java.lang.String> getSubPropertiesOf(java.lang.String propertyName)
                                                   throws kaos.ontology.management.UnknownConceptException,
                                                          DirectoryFailure
Get set of subproperties of the given property.

Parameters:
propertyName - The name of the property
Returns:
Set of subproperties names
Throws:
java.lang.Exception - if propertyName is unknown for the ontology repository
kaos.ontology.management.UnknownConceptException
DirectoryFailure

testTrue

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

Parameters:
statement - the statement in KIF to be tested if true
Returns:
true if the statement is true and false in the opposite case
Throws:
java.lang.Exception - if reasoning failed.
kaos.ontology.util.QueryFailure
DirectoryFailure

initiateActionClassTargets

java.util.List<kaos.ontology.repository.OntClassPropertyDescription> initiateActionClassTargets(java.lang.String actionClassName,
                                                                                                java.lang.String actorClassName)
                                                                                                throws DirectoryFailure
Get properties applicable to the action class

Parameters:
actionClassName - the name of the action class performing
actorClassName - the name of the actor class performing the action
Returns:
vector of TargetClassDescription
Throws:
DirectoryFailure

getPropertiesApplicableTo

java.util.List<java.lang.String> getPropertiesApplicableTo(java.lang.String className)
                                                           throws kaos.ontology.management.UnknownConceptException,
                                                                  kaos.ontology.util.QueryFailure,
                                                                  DirectoryFailure
Get properties applicable to the given class

Parameters:
className - the name of the class
Returns:
vector of properties names
Throws:
java.lang.Exception - if className is unknown for the ontology repository
kaos.ontology.management.UnknownConceptException
kaos.ontology.util.QueryFailure
DirectoryFailure

getValuesForProperty

java.util.Set<java.lang.String> getValuesForProperty(java.lang.String property,
                                                     java.lang.String subject)
                                                     throws DirectoryFailure,
                                                            kaos.ontology.util.QueryFailure
Get the values of a given property for a given subject

Parameters:
property - - the property for which to lookup values
subject - - the subject to get the property values for
Returns:
Set of property values for the given subject as Strings
Throws:
DirectoryFailure
kaos.ontology.util.QueryFailure

getRangeOnPropertyForClass

java.lang.String getRangeOnPropertyForClass(java.lang.String className,
                                            java.lang.String propertyName)
                                            throws kaos.ontology.management.UnknownConceptException,
                                                   kaos.ontology.util.QueryFailure,
                                                   DirectoryFailure
Get the name of the class defining the range of the specified property for the given class.

Parameters:
className - the name of the class
propertyName - the name of the property
Returns:
the name of the class defining the range
Throws:
java.lang.Exception - if reasoning failed.
kaos.ontology.management.UnknownConceptException
kaos.ontology.util.QueryFailure
DirectoryFailure

getOntologyDefinitionForConcept

java.util.Set<java.lang.String> getOntologyDefinitionForConcept(java.lang.String conceptName)
                                                                throws DirectoryFailure
Get set of urls for the given short concept name. Currently it tries to match the concept name with the local name of the ontology definitions url

Parameters:
conceptName - A short name of concept, e.g. "Actor"
Returns:
Set of url containing the short concept name
Throws:
DirectoryFailure

getSchema

java.util.List<java.lang.String> getSchema(java.lang.String conceptName)
                                           throws kaos.ontology.management.UnknownConceptException,
                                                  DirectoryFailure
Get XML schema of the given concept if such a schema is available

Parameters:
conceptName - uri name of the concept
Returns:
A List containing Strings that define the XML schema of the given concept. The reason it is a vector of strings and not just one string is that the definition can be complex, i.e. derived from multiple more primitive schemas, hence this vector contains definitions for all those schemas too.
Throws:
java.lang.Exception - if the concept is unknown for the XML Schema repository.
kaos.ontology.management.UnknownConceptException
DirectoryFailure

putSchema

void putSchema(java.lang.String conceptName,
               java.lang.String xmlSchema)
               throws DirectoryFailure
Add an XML schema for the given concept

Parameters:
conceptName - uri name of the concept
schema - string to add.
Throws:
java.lang.Exception - if the concept is unknown for the xml repository.
DirectoryFailure

getListOfLoadedOntologies

java.util.Set<java.lang.String> getListOfLoadedOntologies()
                                                          throws DirectoryFailure
This method returns a set of urls depicting ontologies loaded into the Ontology Service

Throws:
DirectoryFailure

getConstructedOntologyStructures

java.util.List<kaos.ontology.util.SerializableOntModelImpl> getConstructedOntologyStructures()
                                                                                             throws DirectoryFailure
This method retrieves all user defined ontology structures in the repository.

Returns:
list containing SerializableOntModelImpl objects
Throws:
DirectoryFailure

getConstructedOntologyStructure

kaos.ontology.util.SerializableOntModelImpl getConstructedOntologyStructure(java.lang.String structureId)
                                                                            throws kaos.ontology.repository.OntologyRepository.ReasoningException,
                                                                                   kaos.ontology.management.UnknownConceptException,
                                                                                   java.io.IOException,
                                                                                   DirectoryFailure
This method retrieves user defined ontology structure identified by the id from the repository.

Parameters:
conceptName - uri name of the concept
Returns:
SerializableOntModelImpl objects
Throws:
kaos.ontology.repository.OntologyRepository.ReasoningException
kaos.ontology.management.UnknownConceptException
java.io.IOException
DirectoryFailure

removeConstructedOntologyStructure

void removeConstructedOntologyStructure(java.lang.String structureId)
                                        throws DirectoryFailure
This method removes a user defined ontology structure identified by the id from the repository.

Parameters:
structureId: - uri name of the concept
Throws:
DirectoryFailure

removeConstructedOntologyStructures

void removeConstructedOntologyStructures(java.util.List<java.lang.String> structureIds)
                                         throws DirectoryFailure
This method removes multiple user defined ontology structure identified by the id from the repository.

Parameters:
list - of uri's identifying the concepts to remove
Throws:
DirectoryFailure


Copyright © 2006 IHMC All Rights Reserved.