| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaos.ontology.repository.OntologyRepositoryCommons
kaos.ontology.repository.OWLapiOntologyRepository
public class OWLapiOntologyRepository
This class contains the JPT ontology repository and provides method to load new ontologies, manage ontologies and query the ontology knowledge base.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from interface kaos.ontology.repository.OntologyRepository | 
|---|
| OntologyRepository.ReasoningException | 
| Field Summary | 
|---|
| Constructor Summary | |
|---|---|
| OWLapiOntologyRepository() | |
| OWLapiOntologyRepository(boolean loadDefaultOntologies) | |
| Method Summary | |
|---|---|
|  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> | getClassesDefInNamespace(java.lang.String namespaceName)Get set of classes defined in the given namespace. | 
|  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> | 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.Set<java.lang.String> | getOntologyDefinitionForConcept(java.lang.String conceptName)Get mapping to the urls of ontology concept for the given concept name. | 
|  java.util.List<java.lang.String> | getPropertiesApplicableTo(java.lang.String className)Get properties applicable to the given class | 
|  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> | getSubPropertiesOf(java.lang.String propertyName)Get set of subproperties of the given property. | 
|  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 super properties of the given property. | 
|  java.util.Set<java.lang.String> | getUltimateOntologyTypesOfIndividual(java.lang.String individualName)Finds the ultimate Ontology type of the provided individual, from the ontologies explicitly loaded into repository | 
|  javax.swing.undo.UndoManager | getUndoManager()Get the undo manager for reasoning inference. | 
|  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 subjectStr)Get values of the variable satisfying the KIF query: (property subject ?val). | 
|  void | loadKB(java.net.URL url)Stores the assertion as well as its forward-chained information. | 
| static void | main(java.lang.String[] args) | 
|  int | tellKifString(java.lang.String assertion)Stores the assertion as well as its forward-chained information. | 
|  int | tellOwlString(java.lang.String assertion)Stores the assertion as well as its forward-chained information. | 
|  boolean | testTrue(java.lang.String statement)Test if the KIF statement is true according to the ontologies in the ontology repository. | 
|  void | untellKifString(java.lang.String assertion)Deletes the assertion as well as its forward-chained information. | 
|  void | untellOwlString(java.lang.String assertion)Deletes the assertion as well as its forward-chained information. | 
| Methods inherited from class kaos.ontology.repository.OntologyRepositoryCommons | 
|---|
| addFilteredNamespace, filterConcept, filterConcepts, flushCaches, getAllNamespaces, getFilteredNamespaces, getListOfLoadedOntologies, initFilteredNamespaces, initiateClassProperties, loadOntology, loadOntology, printDebugString, removeFilteredNamespace, resetOntologyLoader, setNotificationRef | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface kaos.ontology.repository.OntologyRepository | 
|---|
| addFilteredNamespace, getAllNamespaces, getFilteredNamespaces, getListOfLoadedOntologies, initiateClassProperties, loadOntology, loadOntology, removeFilteredNamespace, resetOntologyLoader, setNotificationRef | 
| Constructor Detail | 
|---|
public OWLapiOntologyRepository()
public OWLapiOntologyRepository(boolean loadDefaultOntologies)
| Method Detail | 
|---|
public java.util.Set<java.lang.String> askQuery(java.lang.String variableName,
                                                java.lang.String multiplyVariablesQuery)
                                         throws OntologyRepository.ReasoningException
OntologyRepository
askQuery in interface OntologyRepositoryvariableName - the name of the selected variablemultiplyVariablesQuery - the query
OntologyRepository.ReasoningException - if reasoning failed.
public java.util.Set<java.lang.String> getClassesDefInNamespace(java.lang.String namespaceName)
                                                         throws UnknownNamespaceException
OntologyRepository
getClassesDefInNamespace in interface OntologyRepositorynamespaceName - The name of the namespace in the Jena format
UnknownNamespaceException - if namespaceName is unknown for the ontology repository
public java.util.Set<java.lang.String> getImmediateSubClassesOf(java.lang.String className)
                                                         throws UnknownConceptException
OntologyRepository
getImmediateSubClassesOf in interface OntologyRepositoryclassName - The name of the class in Jena format
UnknownConceptException
public java.util.Set<java.lang.String> getInstancesDefInNamespace(java.lang.String namespaceName)
                                                           throws UnknownNamespaceException
OntologyRepository
getInstancesDefInNamespace in interface OntologyRepositorynamespaceName - The name of the namespace in the Jena format
UnknownNamespaceException - if namespaceName is unknown for the ontology repository
public java.util.Set<java.lang.String> getInstancesOf(java.lang.String conceptName)
                                               throws UnknownConceptException
OntologyRepository
getInstancesOf in interface OntologyRepositoryconceptName - The name of the concept in the Jena format
UnknownConceptException - if forActor is unknown for the ontology repository
public java.util.Set<java.lang.String> getNamspacesImportedByNamespace(java.lang.String namespaceName)
                                                                throws UnknownNamespaceException
OntologyRepository
getNamspacesImportedByNamespace in interface OntologyRepositorynamespaceName - The name of the namespace in the Jena format
UnknownNamespaceException - if namespaceName is unknown for the ontology repositorypublic java.util.Set<java.lang.String> getOntologyDefinitionForConcept(java.lang.String conceptName)
OntologyRepository
getOntologyDefinitionForConcept in interface OntologyRepositoryconceptName - The name of the namespace in the Jena format
public java.util.List<java.lang.String> getPropertiesApplicableTo(java.lang.String className)
                                                           throws OntologyRepository.ReasoningException
