org.dllearner.reasoning
Class FastRetrievalReasoner

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

public class FastRetrievalReasoner
extends AbstractReasonerComponent

Reasoner for fast retrieval inference (other tasks redirected to OWL API reasoner). Not actively used anymore.

Author:
Jens Lehmann

Field Summary
 
Fields inherited from class org.dllearner.core.AbstractReasonerComponent
logger
 
Constructor Summary
FastRetrievalReasoner(FlatABox abox)
           
FastRetrievalReasoner(Set<AbstractKnowledgeSource> sources)
           
 
Method Summary
<T> void
applyConfigEntry(ConfigEntry<T> entry)
          Applies a configuration option to this component.
 SortedSetTuple<Individual> doubleRetrievalImpl(Description concept)
           
 String getBaseURI()
          Returns the base URI of the knowledge base.
 FastRetrievalReasonerConfigurator getConfigurator()
          For each component, a configurator class is generated in package org.dllearner.core.configurators using the script { org.dllearner.scripts.ConfigJavaGenerator}.
 FlatABox getFlatAbox()
           
 SortedSet<Individual> getIndividuals()
          Gets all individuals in the knowledge base, e.g.
 SortedSet<Individual> getIndividualsImpl(Description concept)
           
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.
 Map<String,String> getPrefixes()
          Returns the prefixes used in the knowledge base, e.g. foaf for foaf: .
 ReasonerType getReasonerType()
          Gets the type of the underlying reasoner.
 boolean hasTypeImpl(Description concept, Individual individual)
           
 void init()
          Method to be called after the component has been configured.
 boolean isSatisfiableImpl()
           
 boolean isSuperClassOfImpl(Description superConcept, Description subConcept)
           
 void releaseKB()
          Call this method to release the knowledge base.
 
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 org.dllearner.core.AbstractComponent
createConfigOptions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FastRetrievalReasoner

public FastRetrievalReasoner(Set<AbstractKnowledgeSource> sources)

FastRetrievalReasoner

public FastRetrievalReasoner(FlatABox abox)
Method Detail

getConfigurator

public FastRetrievalReasonerConfigurator 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.

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.

doubleRetrievalImpl

public SortedSetTuple<Individual> doubleRetrievalImpl(Description concept)

getIndividualsImpl

public SortedSet<Individual> getIndividualsImpl(Description concept)

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.

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.

getFlatAbox

public FlatABox getFlatAbox()

isSuperClassOfImpl

public boolean isSuperClassOfImpl(Description superConcept,
                                  Description subConcept)

isSatisfiableImpl

public boolean isSatisfiableImpl()

hasTypeImpl

public boolean hasTypeImpl(Description concept,
                           Individual individual)

getName

public static String getName()

applyConfigEntry

public <T> void applyConfigEntry(ConfigEntry<T> entry)
                      throws InvalidConfigOptionValueException
Description copied from class: AbstractComponent
Applies a configuration option to this component. Implementations of components should use option and value of the config entry to perform an action (usually setting an internal variable to an appropriate value). Since the availability of configurators, it is optional for components to implement this method. Instead of using this method to take an action based on a configuration value, components can also use the getters defined in the components configurator. Important note: Never call this method directly. All calls are done via the ComponentManager.

Type Parameters:
T - Type of the config entry (Integer, String etc.).
Parameters:
entry - A configuration entry.
Throws:
InvalidConfigOptionValueException - This exception is thrown if the value of the config entry is not valid. For instance, a config option may only accept values, which are within intervals 0.1 to 0.3 or 0.5 to 0.8. If the value is outside of those intervals, an exception is thrown. Note that many of the common cases are already caught in the constructor of ConfigEntry (for instance for a DoubleConfigOption you can specify an interval for the value). This means that, as a component developer, you often do not need to implement further validity checks.
See Also:
AbstractComponent.getConfigurator()

init

public void init()
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.


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/.

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.

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


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