|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkaos.core.csi.ontology.OntologyServiceImpl
public class OntologyServiceImpl
Defines the operations to manage and access Ontology Service and its repository
Method Summary | |
---|---|
SerializableOntModelImpl |
getConstructedOntologyStructure(java.lang.String structureId)
This method retrieves user defined ontology structure identified by the id from the repository. |
java.util.List |
getConstructedOntologyStructures()
This method retrieves all user defined ontology structures in the repository. |
java.util.Set |
getImmediateSubClassesOf(java.lang.String className)
Get set of immediate subclasses of the given class (direct children of the class). |
static OntologyService |
getInstance()
Retrieve an instance of OntologyService. |
static OntologyService |
getInstance(java.lang.String transportName)
Retrieve an instance of OntologyService. |
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 |
getSubClassesOf(java.lang.String className)
Get set of subclasses of the given class. |
java.util.Set |
getSubPropertiesOf(java.lang.String propertyName)
Get set of subproperties of the given property. |
java.util.Set |
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.Vector |
initiateActionClassTargets(java.lang.String actionClassName,
java.lang.String actorClassName)
Get properties applicable to the action class |
void |
loadOntologies(java.util.List<SerializableOntModelImpl> myOntModels,
boolean recursiveLoad)
Adds ontology included in the provide objects into the ontology repository. |
void |
loadOntology(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 |
protected void |
logMessage(java.lang.String msg,
java.lang.Exception e,
int logLevel)
|
protected void |
logMessage(java.lang.String msg,
int logLevel)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static OntologyService getInstance(java.lang.String transportName) throws java.lang.Exception
transportName
- String specifying the name of the transport to use for communication with the KAoS Directory Service.
java.lang.Exception
public static OntologyService getInstance() throws java.lang.Exception
java.lang.Exception
public java.util.Set<java.lang.String> getInstancesOf(java.lang.String conceptName) throws UnknownConceptException, DirectoryFailure
OntologyService
getInstancesOf
in interface OntologyService
conceptName
- The name of the concept in the Jena format
UnknownConceptException
DirectoryFailure
OntologyService.getInstancesOf(java.lang.String)
public java.util.Set<java.lang.String> getUltimateOntologyTypesOfIndividual(java.lang.String individualName) throws UnknownConceptException, DirectoryFailure
getUltimateOntologyTypesOfIndividual
in interface OntologyService
individualName
- the name of the individual
UnknownConceptException
- if concept unknown or any problem with JTP approached
DirectoryFailure
public java.util.Set<java.lang.String> getListOfLoadedOntologies() throws DirectoryFailure
OntologyService
getListOfLoadedOntologies
in interface OntologyService
DirectoryFailure
OntologyService.getListOfLoadedOntologies()
public java.util.Set<java.lang.String> getOntologyDefinitionForConcept(java.lang.String conceptName) throws DirectoryFailure
OntologyService
getOntologyDefinitionForConcept
in interface OntologyService
conceptName
- A short name of concept, e.g. "Actor"
DirectoryFailure
OntologyService.getOntologyDefinitionForConcept(java.lang.String)
public java.util.List<java.lang.String> getPropertiesApplicableTo(java.lang.String className) throws UnknownConceptException, QueryFailure, DirectoryFailure
OntologyService
getPropertiesApplicableTo
in interface OntologyService
className
- the name of the class
UnknownConceptException
QueryFailure
DirectoryFailure
OntologyService.getPropertiesApplicableTo(java.lang.String)
public java.util.Set<java.lang.String> getValuesForProperty(java.lang.String property, java.lang.String subject) throws DirectoryFailure, QueryFailure
OntologyService
getValuesForProperty
in interface OntologyService
property
- - the property for which to lookup valuessubject
- - the subject to get the property values for
QueryFailure
DirectoryFailure
OntologyService.getValuesForProperty(java.lang.String, java.lang.String)
public java.lang.String getRangeOnPropertyForClass(java.lang.String className, java.lang.String propertyName) throws UnknownConceptException, QueryFailure, DirectoryFailure
OntologyService
getRangeOnPropertyForClass
in interface OntologyService
className
- the name of the classpropertyName
- the name of the property
UnknownConceptException
QueryFailure
DirectoryFailure
OntologyService.getRangeOnPropertyForClass(java.lang.String, java.lang.String)
public java.util.List<java.lang.String> getSchema(java.lang.String conceptName) throws UnknownConceptException, DirectoryFailure
OntologyService
getSchema
in interface OntologyService
conceptName
- uri name of the concept
UnknownConceptException
DirectoryFailure
OntologyService.getSchema(java.lang.String)
public void putSchema(java.lang.String conceptName, java.lang.String xmlSchema) throws DirectoryFailure
OntologyService
putSchema
in interface OntologyService
conceptName
- uri name of the concept
DirectoryFailure
OntologyService.putSchema(java.lang.String, java.lang.String)
public java.util.Set getSubClassesOf(java.lang.String className) throws UnknownConceptException, DirectoryFailure
OntologyService
getSubClassesOf
in interface OntologyService
className
- The name of the class
UnknownConceptException
DirectoryFailure
public java.util.Set getImmediateSubClassesOf(java.lang.String className) throws UnknownConceptException, DirectoryFailure
OntologyService
getImmediateSubClassesOf
in interface OntologyService
className
- The name of the class in Jena format
UnknownConceptException
DirectoryFailure
public java.util.Set getSubPropertiesOf(java.lang.String propertyName) throws UnknownConceptException, DirectoryFailure
OntologyService
getSubPropertiesOf
in interface OntologyService
propertyName
- The name of the property
UnknownConceptException
DirectoryFailure
public java.util.Set getSuperPropertiesOf(java.lang.String propertyName) throws UnknownConceptException, DirectoryFailure
OntologyService
getSuperPropertiesOf
in interface OntologyService
propertyName
- The name of the property
UnknownConceptException
DirectoryFailure
public java.util.Vector initiateActionClassTargets(java.lang.String actionClassName, java.lang.String actorClassName) throws DirectoryFailure
OntologyService
initiateActionClassTargets
in interface OntologyService
actionClassName
- the name of the action class performingactorClassName
- the name of the actor class performing the action
DirectoryFailure
public void loadOntology(java.lang.String loadedOWL) throws OntologyRepository.ReasoningException, DirectoryFailure
OntologyService
loadOntology
in interface OntologyService
loadedOWL
- string containing a syntactically correctly OWL
OntologyRepository.ReasoningException
- when loading of the ontology failed.
DirectoryFailure
public void loadOntology(java.lang.String myURL, boolean recursiveLoad) throws OntologyRepository.ReasoningException, java.io.IOException, DirectoryFailure
OntologyService
loadOntology
in interface OntologyService
recursiveLoad
- whether to load the OWL imported by the given URI
OntologyRepository.ReasoningException
- when loading of the ontology failed.
java.io.IOException
DirectoryFailure
public void loadOntology(SerializableOntModelImpl myOntModel, boolean recursiveLoad) throws OntologyRepository.ReasoningException, java.io.IOException
OntologyService
loadOntology
in interface OntologyService
myOntModel
- The object of type Jena OntModel containing the added ontologyrecursiveLoad
- Indicates if the imported ontologies (by the ontology contained in myOntModel) should also be recursively loaded.
OntologyRepository.ReasoningException
java.io.IOException
public void loadOntologies(java.util.List<SerializableOntModelImpl> myOntModels, boolean recursiveLoad) throws OntologyRepository.ReasoningException, java.io.IOException
OntologyService
loadOntologies
in interface OntologyService
recursiveLoad
- Indicates if the imported ontologies (by the ontology contained in myOntModel) should also be recursively loaded.
OntologyRepository.ReasoningException
java.io.IOException
public boolean testTrue(java.lang.String statement) throws QueryFailure, DirectoryFailure
OntologyService
testTrue
in interface OntologyService
statement
- the statement in KIF to be tested if true
QueryFailure
DirectoryFailure
public SerializableOntModelImpl getConstructedOntologyStructure(java.lang.String structureId) throws OntologyRepository.ReasoningException, UnknownConceptException, java.io.IOException, DirectoryFailure
OntologyService
getConstructedOntologyStructure
in interface OntologyService
OntologyRepository.ReasoningException
UnknownConceptException
java.io.IOException
DirectoryFailure
public java.util.List getConstructedOntologyStructures() throws DirectoryFailure
OntologyService
getConstructedOntologyStructures
in interface OntologyService
DirectoryFailure
public void removeConstructedOntologyStructure(java.lang.String structureId) throws DirectoryFailure
OntologyService
removeConstructedOntologyStructure
in interface OntologyService
DirectoryFailure
public void removeConstructedOntologyStructures(java.util.List<java.lang.String> structureIds) throws DirectoryFailure
OntologyService
removeConstructedOntologyStructures
in interface OntologyService
DirectoryFailure
protected void logMessage(java.lang.String msg, int logLevel)
protected void logMessage(java.lang.String msg, java.lang.Exception e, int logLevel)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |