org.dllearner.core
Interface IndividualReasoner

All Known Subinterfaces:
Reasoner
All Known Implementing Classes:
AbstractReasonerComponent, DIGReasoner, FastInstanceChecker, FastRetrievalReasoner, FuzzyOWLAPIReasoner, OWLAPIReasoner, PelletReasoner, ProtegeReasoner, SPARQLReasoner

public interface IndividualReasoner

Reasoning requests/queries related to individuals in the knowledge base.

Author:
Jens Lehmann

Method Summary
 SortedSetTuple<Individual> doubleRetrieval(Description description)
          Performs a query for all instances of the given class description and its negation.
 Map<Individual,SortedSet<Boolean>> getBooleanDatatypeMembers(DatatypeProperty datatypeProperty)
          Convenience method, which can be used if it is known that the property has values which can be parsed as boolean value.
 Map<Individual,SortedSet<Constant>> getDatatypeMembers(DatatypeProperty datatypeProperty)
          Computes and returns all connections between individuals and values through the specified property, e.g.
 Map<Individual,SortedSet<Double>> getDoubleDatatypeMembers(DatatypeProperty datatypeProperty)
          Convenience method, which can be used if it is known that the property has values which can be parsed as double.
 SortedSet<Individual> getFalseDatatypeMembers(DatatypeProperty datatypeProperty)
          Convenience method, which can be used to get all individuals, which have value "false" for the given property.
 SortedSet<Individual> getIndividuals(Description description)
          Gets all instances of a given class description in the knowledge base.
 Map<Individual,SortedSet<Integer>> getIntDatatypeMembers(DatatypeProperty datatypeProperty)
          Convenience method, which can be used if it is known that the property has values which can be parsed as integer.
 Map<ObjectProperty,Set<Individual>> getObjectPropertyRelationships(Individual individual)
          A map of properties related to an individual, e.g.
 Map<Individual,SortedSet<Individual>> getPropertyMembers(ObjectProperty objectProperty)
          Computes and returns all connections between individuals through the specified property, e.g.
 Set<Individual> getRelatedIndividuals(Individual individual, ObjectProperty objectProperty)
          Returns the set of individuals, which are connect to the given individual with the specified object property.
 Set<Constant> getRelatedValues(Individual individual, DatatypeProperty datatypeProperty)
          Returns the set of individuals, which are connect to the given individual with the specified data property.
 Map<Individual,SortedSet<String>> getStringDatatypeMembers(DatatypeProperty datatypeProperty)
          Convenience method, which can be used which returns the property values as strings (note that any literal can be represented as string, even numbers).
 SortedSet<Individual> getTrueDatatypeMembers(DatatypeProperty datatypeProperty)
          Convenience method, which can be used to get all individuals, which have value "true" for the given property.
 Set<NamedClass> getTypes(Individual individual)
          Returns types of an individual, i.e. those classes where the individual is instance of.
 boolean hasType(Description description, Individual individual)
          Checks whether individual is instance of description.
 SortedSet<Individual> hasType(Description description, Set<Individual> individuals)
          Performs instance checks on a set of instances (reasoners might be more efficient than handling each check separately).
 

Method Detail

getTypes

Set<NamedClass> getTypes(Individual individual)
Returns types of an individual, i.e. those classes where the individual is instance of. For instance, the individual eric could have type Person.

Parameters:
individual - An individual in the knowledge base.
Returns:
Types this individual is instance of.

hasType

boolean hasType(Description description,
                Individual individual)
Checks whether individual is instance of description. For instance, "Leipzig" may be an instance of "City".

Parameters:
description - An OWL class description.
individual - An individual.
Returns:
True if the instance has the description as type and false otherwise.

hasType

SortedSet<Individual> hasType(Description description,
                              Set<Individual> individuals)
Performs instance checks on a set of instances (reasoners might be more efficient than handling each check separately).

Parameters:
description - An OWL class description.
individuals - An individual.
Returns:
The subset of those instances, which have the given type.

getIndividuals

SortedSet<Individual> getIndividuals(Description description)
Gets all instances of a given class description in the knowledge base.

Parameters:
description - An OWL class description.
Returns:
All instances of the class description.

doubleRetrieval

SortedSetTuple<Individual> doubleRetrieval(Description description)
Performs a query for all instances of the given class description and its negation. (Note that in OWL it is possible that the reasoner can neither deduce that an individual is instance of a class nor its negation.) This method might be more efficient that performing a two retrievals.

Parameters:
description - An OWL class description.
Returns:
All instances of the class description and its negation.

getRelatedIndividuals

