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

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.owlapi.OWLIndividualImpl
          extended by uk.ac.manchester.cs.owl.owlapi.OWLNamedIndividualImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLEntity, OWLIndividual, OWLLogicalEntity, OWLNamedIndividual, OWLNamedObject, OWLObject, OWLPropertyAssertionObject

public class OWLNamedIndividualImpl
extends OWLIndividualImpl
implements OWLNamedIndividual

Author: Matthew Horridge
The University of Manchester
Information Management Group
Date: 15-Jan-2009


Constructor Summary
OWLNamedIndividualImpl(OWLDataFactory dataFactory, IRI iri)
           
 
Method Summary
 void accept(OWLEntityVisitor visitor)
           
<O> O
accept(OWLEntityVisitorEx<O> visitor)
           
 void accept(OWLIndividualVisitor visitor)
           
<O> O
accept(OWLIndividualVisitorEx<O> visitor)
           
 void accept(OWLNamedObjectVisitor visitor)
           
 void accept(OWLObjectVisitor visitor)
           
<O> O
accept(OWLObjectVisitorEx<O> visitor)
           
 OWLAnnotationProperty asOWLAnnotationProperty()
          A convenience method that obtains this entity as an OWLAnnotationProperty (in order to avoid explicit casting).
 OWLAnonymousIndividual asOWLAnonymousIndividual()
          Obtains this individual an anonymous individual if it is indeed anonymous
 OWLNamedIndividual asOWLNamedIndividual()
          A convenience method that obtains this entity as an OWLNamedIndividual (in order to avoid explicit casting).
protected  int compareObjectOfSameType(OWLObject object)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLOntology ontology)
           
 java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
          Gets the annotations for this entity.
 java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology, OWLAnnotationProperty annotationProperty)
          Obtains the annotations on this entity where the annotation has the specified URI.
 EntityType getEntityType()
          Gets the entity type for this entity
 IRI getIRI()
          Gets the IRI of this object
<E extends OWLEntity>
E
getOWLEntity(EntityType<E> entityType)
          Gets an entity that has the same IRI as this entity but is of the specified type.
 java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology)
          Gets the axioms in the specified ontology that contain this entity in their signature.
 java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology, boolean includeImports)
          Gets the axioms in the specified ontology and possibly its imports closure that contain this entity in their signature.
 java.net.URI getURI()
           
 boolean isAnonymous()
          Determines if this object is an instance of OWLAnonymousIndividual Note that this method is the dual of OWLIndividual.isNamed().
 boolean isNamed()
          Determines if this individual is an instance of OWLNamedIndividual.
 boolean isOWLAnnotationProperty()
          A convenience method that determines if this entity is an OWLAnnotationProperty
 boolean isOWLNamedIndividual()
          A convenience method that determines if this entity is an OWLNamedIndividual
 boolean isType(EntityType entityType)
          Tests to see if this entity is of the specified type
 java.lang.String toStringID()
          Returns a string representation that can be used as the ID of this entity.
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLIndividualImpl
asOWLClass, asOWLDataProperty, asOWLDatatype, asOWLObjectProperty, getDataPropertyValues, getDataPropertyValues, getDifferentIndividuals, getIndividualDataRelationshipAxioms, getIndividualNotDataRelationshipAxioms, getIndividualNotObjectRelationshipAxioms, getIndividualObjectRelationshipAxioms, getIndividualTypeAxioms, getNegativeDataPropertyValues, getNegativeObjectPropertyValues, getNPropertyValues, getObjectPropertyValues, getObjectPropertyValues, getPropertyValues, getSameIndividuals, getTypes, getTypes, hasNegativeDataPropertyValue, hasNegativeObjectPropertyValue, hasObjectPropertyValue, isBuiltIn, isOWLClass, isOWLDataProperty, isOWLDatatype, isOWLObjectProperty
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
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
getDataPropertyValues, getDataPropertyValues, getDifferentIndividuals, getNegativeDataPropertyValues, getNegativeObjectPropertyValues, getObjectPropertyValues, getObjectPropertyValues, getSameIndividuals, getTypes, getTypes, hasNegativeDataPropertyValue, hasNegativeObjectPropertyValue, hasObjectPropertyValue
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLEntity
asOWLClass, asOWLDataProperty, asOWLDatatype, asOWLObjectProperty, isBuiltIn, isOWLClass, isOWLDataProperty, isOWLDatatype, isOWLObjectProperty
 

Constructor Detail

OWLNamedIndividualImpl

public OWLNamedIndividualImpl(OWLDataFactory dataFactory,
                              IRI iri)
Method Detail

isNamed

public boolean isNamed()
Description copied from interface: OWLIndividual
Determines if this individual is an instance of OWLNamedIndividual. Note that this method is the dual of OWLIndividual.isAnonymous().

Specified by:
isNamed in interface OWLIndividual
Returns:
true if this individual is an instance of OWLNamedIndividual because it is a named individuals, otherwise false

getEntityType

public EntityType getEntityType()
Gets the entity type for this entity

Specified by:
getEntityType in interface OWLEntity
Returns:
The entity type

getOWLEntity

public <E extends OWLEntity> E getOWLEntity(EntityType<E> entityType)
Gets an entity that has the same IRI as this entity but is of the specified type.

Specified by:
getOWLEntity in interface OWLEntity
Parameters:
entityType - The type of the entity to obtain. This entity is not affected in any way.
Returns:
An entity that has the same IRI as this entity and is of the specified type

isType

public boolean isType(EntityType entityType)
Tests to see if this entity is of the specified type

