org.dllearner.reasoning
Class ProtegeReasoner

java.lang.Object
  extended by org.dllearner.core.AbstractComponent
      extended by org.dllearner.core.AbstractReasonerComponent
          extended by org.dllearner.reasoning.ProtegeReasoner
All Implemented Interfaces:
BaseReasoner, Component, FuzzyIndividualReasoner, IndividualReasoner, Reasoner, ReasonerComponent, SchemaReasoner

public class ProtegeReasoner
extends AbstractReasonerComponent


Field Summary
 
Fields inherited from class org.dllearner.core.AbstractReasonerComponent
logger
 
Constructor Summary
ProtegeReasoner(Set<AbstractKnowledgeSource> sources)
           
ProtegeReasoner(Set<AbstractKnowledgeSource> sources, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
           
 
Method Summary
static Collection<ConfigOption<?>> createConfigOptions()
           
static void exportKBToOWL(File owlOutputFile, KB kb, org.semanticweb.owlapi.model.IRI ontologyIRI)
           
 String getBaseURI()
          Returns the base URI of the knowledge base.
 SortedSet<DatatypeProperty> getBooleanDatatypePropertiesImpl()
           
 Set<Description> getComplementClasses(Description desc)
           
 ProtegeReasonerConfigurator getConfigurator()
          For each component, a configurator class is generated in package org.dllearner.core.configurators using the script { org.dllearner.scripts.ConfigJavaGenerator}.
 Map<Individual,SortedSet<Constant>> getDatatypeMembersImpl(DatatypeProperty datatypeProperty)
           
 SortedSet<DatatypeProperty> getDatatypePropertiesImpl()
           
 Description getDomainImpl(DatatypeProperty datatypeProperty)
           
 Description getDomainImpl(ObjectProperty objectProperty)
           
 SortedSet<DatatypeProperty> getDoubleDatatypePropertiesImpl()
           
 Map<Individual,SortedSet<Double>> getDoubleValues(DatatypeProperty datatypeProperty)
           
 Set<NamedClass> getInconsistentClassesImpl()
           
 Set<org.semanticweb.owlapi.model.OWLClass> getInconsistentOWLClasses()
           
 SortedSet<Individual> getIndividuals()
          Gets all individuals in the knowledge base, e.g.
 SortedSet<Individual> getIndividualsImpl(Description concept)
           
 SortedSet<Individual> getIndividualsImplFast(Description description)
           
 SortedSet<Individual> getIndividualsImplStandard(Description concept)
           
 SortedSet<DatatypeProperty> getIntDatatypePropertiesImpl()
           
 Set<Constant> getLabelImpl(Entity entity)
           
 Set<org.semanticweb.owlapi.model.OWLOntology> getLoadedOWLAPIOntologies()
           
static String getName()
           
 Set<NamedClass> getNamedClasses()
          Gets all named classes in the knowledge base, e.g.
 Set<ObjectProperty> getObjectProperties()
          Gets all object properties in the knowledge base, e.g. hasChild, isCapitalOf, hasEngine.
 org.semanticweb.owlapi.model.OWLOntology getOWLAPIOntologies()
           
 org.semanticweb.owlapi.model.OWLDataFactory getOWLDataFactory()
           
 org.semanticweb.owlapi.model.OWLOntologyManager getOWLOntologyManager()
           
 Map<String,String> getPrefixes()
          Returns the prefixes used in the knowledge base, e.g. foaf for foaf: .
 Map<Individual,SortedSet<Individual>> getPropertyMembersImpl(ObjectProperty atomicRole)
           
 Description getRangeImpl(ObjectProperty objectProperty)
           
 ReasonerType getReasonerType()
          Gets the type of the underlying reasoner.
 Set<Individual> getRelatedIndividualsImpl(Individual individual, ObjectProperty objectProperty)
           
 Set<Constant> getRelatedValuesImpl(Individual individual, DatatypeProperty datatypeProperty)
           
 SortedSet<DatatypeProperty> getStringDatatypePropertiesImpl()
           
 Set<NamedClass> getTypesImpl(Individual individual)
           
 boolean hasTypeImpl(Description description, Individual individual)
           
 void init()
          Method to be called after the component has been configured.
 boolean isConsistent()
           
 boolean isSatisfiable(org.semanticweb.owlapi.model.OWLClassExpression d)
           
 boolean isSatisfiableImpl()
           
 boolean isSuperClassOfImpl(Description superConcept, Description subConcept)
           
 void releaseKB()
          Call this method to release the knowledge base.
 boolean remainsSatisfiableImpl(Axiom axiom)
           
 void setOWLReasoner(org.semanticweb.owlapi.reasoner.OWLReasoner owlReasoner)
           
 void setProgressMonitor(org.semanticweb.owlapi.reasoner.ReasonerProgressMonitor progressMonitor)
           
 
Methods inherited from class org.dllearner.core.AbstractReasonerComponent
changeSources, doubleRetrieval, getAssertedDefinitions, getAtomicConceptsList, getAtomicConceptsList, getAtomicRolesList, getBooleanDatatypeMembers, getBooleanDatatypeProperties, getClassHierarchy, getDatatypeMembers, getDatatypeProperties, getDatatypePropertyHierarchy, getDomain, getDomain, getDoubleDatatypeMembers, getDoubleDatatypeProperties, getFalseDatatypeMembers, getFuzzyIndividuals, getInconsistentClasses, getIndividuals, getInstanceCheckReasoningTimeNs, getIntDatatypeMembers, getIntDatatypeProperties, getLabel, getMostGeneralDatatypeProperties, getMostGeneralProperties, getMostSpecialDatatypeProperties, getMostSpecialProperties, getNrOfInstanceChecks, getNrOfMultiInstanceChecks, getNrOfMultiSubsumptionChecks, getNrOfRetrievals, getNrOfSubsumptionChecks, getNrOfSubsumptionHierarchyQueries, getObjectPropertyHierarchy, getObjectPropertyRelationships, getOverallReasoningTimeNs, getPropertyMembers, getRange, getRange, getRelatedIndividuals, getRelatedValues, getRetrievalReasoningTimeNs, getSources, getStringDatatypeMembers, getStringDatatypeProperties, getSubClasses, getSubProperties, getSubProperties, getSubsumptionReasoningTimeNs, getSuperClasses, getSuperProperties, getSuperProperties, getTimePerInstanceCheckNs, getTimePerRetrievalNs, getTimePerSubsumptionCheckNs, getTrueDatatypeMembers, getTypes, hasType, hasType, hasTypeFuzzyMembership, isEquivalentClass, isSatisfiable, isSuperClassOf, isSuperClassOf, prepareDatatypePropertyHierarchy, prepareRoleHierarchy, prepareSubsumptionHierarchy, remainsSatisfiable, resetStatistics, setUpdated, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProtegeReasoner

public ProtegeReasoner(Set<AbstractKnowledgeSource> sources)

ProtegeReasoner

public ProtegeReasoner(Set<AbstractKnowledgeSource> sources,
                       org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
Method Detail

isConsistent

public boolean isConsistent()

getReasonerType

public ReasonerType getReasonerType()
Description copied from class: AbstractReasonerComponent
Gets the type of the underlying reasoner. Although rarely necessary, applications can use this to adapt their behaviour to the reasoner.

Specified by:
getReasonerType in class AbstractReasonerComponent
Returns:
The reasoner type.

setProgressMonitor

public void setProgressMonitor(org.semanticweb.owlapi.reasoner.ReasonerProgressMonitor progressMonitor)

releaseKB

public void releaseKB()
Description copied from class: AbstractReasonerComponent
Call this method to release the knowledge base. Not calling the method may (depending on the underlying reasoner) result in resources for this knowledge base not being freed, which can cause memory leaks.

Specified by:
releaseKB in class AbstractReasonerComponent

getConfigurator

public ProtegeReasonerConfigurator getConfigurator()
Description copied from class: AbstractComponent
For each component, a configurator class is generated in package org.dllearner.core.configurators using the script { org.dllearner.scripts.ConfigJavaGenerator}. The configurator provides set and get methods for the configuration options of a component.

Specified by:
getConfigurator in class AbstractComponent
Returns:
An object allowing to configure this component.

createConfigOptions

public static Collection<ConfigOption<?>> createConfigOptions()
Returns:
The options of this component.

getOWLOntologyManager

public org.semanticweb.owlapi.model.OWLOntologyManager getOWLOntologyManager()

setOWLReasoner

public void setOWLReasoner(org.semanticweb.owlapi.reasoner.OWLReasoner owlReasoner)

init

public void init()
          throws ComponentInitException
Description copied from interface: Component
Method to be called after the component has been configured. Implementation of components can overwrite this method to perform setup and initialisation tasks for this component.

Throws:
ComponentInitException - This exception is thrown if any exceptions occur within the initialisation process of this component. As component developer, you are encouraged to rethrow occuring exception as ComponentInitException and giving an error message as well as the actualy exception by using the constructor ComponentInitException.ComponentInitException(String, Throwable).

getBaseURI

public String getBaseURI()
Description copied from interface: BaseReasoner
Returns the base URI of the knowledge base. If several knowledge sources are used, we only pick one of their base URIs.

Returns:
The base URI, e.g. http://dbpedia.org/resource/.

getIndividuals

public SortedSet<Individual> getIndividuals()
Description copied from interface: BaseReasoner
Gets all individuals in the knowledge base, e.g. Eric, London, Car829.

Returns:
All individuals in KB.

getNamedClasses

public Set<NamedClass> getNamedClasses()
Description copied from interface: BaseReasoner
Gets all named classes in the knowledge base, e.g. Person, City, Car.

Returns:
All named classes in KB.

getObjectProperties

public Set<ObjectProperty> getObjectProperties()
Description copied from interface: BaseReasoner
Gets all object properties in the knowledge base, e.g. hasChild, isCapitalOf, hasEngine.

Returns:
All object properties in KB.

getPrefixes

public Map<String,String> getPrefixes()
Description copied from interface: BaseReasoner
Returns the prefixes used in the knowledge base, e.g. foaf for foaf: . If several knowledge sources are used, their prefixes are merged. (In case a prefix is defined twice with different values, we pick one of those.)

Returns:
The prefix mapping.

getComplementClasses

public Set<Description> getComplementClasses(Description desc)

getDatatypePropertiesImpl

public SortedSet<DatatypeProperty> getDatatypePropertiesImpl()

isSuperClassOfImpl

public boolean isSuperClassOfImpl(Description superConcept,
                                  Description subConcept)

hasTypeImpl

public boolean hasTypeImpl(Description description,
                           Individual individual)
                    throws ReasoningMethodUnsupportedException
Throws:
ReasoningMethodUnsupportedException

getIndividualsImpl

public SortedSet<Individual> getIndividualsImpl(Description concept)
                                         throws ReasoningMethodUnsupportedException
Throws:
ReasoningMethodUnsupportedException

getIndividualsImplStandard

public SortedSet<Individual> getIndividualsImplStandard(Description concept)
                                                 throws ReasoningMethodUnsupportedException
Throws:
ReasoningMethodUnsupportedException

getIndividualsImplFast

public SortedSet<Individual> getIndividualsImplFast(Description description)
                                             throws ReasoningMethodUnsupportedException
Throws:
ReasoningMethodUnsupportedException

getTypesImpl

public Set<NamedClass> getTypesImpl(Individual individual)

isSatisfiableImpl

public boolean isSatisfiableImpl()

getDomainImpl

public Description getDomainImpl(ObjectProperty objectProperty)

getDomainImpl

public Description getDomainImpl(DatatypeProperty datatypeProperty)

getRangeImpl

public Description getRangeImpl(ObjectProperty objectProperty)

getPropertyMembersImpl

public Map<Individual,SortedSet<Individual>> getPropertyMembersImpl(ObjectProperty atomicRole)

getRelatedIndividualsImpl

public Set<Individual> getRelatedIndividualsImpl(Individual individual,
                                                 ObjectProperty objectProperty)

getRelatedValuesImpl

public Set<Constant> getRelatedValuesImpl(Individual individual,
                                          DatatypeProperty datatypeProperty)

getDoubleValues

public Map<Individual,SortedSet<Double>> getDoubleValues(DatatypeProperty datatypeProperty)

getDatatypeMembersImpl

public Map<Individual,SortedSet<Constant>> getDatatypeMembersImpl(DatatypeProperty datatypeProperty)

exportKBToOWL

public static void exportKBToOWL(File owlOutputFile,
                                 KB kb,
                                 org.semanticweb.owlapi.model.IRI ontologyIRI)

getBooleanDatatypePropertiesImpl

public SortedSet<DatatypeProperty> getBooleanDatatypePropertiesImpl()
Returns:
the booleanDatatypeProperties

getDoubleDatatypePropertiesImpl

public SortedSet<DatatypeProperty> getDoubleDatatypePropertiesImpl()
Returns:
the doubleDatatypeProperties

getIntDatatypePropertiesImpl

public SortedSet<DatatypeProperty> getIntDatatypePropertiesImpl()
Returns:
the intDatatypeProperties

getStringDatatypePropertiesImpl

public SortedSet<DatatypeProperty> getStringDatatypePropertiesImpl()
Returns:
the intDatatypeProperties

getOWLAPIOntologies

public org.semanticweb.owlapi.model.OWLOntology getOWLAPIOntologies()

getInconsistentClassesImpl

public Set<NamedClass> getInconsistentClassesImpl()

getInconsistentOWLClasses

public Set<org.semanticweb.owlapi.model.OWLClass> getInconsistentOWLClasses()

getLabelImpl

public Set<Constant> getLabelImpl(Entity entity)

remainsSatisfiableImpl

public boolean remainsSatisfiableImpl(Axiom axiom)

getLoadedOWLAPIOntologies

public Set<org.semanticweb.owlapi.model.OWLOntology> getLoadedOWLAPIOntologies()

getOWLDataFactory

public org.semanticweb.owlapi.model.OWLDataFactory getOWLDataFactory()

isSatisfiable

public boolean isSatisfiable(org.semanticweb.owlapi.model.OWLClassExpression d)

getName

public static String getName()


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann