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

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.owlapi.OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>
          extended by uk.ac.manchester.cs.owl.owlapi.OWLDataPropertyImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLDataProperty, OWLDataPropertyExpression, OWLEntity, OWLLogicalEntity, OWLNamedObject, OWLObject, OWLProperty<OWLDataRange,OWLDataPropertyExpression>, OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>, SWRLPredicate

public class OWLDataPropertyImpl
extends OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>
implements OWLDataProperty

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


Constructor Summary
OWLDataPropertyImpl(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)
           
 void accept(OWLPropertyExpressionVisitor visitor)
           
<O> O
accept(OWLPropertyExpressionVisitorEx<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()
          If the property is a named data property then this method will obtain the property as such.
 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.
protected  java.util.Set<? extends OWLNaryPropertyAxiom<OWLDataPropertyExpression>> getDisjointPropertiesAxioms(OWLOntology ontology)
           
protected  java.util.Set<? extends OWLPropertyDomainAxiom> getDomainAxioms(OWLOntology ontology)
           
 EntityType getEntityType()
          Gets the entity type for this entity
protected  java.util.Set<? extends OWLNaryPropertyAxiom<OWLDataPropertyExpression>> getEquivalentPropertiesAxioms(OWLOntology ontology)
           
 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.
protected  java.util.Set<? extends OWLPropertyRangeAxiom<OWLDataPropertyExpression,OWLDataRange>> getRangeAxioms(OWLOntology ontology)
           
 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.
protected  java.util.Set<? extends OWLSubPropertyAxiom<OWLDataPropertyExpression>> getSubPropertyAxioms(OWLOntology ontology)
           
protected  java.util.Set<? extends OWLSubPropertyAxiom<OWLDataPropertyExpression>> getSubPropertyAxiomsForRHS(OWLOntology ont)
           
 java.net.URI getURI()
           
 boolean isAnonymous()
          Determines if this property expression is anonymous.
 boolean isBottomEntity()
          Determines if this object is either, owl:Nothing (the bottom class), owl:bottomObjectProperty (the bottom object property) , owl:bottomDataProperty (the bottom data property).
 boolean isBuiltIn()
          Determines if this entity is a built in entity.
 boolean isDataPropertyExpression()
           
 boolean isFunctional(OWLOntology ontology)
          Determines if this property is functional in the specified ontology
 boolean isFunctional(java.util.Set<OWLOntology> ontologies)
          Determines if the property is functional because there is an axiom in one of the specified ontologies that assert this to be the case.
 boolean isObjectPropertyExpression()
           
 boolean isOWLAnnotationProperty()
          A convenience method that determines if this entity is an OWLAnnotationProperty
 boolean isOWLBottomDataProperty()
          Determines if this is the owl:bottomDataProperty
 boolean isOWLBottomObjectProperty()
          Determines if this is the owl:bottomObjectProperty
 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 isOWLTopDataProperty()
          Determines if this is the owl:topDataProperty
 boolean isOWLTopObjectProperty()
          Determines if this is the owl:topObjectProperty
 boolean isTopEntity()
          Determines if this object is either, owl:Thing (the top class), owl:topObjectProperty (the top object property) , owl:topDataProperty (the top data property) or rdfs:Literal (the top datatype).
 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.OWLPropertyExpressionImpl
getDisjointProperties, getDisjointProperties, getDomains, getDomains, getEquivalentProperties, getEquivalentProperties, getRanges, getRanges, getSubProperties, getSubProperties, getSuperProperties, getSuperProperties
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
compareSets, compareTo, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, 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.OWLPropertyExpression
getDisjointProperties, getDisjointProperties, getDomains, getDomains, getEquivalentProperties, getEquivalentProperties, getRanges, getRanges, getSubProperties, getSubProperties, getSuperProperties, getSuperProperties
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLPropertyExpression
getDisjointProperties, getDisjointProperties, getDomains, getDomains, getEquivalentProperties, getEquivalentProperties, getRanges, getRanges, getSubProperties, getSubProperties, getSuperProperties, getSuperProperties
 

Constructor Detail

OWLDataPropertyImpl

public OWLDataPropertyImpl(OWLDataFactory dataFactory,
                           IRI iri)
Method Detail

isTopEntity

public boolean isTopEntity()
Description copied from interface: OWLObject
Determines if this object is either, owl:Thing (the top class), owl:topObjectProperty (the top object property) , owl:topDataProperty (the top data property) or rdfs:Literal (the top datatype).

Specified by:
isTopEntity in interface OWLObject
Overrides:
isTopEntity in class OWLObjectImpl
Returns:
true if this object corresponds to one of the above entities.

isBottomEntity

public boolean isBottomEntity()
Description copied from interface: OWLObject
Determines if this object is either, owl:Nothing (the bottom class), owl:bottomObjectProperty (the bottom object property) , owl:bottomDataProperty (the bottom data property).

Specified by:
isBottomEntity in interface OWLObject
Overrides:
isBottomEntity in class OWLObjectImpl
Returns:
true if this object corresponds to one of the above entities.

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.

isDataPropertyExpression

public boolean isDataPropertyExpression()
Specified by:
isDataPropertyExpression in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>

isObjectPropertyExpression

public boolean isObjectPropertyExpression()
Specified by:
isObjectPropertyExpression in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>

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()

isBuiltIn

public boolean isBuiltIn()
Description copied from interface: OWLEntity
Determines if this entity is a built in entity. The entity is a built in entity if it is:

Specified by:
isBuiltIn in interface OWLEntity
Returns:
true if this entity is a built in entity, or false if this entity is not a builtin entity.

isFunctional

public boolean isFunctional(OWLOntology ontology)
Description copied from interface: OWLPropertyExpression
Determines if this property is functional in the specified ontology

Specified by:
isFunctional in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>
Parameters:
ontology - The ontology to be tested for a functional property axiom.
Returns:
true if the specified ontology contains an axiom stating that the property is functional, other wise false.

isFunctional

public boolean isFunctional(java.util.Set<OWLOntology> ontologies)
Description copied from interface: OWLPropertyExpression
Determines if the property is functional because there is an axiom in one of the specified ontologies that assert this to be the case.

Specified by:
isFunctional in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>
Parameters:
ontologies - The ontologies which will be searched for axioms which specify that this property is fuctional.
Returns:
true if the property is functional, or false if the property is not functional.

getDisjointPropertiesAxioms

protected java.util.Set<? extends OWLNaryPropertyAxiom<OWLDataPropertyExpression>> getDisjointPropertiesAxioms(OWLOntology ontology)
Specified by:
getDisjointPropertiesAxioms in class OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>

getDomainAxioms

protected java.util.Set<? extends OWLPropertyDomainAxiom> getDomainAxioms(OWLOntology ontology)
Specified by:
getDomainAxioms in class OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>

getRangeAxioms

protected java.util.Set<? extends OWLPropertyRangeAxiom<OWLDataPropertyExpression,OWLDataRange>> getRangeAxioms(OWLOntology ontology)
Specified by:
getRangeAxioms in class OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>

getSubPropertyAxioms

protected java.util.Set<? extends OWLSubPropertyAxiom<OWLDataPropertyExpression>> getSubPropertyAxioms(OWLOntology ontology)
Specified by:
getSubPropertyAxioms in class OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>

getEquivalentPropertiesAxioms

protected java.util.Set<? extends OWLNaryPropertyAxiom<OWLDataPropertyExpression>> getEquivalentPropertiesAxioms(OWLOntology ontology)
Specified by:
getEquivalentPropertiesAxioms in class OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>

getSubPropertyAxiomsForRHS

protected java.util.Set<? extends OWLSubPropertyAxiom<OWLDataPropertyExpression>> getSubPropertyAxiomsForRHS(OWLOntology ont)
Specified by:
getSubPropertyAxiomsForRHS in class OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class OWLPropertyExpressionImpl<OWLDataRange,OWLDataPropertyExpression>

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.

accept

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

accept

public void accept(OWLPropertyExpressionVisitor visitor)
Specified by:
accept in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>

accept

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

accept

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

accept

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

accept

public <O> O accept(OWLPropertyExpressionVisitorEx<O> visitor)
Specified by:
accept in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>

accept

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

isAnonymous

public boolean isAnonymous()
Description copied from interface: OWLPropertyExpression
Determines if this property expression is anonymous.

Specified by:
isAnonymous in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>
Returns:
true if the property expression is anonymous (because it is the inverse of a property). false if this property is a named object property or named data property.

asOWLDataProperty

public OWLDataProperty asOWLDataProperty()
Description copied from interface: OWLDataPropertyExpression
If the property is a named data property then this method will obtain the property as such. The general pattern of use is that the isAnonymous method should first be used to determine if the property is named (i.e. not an object property expression such as inv(p)). If the property is named then this method may be used to obtain the property as a named property without casting.

Specified by:
asOWLDataProperty in interface OWLDataPropertyExpression
Specified by:
asOWLDataProperty in interface OWLEntity
Returns:
The property as an OWLDataProperty if possible.

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.

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.

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

isOWLTopObjectProperty

public boolean isOWLTopObjectProperty()
Determines if this is the owl:topObjectProperty

Specified by:
isOWLTopObjectProperty in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>
Returns:
true if this property is the owl:topObjectProperty otherwise false

isOWLBottomObjectProperty

public boolean isOWLBottomObjectProperty()
Determines if this is the owl:bottomObjectProperty

Specified by:
isOWLBottomObjectProperty in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>
Returns:
true if this property is the owl:bottomObjectProperty otherwise false

isOWLTopDataProperty

public boolean isOWLTopDataProperty()
Determines if this is the owl:topDataProperty

Specified by:
isOWLTopDataProperty in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>
Returns:
true if this property is the owl:topDataProperty otherwise false

isOWLBottomDataProperty

public boolean isOWLBottomDataProperty()
Determines if this is the owl:bottomDataProperty

Specified by:
isOWLBottomDataProperty in interface OWLPropertyExpression<OWLDataRange,OWLDataPropertyExpression>
Returns:
true if this property is the owl:bottomDataProperty 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

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