org.semanticweb.owlapi.model
Interface OWLIndividual

All Superinterfaces:
java.lang.Comparable<OWLObject>, OWLObject, OWLPropertyAssertionObject
All Known Subinterfaces:
OWLAnonymousIndividual, OWLNamedIndividual
All Known Implementing Classes:
OWLAnonymousIndividualImpl, OWLIndividualImpl, OWLNamedIndividualImpl

public interface OWLIndividual
extends OWLObject, OWLPropertyAssertionObject

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 25-Oct-2006

Represents a named or anonymous individual.


Method Summary
 void accept(OWLIndividualVisitor visitor)
           
<O> O
accept(OWLIndividualVisitorEx<O> visitor)
           
 OWLAnonymousIndividual asOWLAnonymousIndividual()
          Obtains this individual an anonymous individual if it is indeed anonymous
 OWLNamedIndividual asOWLNamedIndividual()
          Obtains this individual as a named individual if it is indeed named.
 java.util.Set<OWLLiteral> getDataPropertyValues(OWLDataPropertyExpression property, OWLOntology ontology)
          Gets the values that this individual has for a specific data property
 java.util.Map<OWLDataPropertyExpression,java.util.Set<OWLLiteral>> getDataPropertyValues(OWLOntology ontology)
          Gets the data property values for this individual
 java.util.Set<OWLIndividual> getDifferentIndividuals(OWLOntology ontology)
          A convenience method that examines axioms in the specified ontology to determine the individuals that are asserted to be different to this individual.
 java.util.Map<OWLDataPropertyExpression,java.util.Set<OWLLiteral>> getNegativeDataPropertyValues(OWLOntology ontology)
          Gets the data property values that are explicitly asserted NOT to hold for this individual
 java.util.Map<OWLObjectPropertyExpression,java.util.Set<OWLIndividual>> getNegativeObjectPropertyValues(OWLOntology ontology)
          Gets the object property values that are explicitly asserted NOT to hold for this individual
 java.util.Set<OWLIndividual> getObjectPropertyValues(OWLObjectPropertyExpression property, OWLOntology ontology)
          Gets the asserted object property values for this individual and the specified property.
 java.util.Map<OWLObjectPropertyExpression,java.util.Set<OWLIndividual>> getObjectPropertyValues(OWLOntology ontology)
          Gets the object property values for this individual.
 java.util.Set<OWLIndividual> getSameIndividuals(OWLOntology ontology)
          A convenience method that examines axioms in the specified ontology to determine the individuals that are asserted to be the same as this individual.
 java.util.Set<OWLClassExpression> getTypes(OWLOntology ontology)
          A convenience method, which gets the types of this individual, that correspond to the types asserted with axioms in the specified ontology.
 java.util.Set<OWLClassExpression> getTypes(java.util.Set<OWLOntology> ontologies)
          A convenience method that gets the types of this individual by examining the specified ontologies.
 boolean hasNegativeDataPropertyValue(OWLDataPropertyExpression property, OWLLiteral literal, OWLOntology ontology)
          Test whether a specific value for a specific data property has been asserted not to hold for this individual.
 boolean hasNegativeObjectPropertyValue(OWLObjectPropertyExpression property, OWLIndividual individual, OWLOntology ontology)
          Test whether a specific value for a specific object property has been asserted not to hold for this individual.
 boolean hasObjectPropertyValue(OWLObjectPropertyExpression property, OWLIndividual individual, OWLOntology ontology)
          Test whether a specific value for a specific object property on this individual has been asserted.
 boolean isAnonymous()
          Determines if this object is an instance of OWLAnonymousIndividual Note that this method is the dual of isNamed().
 boolean isNamed()
          Determines if this individual is an instance of OWLNamedIndividual.
 java.lang.String toStringID()
          Returns a string representation that can be used as the ID of this individual.
 

Method Detail

isNamed

boolean isNamed()
Determines if this individual is an instance of OWLNamedIndividual. Note that this method is the dual of isAnonymous().

Returns:
true if this individual is an instance of OWLNamedIndividual because it is a named individuals, otherwise false

isAnonymous

boolean isAnonymous()
Determines if this object is an instance of OWLAnonymousIndividual Note that this method is the dual of isNamed().

Returns:
true if this object represents an anonymous individual (OWLAnonymousIndividual) or false if this object represents a named individual (OWLIndividual)

asOWLNamedIndividual

OWLNamedIndividual asOWLNamedIndividual()
Obtains this individual as a named individual if it is indeed named.

Returns:
The individual as a named individual
Throws:
OWLRuntimeException - if this individual is anonymous

asOWLAnonymousIndividual

OWLAnonymousIndividual asOWLAnonymousIndividual()
Obtains this individual an anonymous individual if it is indeed anonymous

Returns:
The individual as an anonymous individual
Throws:
OWLRuntimeException - if this individual is named

getTypes

java.util.Set<OWLClassExpression> getTypes(OWLOntology ontology)
A convenience method, which gets the types of this individual, that correspond to the types asserted with axioms in the specified ontology.

Parameters:
ontology - The ontology that should be examined for class assertion axioms in order to get the types for this individual.
Returns:
A set of class expressions that correspond the asserted types of this individual in the specified ontology.

