uk.ac.manchester.cs.owl.owlapi
Class OWLIndividualImpl

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.owlapi.OWLIndividualImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLIndividual, OWLObject, OWLPropertyAssertionObject
Direct Known Subclasses:
OWLAnonymousIndividualImpl, OWLNamedIndividualImpl

public abstract class OWLIndividualImpl
extends OWLObjectImpl
implements OWLIndividual

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


Constructor Summary
protected OWLIndividualImpl(OWLDataFactory dataFactory)
           
 
Method Summary
 OWLClass asOWLClass()
           
 OWLDataProperty asOWLDataProperty()
           
 OWLDatatype asOWLDatatype()
           
 OWLObjectProperty asOWLObjectProperty()
           
 boolean equals(java.lang.Object obj)
           
 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.Set<OWLDataPropertyAssertionAxiom> getIndividualDataRelationshipAxioms(OWLOntology ontology)
           
 java.util.Set<OWLNegativeDataPropertyAssertionAxiom> getIndividualNotDataRelationshipAxioms(OWLOntology ontology)
           
 java.util.Set<OWLNegativeObjectPropertyAssertionAxiom> getIndividualNotObjectRelationshipAxioms(OWLOntology ontology)
           
 java.util.Set<OWLObjectPropertyAssertionAxiom> getIndividualObjectRelationshipAxioms(OWLOntology ontology)
           
 java.util.Set<OWLClassAssertionAxiom> getIndividualTypeAxioms(OWLOntology ontology)
           
 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.Map<OWLProperty,java.util.Set<OWLObject>> getNPropertyValues(OWLOntology ontology)
           
 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.Map<OWLProperty,java.util.Set<OWLObject>> getPropertyValues(OWLOntology ontology)
           
 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 isBuiltIn()
           
 boolean isOWLClass()
           
 boolean isOWLDataProperty()
           
 boolean isOWLDatatype()
           
 boolean isOWLObjectProperty()
           
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
compareObjectOfSameType, compareSets, compareTo, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, getObjectPropertiesInSignature, getOWLDataFactory, getSignature, hashCode, isBottomEntity, isTopEntity, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLIndividual
accept, accept, asOWLAnonymousIndividual, asOWLNamedIndividual, isAnonymous, isNamed, toStringID
 

Constructor Detail

OWLIndividualImpl

protected OWLIndividualImpl(OWLDataFactory dataFactory)
Method Detail

isBuiltIn

public boolean isBuiltIn()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class OWLObjectImpl

getTypes

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

Specified by:
getTypes in interface OWLIndividual
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

public java.util.Set<OWLClassExpression> getTypes(java.util.Set<OWLOntology> ontologies)
Description copied from interface: OWLIndividual
A convenience method that gets the types of this individual by examining the specified ontologies.

Specified by:
getTypes in interface OWLIndividual
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.

getPropertyValues

public java.util.Map<OWLProperty,java.util.Set<OWLObject>> getPropertyValues(OWLOntology ontology)

getObjectPropertyValues

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

Specified by:
getObjectPropertyValues in interface OWLIndividual
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.

getNPropertyValues

public java.util.Map<OWLProperty,java.util.Set<OWLObject>> getNPropertyValues(OWLOntology ontology)

getDataPropertyValues

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

Specified by:
getDataPropertyValues in interface OWLIndividual
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.

hasObjectPropertyValue

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

Specified by:
hasObjectPropertyValue in interface OWLIndividual
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

getObjectPropertyValues

public java.util.Map<OWLObjectPropertyExpression,java.util.Set<OWLIndividual>> getObjectPropertyValues(OWLOntology ontology)
Description copied from interface: OWLIndividual
Gets the object property values for this individual.

Specified by:
getObjectPropertyValues in interface OWLIndividual
Parameters:
ontology - The ontology to search for the property values.
Returns:
A map, which maps object properties to sets of individuals.

getNegativeObjectPropertyValues

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

Specified by:
getNegativeObjectPropertyValues in interface OWLIndividual
Parameters:
ontology - The ontology that should be examined for axioms
Returns:
A map containing the negative object property values

hasNegativeObjectPropertyValue

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

Specified by:
hasNegativeObjectPropertyValue in interface OWLIndividual
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

getDataPropertyValues

public java.util.Map<OWLDataPropertyExpression,java.util.Set<OWLLiteral>> getDataPropertyValues(OWLOntology ontology)
Description copied from interface: OWLIndividual
Gets the data property values for this individual

Specified by:
getDataPropertyValues in interface OWLIndividual

getNegativeDataPropertyValues

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

Specified by:
getNegativeDataPropertyValues in interface OWLIndividual
Parameters:
ontology - The ontology that should be examined for axioms
Returns:
A map containing the negative data property values

hasNegativeDataPropertyValue

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

Specified by:
hasNegativeDataPropertyValue in interface OWLIndividual
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

getIndividualTypeAxioms

public java.util.Set<OWLClassAssertionAxiom> getIndividualTypeAxioms(OWLOntology ontology)

getIndividualObjectRelationshipAxioms

public java.util.Set<OWLObjectPropertyAssertionAxiom> getIndividualObjectRelationshipAxioms(OWLOntology ontology)

getIndividualDataRelationshipAxioms

public java.util.Set<OWLDataPropertyAssertionAxiom> getIndividualDataRelationshipAxioms(OWLOntology ontology)

getSameIndividuals

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

Specified by:
getSameIndividuals in interface OWLIndividual
Returns:
Individuals that have been asserted to be the same as this individual.

getDifferentIndividuals

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

Specified by:
getDifferentIndividuals in interface OWLIndividual
Returns:

getIndividualNotObjectRelationshipAxioms

public java.util.Set<OWLNegativeObjectPropertyAssertionAxiom> getIndividualNotObjectRelationshipAxioms(OWLOntology ontology)
                                                                                                throws OWLException
Throws:
OWLException

getIndividualNotDataRelationshipAxioms

public java.util.Set<OWLNegativeDataPropertyAssertionAxiom> getIndividualNotDataRelationshipAxioms(OWLOntology ontology)
                                                                                            throws OWLException
Throws:
OWLException

asOWLClass

public OWLClass asOWLClass()

asOWLDataProperty

public OWLDataProperty asOWLDataProperty()

asOWLDatatype

public OWLDatatype asOWLDatatype()

asOWLObjectProperty

public OWLObjectProperty asOWLObjectProperty()

isOWLClass

public boolean isOWLClass()

isOWLDataProperty

public boolean isOWLDataProperty()

isOWLDatatype

public boolean isOWLDatatype()

isOWLObjectProperty

public boolean isOWLObjectProperty()