Specified by:
isType in interface OWLEntity
Parameters:
entityType - The entity type
Returns:
true if this entity is of the specified type, otherwise false.

toStringID

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

Specified by:
toStringID in interface OWLEntity
Specified by:
toStringID in interface OWLIndividual
Returns:
A string representing the toString of the IRI of this entity.

isOWLNamedIndividual

public boolean isOWLNamedIndividual()
Description copied from interface: OWLEntity
A convenience method that determines if this entity is an OWLNamedIndividual

Specified by:
isOWLNamedIndividual in interface OWLEntity
Returns:
true if this entity is an OWLNamedIndividual, otherwise false

getIRI

public IRI getIRI()
Description copied from interface: OWLNamedObject
Gets the IRI of this object

Specified by:
getIRI in interface OWLNamedObject
Returns:
The IRI of this object

getURI

public java.net.URI getURI()

isAnonymous

public boolean isAnonymous()
Description copied from interface: OWLIndividual
Determines if this object is an instance of OWLAnonymousIndividual Note that this method is the dual of OWLIndividual.isNamed().

Specified by:
isAnonymous in interface OWLIndividual
Returns:
true if this object represents an anonymous individual (OWLAnonymousIndividual) or false if this object represents a named individual (OWLIndividual)

asOWLNamedIndividual

public OWLNamedIndividual asOWLNamedIndividual()
Description copied from interface: OWLEntity
A convenience method that obtains this entity as an OWLNamedIndividual (in order to avoid explicit casting).

Specified by:
asOWLNamedIndividual in interface OWLEntity
Specified by:
asOWLNamedIndividual in interface OWLIndividual
Returns:
The entity as an OWLNamedIndividual.

asOWLAnonymousIndividual

public OWLAnonymousIndividual asOWLAnonymousIndividual()
Description copied from interface: OWLIndividual
Obtains this individual an anonymous individual if it is indeed anonymous

Specified by:
asOWLAnonymousIndividual in interface OWLIndividual
Returns:
The individual as an anonymous individual

asOWLAnnotationProperty

public OWLAnnotationProperty asOWLAnnotationProperty()
Description copied from interface: OWLEntity
A convenience method that obtains this entity as an OWLAnnotationProperty (in order to avoid explicit casting).

Specified by:
asOWLAnnotationProperty in interface OWLEntity
Returns:
The entity as an OWLAnnotationProperty.

isOWLAnnotationProperty

public boolean isOWLAnnotationProperty()
Description copied from interface: OWLEntity
A convenience method that determines if this entity is an OWLAnnotationProperty

Specified by:
isOWLAnnotationProperty in interface OWLEntity
Returns:
true if this entity is an OWLAnnotationProperty, otherwise false

equals

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

getAnnotations

public java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
Description copied from interface: OWLEntity
Gets the annotations for this entity. These are deemed to be annotations in annotation assertion axioms that have a subject that is an IRI that is equal to the IRI of this entity.

Specified by:
getAnnotations in interface OWLEntity
Parameters:
ontology - The ontology to be examined for annotation assertion axioms
Returns:
The annotations that participate directly in an annotation assertion whose subject is an IRI corresponding to the IRI of this entity.

getAnnotationAssertionAxioms

public java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLOntology ontology)
Specified by:
getAnnotationAssertionAxioms in interface OWLEntity

getAnnotations

public java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology,
                                                   OWLAnnotationProperty annotationProperty)
Description copied from interface: OWLEntity
Obtains the annotations on this entity where the annotation has the specified URI.

Specified by:
getAnnotations in interface OWLEntity
Parameters:
ontology - The ontology to examine for annotation axioms
annotationProperty - The annotation property
Returns:
A set of OWLAnnotation objects that have the specified URI.

getReferencingAxioms

public java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology)
Description copied from interface: OWLEntity
Gets the axioms in the specified ontology that contain this entity in their signature.

Specified by:
getReferencingAxioms in interface OWLEntity
Parameters:
ontology - The ontology that will be searched for axioms
Returns:
The axioms in the specified ontology whose signature contains this entity.

getReferencingAxioms

public java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology,
                                                    boolean includeImports)
Description copied from interface: OWLEntity
Gets the axioms in the specified ontology and possibly its imports closure that contain this entity in their signature.

Specified by:
getReferencingAxioms in interface OWLEntity
Parameters:
ontology - The ontology that will be searched for axioms
includeImports - If true then axioms in the imports closure will also be returned, if false then only the axioms in the specified ontology will be returned.
Returns:
The axioms in the specified ontology whose signature contains this entity.

compareObjectOfSameType

protected int compareObjectOfSameType(OWLObject object)
Specified by:
compareObjectOfSameType in class OWLObjectImpl

accept

public void accept(OWLObjectVisitor visitor)
Specified by:
accept in interface OWLObject

accept

public <O> O accept(OWLObjectVisitorEx<O> visitor)
Specified by:
accept in interface OWLObject

accept

public void accept(OWLEntityVisitor visitor)
Specified by:
accept in interface OWLEntity

accept

public <O> O accept(OWLEntityVisitorEx<O> visitor)
Specified by:
accept in interface OWLEntity

accept

public void accept(OWLNamedObjectVisitor visitor)
Specified by:
accept in interface OWLNamedObject

accept

public void accept(OWLIndividualVisitor visitor)
Specified by:
accept in interface OWLIndividual

accept

public <O> O accept(OWLIndividualVisitorEx<O> visitor)
Specified by:
accept in interface OWLIndividual