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

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLAnnotationProperty, OWLEntity, OWLNamedObject, OWLObject

public class OWLAnnotationPropertyImpl
extends OWLObjectImpl
implements OWLAnnotationProperty

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


Constructor Summary
OWLAnnotationPropertyImpl(OWLDataFactory dataFactory, IRI iri)
           
 
Method Summary
 void accept(OWLEntityVisitor visitor)
           
<O> O
accept(OWLEntityVisitorEx<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).
 OWLClass asOWLClass()
          A convenience method that obtains this entity as an OWLClass (in order to avoid explicit casting).
 OWLDataProperty asOWLDataProperty()
          A convenience method that obtains this entity as an OWLDataProperty (in order to avoid explicit casting).
 OWLDatatype asOWLDatatype()
          A convenience method that obtains this entity as an OWLDatatype (in order to avoid explicit casting).
 OWLNamedIndividual asOWLNamedIndividual()
          A convenience method that obtains this entity as an OWLNamedIndividual (in order to avoid explicit casting).
 OWLObjectProperty asOWLObjectProperty()
          A convenience method that obtains this entity as an OWLObjectProperty (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 isBuiltIn()
          Determines if this property is a built in annotation property.
 boolean isComment()
          Determines if this annotation property has an IRI corresponding to rdfs:comment.
 boolean isDeprecated()
          Determines if this annotation property has an IRI corresponding to owl:deprecated.
 boolean isLabel()
          Determines if this annotation property has an IRI corresponding to rdfs:label.
 boolean isOWLAnnotationProperty()
          A convenience method that determines if this entity is an OWLAnnotationProperty
 boolean isOWLClass()
          A convenience method that determines if this entity is an OWLClass
 boolean isOWLDataProperty()
          A convenience method that determines if this entity is an OWLDataProperty
 boolean isOWLDatatype()
          A convenience method that determines if this entity is an OWLDatatype
 boolean isOWLNamedIndividual()
          A convenience method that determines if this entity is an OWLNamedIndividual
 boolean isOWLObjectProperty()
          A convenience method that determines if this entity is an OWLObjectProperty
 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.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
 

Constructor Detail

OWLAnnotationPropertyImpl

public OWLAnnotationPropertyImpl(OWLDataFactory dataFactory,
                                 IRI iri)
Method Detail

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

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
Returns:
A string representing the toString of the IRI of this entity.

isDeprecated

public boolean isDeprecated()
Description copied from interface: OWLAnnotationProperty
Determines if this annotation property has an IRI corresponding to owl:deprecated. An annotation along the owl:deprecated property which has a value of "true"^^xsd:boolean can be used to deprecate IRIs. (See http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Annotation_Properties of the OWL 2 specification.

Specified by:
isDeprecated in interface OWLAnnotationProperty
Returns:
true if the IRI of this annotation property is owl:deprecated, where owl: expands to the usual prefix, otherwise false.

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

isComment

public boolean isComment()
Description copied from interface: OWLAnnotationProperty
Determines if this annotation property has an IRI corresponding to rdfs:comment.

Specified by:
isComment in interface OWLAnnotationProperty
Returns:
true if the IRI of this annotation property is rdfs:comment, where rdfs: expands to the usual prefix, otherwise false.

isLabel

public boolean isLabel()
Description copied from interface: OWLAnnotationProperty
Determines if this annotation property has an IRI corresponding to rdfs:label.

Specified by:
isLabel in interface OWLAnnotationProperty
Returns:
true if the IRI of this annotation property is rdfs:label, where rdfs: expands to the usual prefix, otherwise false.

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

asOWLClass

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

Specified by:
asOWLClass in interface OWLEntity
Returns:
The entity as an OWLClass.

asOWLDataProperty

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

Specified by:
asOWLDataProperty in interface OWLEntity
Returns:
The entity as an OWLDataProperty.

asOWLDatatype

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

Specified by:
asOWLDatatype in interface OWLEntity
Returns:
The entity as an OWLDatatype.

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.

asOWLObjectProperty

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

Specified by:
asOWLObjectProperty in interface OWLEntity
Returns:
The entity as an OWLObjectProperty.

getAnnotationAssertionAxioms

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

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.

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.

isBuiltIn

public boolean isBuiltIn()
Description copied from interface: OWLAnnotationProperty
Determines if this property is a built in annotation property. i.e. one of the following

Specified by:
isBuiltIn in interface OWLAnnotationProperty
Specified by:
isBuiltIn in interface OWLEntity
Returns:
true if the property is a built in annotation property, otherwise false

isOWLClass

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

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

isOWLDataProperty

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

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

isOWLDatatype

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

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

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

isOWLObjectProperty

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

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

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

accept

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

getURI

public java.net.URI getURI()

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.

equals

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