Set<Individual> getRelatedIndividuals(Individual individual,
                                      ObjectProperty objectProperty)
Returns the set of individuals, which are connect to the given individual with the specified object property.

Parameters:
individual - An individual, e.g. eric.
objectProperty - An object property, e.g. hasChild.
Returns:
A set of individuals, e.g. {anna, maria}.

getRelatedValues

Set<Constant> getRelatedValues(Individual individual,
                               DatatypeProperty datatypeProperty)
Returns the set of individuals, which are connect to the given individual with the specified data property.

Parameters:
individual - An individual, e.g. eric.
datatyoeProperty - A data property, e.g. hasIncome.
Returns:
A set of individuals, e.g. {48000^^xsd:int}.

getObjectPropertyRelationships

Map<ObjectProperty,Set<Individual>> getObjectPropertyRelationships(Individual individual)
A map of properties related to an individual, e.g. {hasChild => {eric,anna}, hasSibling => {sebastian}}.

Parameters:
individual - An individual.
Returns:
A map of of properties connected to the individual as keys and the individuals they point to as values.

getPropertyMembers

Map<Individual,SortedSet<Individual>> getPropertyMembers(ObjectProperty objectProperty)
Computes and returns all connections between individuals through the specified property, e.g. {eric => {maria, anna}, anna => {eric}}.

Parameters:
objectProperty - An object property.
Returns:
The mapping of individuals to other individuals through this object property.

getDatatypeMembers

Map<Individual,SortedSet<Constant>> getDatatypeMembers(DatatypeProperty datatypeProperty)
Computes and returns all connections between individuals and values through the specified property, e.g. {eric => {48000^^xsd:int}, sarah => {56000^^xsd:int}}.

Parameters:
datatypeProperty - A data property.
Returns:
The mapping between individuals and values through the given property.

getDoubleDatatypeMembers

Map<Individual,SortedSet<Double>> getDoubleDatatypeMembers(DatatypeProperty datatypeProperty)
Convenience method, which can be used if it is known that the property has values which can be parsed as double.

Parameters:
datatypeProperty - A data property.
Returns:
The mapping between individuals and double values through the given property.
See Also:
getDatatypeMembers(DatatypeProperty), Double.valueOf(String)

getIntDatatypeMembers

Map<Individual,SortedSet<Integer>> getIntDatatypeMembers(DatatypeProperty datatypeProperty)
Convenience method, which can be used if it is known that the property has values which can be parsed as integer.

Parameters:
datatypeProperty - A data property.
Returns:
The mapping between individuals and integer values through the given property.
See Also:
getDatatypeMembers(DatatypeProperty), Integer.valueOf(String)

getBooleanDatatypeMembers

Map<Individual,SortedSet<Boolean>> getBooleanDatatypeMembers(DatatypeProperty datatypeProperty)
Convenience method, which can be used if it is known that the property has values which can be parsed as boolean value. Only "true" or "false" are accepted. If other values occur, a warning will be issued.

Parameters:
datatypeProperty - A data property.
Returns:
The mapping between individuals and boolean values through the given property.
See Also:
getDatatypeMembers(DatatypeProperty)

getTrueDatatypeMembers

SortedSet<Individual> getTrueDatatypeMembers(DatatypeProperty datatypeProperty)
Convenience method, which can be used to get all individuals, which have value "true" for the given property. Usually, data properties can have several values for a given individual, but this method will throw a runtime exception if this is the case (i.e. the set of values is {"true", "false"}).

Parameters:
datatypeProperty - A data property.
Returns:
The set of individuals for which the boolean property holds.
See Also:
getDatatypeMembers(DatatypeProperty)

getFalseDatatypeMembers

SortedSet<Individual> getFalseDatatypeMembers(DatatypeProperty datatypeProperty)
Convenience method, which can be used to get all individuals, which have value "false" for the given property. Usually, data properties can have several values for a given individual, but this method will throw a runtime exception if this is the case (i.e. the set of values is {"true", "false"}).

Parameters:
datatypeProperty - A data property.
Returns:
The set of individuals for which the boolean property does not hold.
See Also:
getDatatypeMembers(DatatypeProperty)

getStringDatatypeMembers

Map<Individual,SortedSet<String>> getStringDatatypeMembers(DatatypeProperty datatypeProperty)
Convenience method, which can be used which returns the property values as strings (note that any literal can be represented as string, even numbers).

Parameters:
datatypeProperty - A data property.
Returns:
The mapping between individuals and string values through the given property.
See Also:
getDatatypeMembers(DatatypeProperty)


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