|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OntologyRepositoryService
Defines the operations enabling loading and managing ontologies in the ontology repository. Currently the interface enables only addition of ontologies. This should be update in the future with method enabling removing of the ontology and restarting the repository
Method Summary | |
---|---|
void |
addFilteredNamespace(java.lang.String namespace)
This method add a namespace to the set of urls depicting ontology namespaces concept of which are filtered out when returned by methods of this repository. |
boolean |
areClassesDisjoint(java.lang.String firstClass,
java.lang.String secondClass)
Test if two provided classes are disjoint |
java.util.Set<java.lang.String> |
askQuery(java.lang.String variableName,
java.lang.String multiplyVariablesQuery)
Get values of the selected variable satisfying the KIF query with possibly many variable. |
java.util.Set<java.lang.String> |
getAllNamespaces()
This method returns a set of urls depicting ontologies loaded into the JTP as well namespaces used internally by KAoS. |
java.util.Set<java.lang.String> |
getClassesDefInNamespace(java.lang.String namespaceName)
Get set of classes defined in the given namespace. |
SerializableOntModelImpl |
getConstructedOntologyStructure(java.lang.String structureId)
This method get stored ontology structure references by its id in the repository. |
java.util.List<SerializableOntModelImpl> |
getConstructedOntologyStructures()
This method retrieves all user defined ontology structures in the repository. |
java.util.Set<java.lang.String> |
getFilteredNamespaces()
This method returns a set of urls depicting ontology namespaces concept of which are filtered out when returned by methods of this repository. |
java.util.Set<java.lang.String> |
getImmediateSubClassesOf(java.lang.String className)
Get set of immediate subclasses of the given class. |
java.util.Set<java.lang.String> |
getInstancesDefInNamespace(java.lang.String namespaceName)
Get set of instances defined in the given namespace. |
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> |
getNamspacesImportedByNamespace(java.lang.String namespaceName)
Get set of namespaces imported by the given namespace. |
java.util.List<java.lang.String> |
getPropertiesApplicableTo(java.lang.String className)
Get set of properties defined in the given namespace. |
java.util.Set<java.lang.String> |
getPropertiesDefInNamespace(java.lang.String namespaceName)
Get set of properties defined in the given namespace. |
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.Set<java.lang.String> |
getResourcesWithValueForProperty(java.lang.String property,
java.lang.String value)
Get values of the variable satisfying the KIF query: (property ?subject value). |
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> |
getSuperClassesOf(java.lang.String className)
Get set of superclasses of the given class. |
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.lang.String |
getUniqueValueForProperty(java.lang.String property,
java.lang.String subject)
Get a single value of the variable satisfying the KIF query: (property subject ?val). |
java.util.Set<java.lang.String> |
getValuesForProperty(java.lang.String property,
java.lang.String subject)
Get values of the variable satisfying the KIF query: (property subject ?val). |
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 myURL,
boolean recursiveLoad)
Loads ontology from the provided url. |
void |
putConstructedOntologyStructures(java.util.List<SerializableOntModelImpl> ontologyStructureList)
This method stores multiple ontology structures in the repository. |
void |
removeFilteredNamespace(java.lang.String namespace)
This method remove a namespace from the set of urls depicting ontology namespaces concept of which are filtered out when returned by methods of this 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 interface kaos.core.csi.ontology.OntologyService |
---|
getListOfLoadedOntologies, getOntologyDefinitionForConcept, getSchema, getSubPropertiesOf, initiateActionClassTargets, loadOntology, putSchema, removeConstructedOntologyStructure, removeConstructedOntologyStructures |
Method Detail |
---|
java.util.Set<java.lang.String> getAllNamespaces() throws DirectoryFailure
DirectoryFailure
java.util.Set<java.lang.String> getFilteredNamespaces() throws DirectoryFailure
DirectoryFailure
void addFilteredNamespace(java.lang.String namespace) throws DirectoryFailure
namespace
- The name of the namespace
DirectoryFailure
void removeFilteredNamespace(java.lang.String namespace) throws DirectoryFailure
namespace
- The name of the namespace
DirectoryFailure
java.util.List<SerializableOntModelImpl> getConstructedOntologyStructures() throws DirectoryFailure
getConstructedOntologyStructures
in interface OntologyService
DirectoryFailure
void putConstructedOntologyStructures(java.util.List<SerializableOntModelImpl> ontologyStructureList) throws OntologyRepository.ReasoningException, java.io.IOException, DirectoryFailure
ontologyStructureList
- a list containing SerializableOntModelImpl objects.
ReasoningException,
- IOException, DirectoryFailure when putting of the ontology structures failed.
OntologyRepository.ReasoningException
java.io.IOException
DirectoryFailure
SerializableOntModelImpl getConstructedOntologyStructure(java.lang.String structureId) throws OntologyRepository.ReasoningException, UnknownConceptException, java.io.IOException, DirectoryFailure
getConstructedOntologyStructure
in interface OntologyService
structureId
- ontology structure id
OntologyRepository.ReasoningException
- or IOException when loading of the ontology failed.
structureId
- when the id is not registered.
UnknownConceptException
java.io.IOException
DirectoryFailure
void loadOntology(SerializableOntModelImpl myOntModel, boolean recursiveLoad) throws OntologyRepository.ReasoningException, java.io.IOException
loadOntology
in interface OntologyService
myOntModel
- The object of type SerializableOntModelImpl containing the added ontologyrecursiveLoad
- Indicates if the imported ontologies (by the ontology contained in myOntModel) should also be recursively loaded.
jtp.InconsistencyException
- when loading of the ontology failed.
OntologyRepository.ReasoningException
java.io.IOException
void loadOntologies(java.util.List<SerializableOntModelImpl> myOntModels, boolean recursiveLoad) throws OntologyRepository.ReasoningException, java.io.IOException
loadOntologies
in interface OntologyService
myOntModel
- The object of type SerializableOntModelImpl containing the added ontologyrecursiveLoad
- Indicates if the imported ontologies (by the ontology contained in myOntModel) should also be recursively loaded.
jtp.InconsistencyException
- when loading of the ontology failed.
OntologyRepository.ReasoningException
java.io.IOException
void loadOntology(java.lang.String myURL, boolean recursiveLoad) throws OntologyRepository.ReasoningException, java.io.IOException, DirectoryFailure
loadOntology
in interface OntologyService
myURL
- The url to the ontologyrecursiveLoad
- Indicates if the imported ontologies (by the ontology depicted by myURL) should also be recursively loaded.
jtp.InconsistencyException
- when loading of the ontology failed.
OntologyRepository.ReasoningException
- when loading of the ontology failed.
java.io.IOException
DirectoryFailure
java.util.Set<java.lang.String> getInstancesOf(java.lang.String conceptName) throws UnknownConceptException, DirectoryFailure
getInstancesOf
in interface OntologyService
conceptName
- The name of the concept in the Jena format
UnknownConceptException
- if conceptName is unknown for the ontology repository
DirectoryFailure
java.util.Set<java.lang.String> getSuperClassesOf(java.lang.String className) throws UnknownConceptException, DirectoryFailure
className
- The name of the class in the Jena format
UnknownConceptException
- if className is unknown for the ontology repository
DirectoryFailure
java.util.Set<java.lang.String> getSubClassesOf(java.lang.String className) throws UnknownConceptException, DirectoryFailure
getSubClassesOf
in interface OntologyService
className
- The name of the class in Jena format
UnknownConceptException
- if className is unknown for the ontology repository
DirectoryFailure
java.util.Set<java.lang.String> getImmediateSubClassesOf(java.lang.String className) throws UnknownConceptException, DirectoryFailure
getImmediateSubClassesOf
in interface OntologyService
className
- The name of the class in Jena format
UnknownConceptException
- if className is unknown for the ontology repository
DirectoryFailure
java.util.Set<java.lang.String> getSuperPropertiesOf(java.lang.String propertyName) throws UnknownConceptException, DirectoryFailure
getSuperPropertiesOf
in interface OntologyService
propertyName
- The name of the property in Jena format
java.lang.Exception
- if propertyName is unknown for the ontology repository
UnknownConceptException
DirectoryFailure
boolean testTrue(java.lang.String statement) throws QueryFailure, DirectoryFailure
testTrue
in interface OntologyService
statement
- to test
QueryFailure
- if reasoning failed.
DirectoryFailure
java.lang.String getUniqueValueForProperty(java.lang.String property, java.lang.String subject) throws QueryFailure, DirectoryFailure
property
- the name of the property in the Jena formatsubject
- the name of the subject in the Jena format
QueryFailure
- if reasoning failed.
DirectoryFailure
java.util.Set<java.lang.String> getValuesForProperty(java.lang.String property, java.lang.String subject) throws QueryFailure, DirectoryFailure
getValuesForProperty
in interface OntologyService
property
- the name of the property in the Jena formatsubject
- the name of the subject in the Jena format
QueryFailure
- if reasoning failed.
DirectoryFailure
java.util.Set<java.lang.String> getResourcesWithValueForProperty(java.lang.String property, java.lang.String value) throws QueryFailure, DirectoryFailure
property
- the name of the property in the Jena formatvalue
- the value as a string in th Jena format
QueryFailure
- if reasoning failed.
DirectoryFailure
java.util.List<java.lang.String> getPropertiesApplicableTo(java.lang.String className) throws QueryFailure, UnknownConceptException, DirectoryFailure
getPropertiesApplicableTo
in interface OntologyService
className
- the name of the class
UnknownConceptException
- if className is unknow for the ontology repository
QueryFailure
DirectoryFailure
java.lang.String getRangeOnPropertyForClass(java.lang.String className, java.lang.String propertyName) throws QueryFailure, UnknownConceptException, DirectoryFailure
getRangeOnPropertyForClass
in interface OntologyService
className
- the name of the classpropertyName
- the name of the property
UnknownConceptException
- if reasoning failed.
QueryFailure
DirectoryFailure
java.util.Set<java.lang.String> askQuery(java.lang.String variableName, java.lang.String multiplyVariablesQuery) throws QueryFailure, DirectoryFailure
variableName
- the name of the selected variablemultiplyVariablesQuery
- the query
QueryFailure
- if reasoning failed.
DirectoryFailure
boolean areClassesDisjoint(java.lang.String firstClass, java.lang.String secondClass) throws QueryFailure, DirectoryFailure
firstClass
- the name of the first classsecondClass
- the name of the second class
QueryFailure
- if reasoning failed.
DirectoryFailure
java.util.Set<java.lang.String> getClassesDefInNamespace(java.lang.String namespaceName) throws UnknownNamespaceException, DirectoryFailure
namespaceName
- The name of the namespace in the Jena format
UnknownNamespaceException
- if namespaceName is unknown for the ontology repository
DirectoryFailure
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
java.util.Set<java.lang.String> getPropertiesDefInNamespace(java.lang.String namespaceName) throws UnknownNamespaceException, DirectoryFailure
namespaceName
- The name of the namespace in the Jena format
UnknownNamespaceException
- if namespaceName is unknown for the ontology repository
DirectoryFailure
java.util.Set<java.lang.String> getInstancesDefInNamespace(java.lang.String namespaceName) throws UnknownNamespaceException, DirectoryFailure
namespaceName
- The name of the namespace in the Jena format
UnknownNamespaceException
- if namespaceName is unknown for the ontology repository
DirectoryFailure
java.util.Set<java.lang.String> getNamspacesImportedByNamespace(java.lang.String namespaceName) throws UnknownNamespaceException, DirectoryFailure
namespaceName
- The name of the namespace in the Jena format
UnknownNamespaceException
- if namespaceName is unknown for the ontology repository
DirectoryFailure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |