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)
           
 OWLAnonymousIndividual asAnonymousIndividual()
          Obtains this individual an anonymous individual if it is indeed anonymous
 OWLNamedIndividual asNamedIndividual()
          Obtains this individual as a named individual if it is indeed named.
 OWLAnnotationProperty asOWLAnnotationProperty()
          A convenience method that obtains this entity as an OWLAnnotationProperty (in order to avoid explicit casting).
 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.net.URI getURI()
           
 boolean isAnonymous()
          Determines if this object represents an anonymous individual.
 boolean isBottomEntity()
           
 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 isTopEntity()
           
 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, getObjectPropertiesInSignature, getOWLDataFactory, getSignature, hashCode, 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

isTopEntity

public boolean isTopEntity()
Specified by:
isTopEntity in interface OWLEntity

isBottomEntity

public boolean isBottomEntity()
Specified by:
isBottomEntity in interface OWLEntity

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 represents an anonymous individual.

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)

asNamedIndividual

public OWLNamedIndividual asNamedIndividual()
Description copied from interface: OWLIndividual
Obtains this individual as a named individual if it is indeed named.

Specified by:
asNamedIndividual in interface OWLIndividual
Returns:
The individual as a named individual

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
Returns:
The entity as an OWLNamedIndividual.

asAnonymousIndividual

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

Specified by:
asAnonymousIndividual 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.

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