OntologyRepository
getPropertiesApplicableTo in interface OntologyRepositoryclassName - the name of the class
OntologyRepository.ReasoningException - if reasoning failed.
public java.util.Set<java.lang.String> getPropertiesDefInNamespace(java.lang.String namespaceName)
                                                            throws UnknownNamespaceException
OntologyRepository
getPropertiesDefInNamespace in interface OntologyRepositorynamespaceName - The name of the namespace in the Jena format
UnknownNamespaceException - if namespaceName is unknown for the ontology repository
public java.lang.String getRangeOnPropertyForClass(java.lang.String className,
                                                   java.lang.String propertyName)
                                            throws OntologyRepository.ReasoningException
OntologyRepository
getRangeOnPropertyForClass in interface OntologyRepositoryclassName - the name of the classpropertyName - the name of the property
OntologyRepository.ReasoningException - if reasoning failed.
public java.util.Set<java.lang.String> getResourcesWithValueForProperty(java.lang.String property,
                                                                        java.lang.String value)
                                                                 throws OntologyRepository.ReasoningException
OntologyRepository
getResourcesWithValueForProperty in interface OntologyRepositoryproperty - the name of the propertyvalue - the value
OntologyRepository.ReasoningException - if reasoning failed.
public java.util.Set<java.lang.String> getSubClassesOf(java.lang.String className)
                                                throws UnknownConceptException
OntologyRepository
getSubClassesOf in interface OntologyRepositoryclassName - The name of the class in Jena format
UnknownConceptException - if className is unknown for the ontology repository
public java.util.Set<java.lang.String> getSubPropertiesOf(java.lang.String propertyName)
                                                   throws UnknownConceptException
OntologyRepository
getSubPropertiesOf in interface OntologyRepositorypropertyName - The name of the property in Jena format
UnknownConceptException
public java.util.Set<java.lang.String> getSuperClassesOf(java.lang.String className)
                                                  throws UnknownConceptException
OntologyRepository
getSuperClassesOf in interface OntologyRepositoryclassName - The name of the class in Jena format
UnknownConceptException - if className is unknown for the ontology repository
public java.util.Set<java.lang.String> getSuperPropertiesOf(java.lang.String propertyName)
                                                     throws UnknownConceptException
OntologyRepository
getSuperPropertiesOf in interface OntologyRepositorypropertyName - The name of the property in Jena format
UnknownConceptException
public java.util.Set<java.lang.String> getUltimateOntologyTypesOfIndividual(java.lang.String individualName)
                                                                     throws UnknownConceptException
OntologyRepository
getUltimateOntologyTypesOfIndividual in interface OntologyRepositoryindividualName - the name of the individual
UnknownConceptExceptionpublic javax.swing.undo.UndoManager getUndoManager()
OntologyRepository
getUndoManager in interface OntologyRepository
public java.lang.String getUniqueValueForProperty(java.lang.String property,
                                                  java.lang.String subject)
                                           throws OntologyRepository.ReasoningException
OntologyRepository
getUniqueValueForProperty in interface OntologyRepositoryproperty - the name of the propertysubject - the name of the subject
OntologyRepository.ReasoningException - if reasoning failed.
public java.util.Set<java.lang.String> getValuesForProperty(java.lang.String property,
                                                            java.lang.String subjectStr)
                                                     throws OntologyRepository.ReasoningException
OntologyRepository
getValuesForProperty in interface OntologyRepositoryproperty - the name of the propertysubjectStr - the name of the subject
OntologyRepository.ReasoningException - if reasoning failed.
public void loadKB(java.net.URL url)
            throws OntologyRepository.ReasoningException,
                   java.io.IOException
OntologyRepository
loadKB in interface OntologyRepositoryurl - - a url to a file containing KIF-formatted string to assert
OntologyRepository.ReasoningException
java.io.IOException
public int tellKifString(java.lang.String assertion)
                  throws OntologyRepository.ReasoningException
OntologyRepository
tellKifString in interface OntologyRepositoryassertion - - a KIF-formatted string to assert
OntologyRepository.ReasoningException
public int tellOwlString(java.lang.String assertion)
                  throws OntologyRepository.ReasoningException
OntologyRepository
tellOwlString in interface OntologyRepositoryassertion - - OWL string to assert
OntologyRepository.ReasoningException
public boolean testTrue(java.lang.String statement)
                 throws OntologyRepository.ReasoningException
OntologyRepository
testTrue in interface OntologyRepositorystatement - the statement in KIF to be tested if true
OntologyRepository.ReasoningException - if reasoning failed.
public void untellKifString(java.lang.String assertion)
                     throws OntologyRepository.ReasoningException
OntologyRepository
untellKifString in interface OntologyRepositoryassertion - - a KIF-formatted string to untell
OntologyRepository.ReasoningException
public void untellOwlString(java.lang.String assertion)
                     throws OntologyRepository.ReasoningException
OntologyRepository
untellOwlString in interface OntologyRepositoryassertion - - a OWL-formatted string to untell
OntologyRepository.ReasoningException
public static void main(java.lang.String[] args)
                 throws java.lang.Exception
java.lang.Exception| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||