getTypes

java.util.Set<OWLClassExpression> getTypes(java.util.Set<OWLOntology> ontologies)
A convenience method that gets the types of this individual by examining the specified ontologies.

Parameters:
ontologies - The ontologies to be examined for class assertions
Returns:
A set of class expressions that represent the types of this individual as asserted in the specified ontologies.

getObjectPropertyValues

java.util.Map<OWLObjectPropertyExpression,java.util.Set<OWLIndividual>> getObjectPropertyValues(OWLOntology ontology)
Gets the object property values for this individual.

Parameters:
ontology - The ontology to search for the property values.
Returns:
A map, which maps object properties to sets of individuals.

getObjectPropertyValues

java.util.Set<OWLIndividual> getObjectPropertyValues(OWLObjectPropertyExpression property,
                                                     OWLOntology ontology)
Gets the asserted object property values for this individual and the specified property.

Parameters:
ontology - The ontology to be examined for axioms that assert property values for this individual
property - The property for which values will be returned.
Returns:
The set of individuals that are the values of this property. More precisely, the set of individuals such that for each individual i in the set, is in a property assertion axiom property(this, i) is in the specified ontology.

hasObjectPropertyValue

boolean hasObjectPropertyValue(OWLObjectPropertyExpression property,
                               OWLIndividual individual,
                               OWLOntology ontology)
Test whether a specific value for a specific object property on this individual has been asserted.

Parameters:
property - The property whose values will be examined
individual - The individual value of the property that will be tested for
ontology - The ontology to search for the property value
Returns:
true if the individual has the specified property value, that is, true if the specified ontology contains an object property assertion ObjectPropertyAssertion(property, this, individual), otherwise false

hasNegativeObjectPropertyValue

boolean hasNegativeObjectPropertyValue(OWLObjectPropertyExpression property,
                                       OWLIndividual individual,
                                       OWLOntology ontology)
Test whether a specific value for a specific object property has been asserted not to hold for this individual.

Parameters:
property - The property to test for
individual - The value to test for
ontology - The ontology to search for the assertion
Returns:
true if the specified property value has explicitly been asserted not to hold, that is, true if the specified ontology contains a negative object property assertion NegativeObjectPropertyAssertion(property, this, individual), otherwise false

getNegativeObjectPropertyValues

java.util.Map<OWLObjectPropertyExpression,java.util.Set<OWLIndividual>> getNegativeObjectPropertyValues(OWLOntology ontology)
Gets the object property values that are explicitly asserted NOT to hold for this individual

Parameters:
ontology - The ontology that should be examined for axioms
Returns:
A map containing the negative object property values

getDataPropertyValues

java.util.Map<OWLDataPropertyExpression,java.util.Set<OWLLiteral>> getDataPropertyValues(OWLOntology ontology)
Gets the data property values for this individual


getDataPropertyValues

java.util.Set<OWLLiteral> getDataPropertyValues(OWLDataPropertyExpression property,
                                                OWLOntology ontology)
Gets the values that this individual has for a specific data property

Parameters:
ontology - The ontology to examine for property assertions
Returns:
The values that this individual has for the specified property in the specified ontology. This is the set of values such that each value LV in the set is in an axiom of the form DataPropertyAssertion(property, thisIndividual, LV) in the ontology specified by the ontology parameter.

getNegativeDataPropertyValues

java.util.Map<OWLDataPropertyExpression,java.util.Set<OWLLiteral>> getNegativeDataPropertyValues(OWLOntology ontology)
Gets the data property values that are explicitly asserted NOT to hold for this individual

Parameters:
ontology - The ontology that should be examined for axioms
Returns:
A map containing the negative data property values

hasNegativeDataPropertyValue

boolean hasNegativeDataPropertyValue(OWLDataPropertyExpression property,
                                     OWLLiteral literal,
                                     OWLOntology ontology)
Test whether a specific value for a specific data property has been asserted not to hold for this individual.

Parameters:
property - The property to test for
literal - The value to test for
ontology - The ontology to search for the assertion
Returns:
true if the specified property value has explicitly been asserted not to hold, that is, true if the specified ontology contains a negative data property assertion NegativeDataPropertyAssertion(property, this, literal), otherwise false

getSameIndividuals

java.util.Set<OWLIndividual> getSameIndividuals(OWLOntology ontology)
A convenience method that examines axioms in the specified ontology to determine the individuals that are asserted to be the same as this individual.

Returns:
Individuals that have been asserted to be the same as this individual.

getDifferentIndividuals

java.util.Set<OWLIndividual> getDifferentIndividuals(OWLOntology ontology)
A convenience method that examines axioms in the specified ontology to determine the individuals that are asserted to be different to this individual.

Parameters:
ontology -
Returns:

toStringID

java.lang.String toStringID()
Returns a string representation that can be used as the ID of this individual. This is the toString representation of the node ID of this individual

Returns:
A string representing the toString of the node ID of this entity.

accept

void accept(OWLIndividualVisitor visitor)

accept

<O> O accept(OWLIndividualVisitorEx<O> visitor)