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

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.owlapi.OWLDatatypeImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLDataRange, OWLDatatype, OWLEntity, OWLLogicalEntity, OWLNamedObject, OWLObject, OWLPropertyRange, SWRLPredicate

public class OWLDatatypeImpl
extends OWLObjectImpl
implements OWLDatatype

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


Constructor Summary
OWLDatatypeImpl(OWLDataFactory dataFactory, IRI iri)
           
 
Method Summary
 void accept(OWLDataRangeVisitor visitor)
           
<O> O
accept(OWLDataRangeVisitorEx<O> visitor)
           
 void accept(OWLDataVisitor visitor)
           
<O> O
accept(OWLDataVisitorEx<O> visitor)
           
 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()
          If this data range is a datatype then this method may be used to obtain it as a datatype (rather than using an explicit cast).
 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.
 OWL2Datatype getBuiltInDatatype()
          Gets the built in datatype information if this datatype is a built in datatype.
 DataRangeType getDataRangeType()
          Gets the type of this data range
 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 isBoolean()
          Determines if this datatype has the IRI xsd:boolean
 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 isDatatype()
          Determines if this data range is a datatype (int, float, ...)
 boolean isDouble()
          Determines if this datatype has the IRI xsd:double
 boolean isFloat()
          Determines if this datatype has the IRI xsd:float
 boolean isInteger()
          Determines if this datatype has the IRI xsd:integer
 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 isRDFPlainLiteral()
          Determines if this datatype has the IRI rdf:PlainLiteral
 boolean isString()
          Determines if this datatype has the IRI xsd:string
 boolean isTopDatatype()
          Determines if this data range is the top data type.
 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.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
 

Constructor Detail

OWLDatatypeImpl

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

isRDFPlainLiteral

public boolean isRDFPlainLiteral()
Determines if this datatype has the IRI rdf:PlainLiteral

Specified by:
isRDFPlainLiteral in interface OWLDatatype
Returns:
true if this datatype has the IRI rdf:PlainLiteral 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
Returns:
A string representing the toString of the IRI of this entity.

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

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.

getDataRangeType

public DataRangeType getDataRangeType()
Description copied from interface: OWLDataRange
Gets the type of this data range

Specified by:
getDataRangeType in interface OWLDataRange
Returns:
The data range type

getBuiltInDatatype

public OWL2Datatype getBuiltInDatatype()
Description copied from interface: OWLDatatype
Gets the built in datatype information if this datatype is a built in datatype. This method should only be called if the isBuiltIn() method returns true

Specified by:
getBuiltInDatatype in interface OWLDatatype
Returns:
The OWLDatatypeVocabulary that describes this built in datatype

isDouble

public boolean isDouble()
Description copied from interface: OWLDatatype
Determines if this datatype has the IRI xsd:double

Specified by:
isDouble in interface OWLDatatype
Returns:
true if this datatype has the IRI xsd:double, otherwise false.

isFloat

public boolean isFloat()
Description copied from interface: OWLDatatype
Determines if this datatype has the IRI xsd:float

Specified by:
isFloat in interface OWLDatatype
Returns:
true if this datatype has the IRI xsd:float, otherwise false.

isInteger

public boolean isInteger()
Description copied from interface: OWLDatatype
Determines if this datatype has the IRI xsd:integer

Specified by:
isInteger in interface OWLDatatype
Returns:
true if this datatype has the IRI xsd:integer, otherwise false.

isString

public boolean isString()
Description copied from interface: OWLDatatype
Determines if this datatype has the IRI xsd:string

Specified by:
isString in interface OWLDatatype
Returns:
true if this datatype has the IRI xsd:string, otherwise false.

isBoolean

public boolean isBoolean()
Description copied from interface: OWLDatatype
Determines if this datatype has the IRI xsd:boolean

Specified by:
isBoolean in interface OWLDatatype
Returns:
true if this datatype has the IRI xsd:boolean, otherwise false.

isDatatype

public boolean isDatatype()
Description copied from interface: OWLDataRange
Determines if this data range is a datatype (int, float, ...)

Specified by:
isDatatype in interface OWLDataRange
Returns:
true if this datarange is a datatype, or false if it is not a datatype and is some other data range such as a data range restriction, data oneOf or data complementOf.

isTopDatatype

public boolean isTopDatatype()
Description copied from interface: OWLDataRange
Determines if this data range is the top data type.

Specified by:
isTopDatatype in interface OWLDataRange
Returns:
true if this data range is the top datatype otherwise false

getURI

public java.net.URI getURI()

equals

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

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.

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: OWLDataRange
If this data range is a datatype then this method may be used to obtain it as a datatype (rather than using an explicit cast).

Specified by:
asOWLDatatype in interface OWLDataRange
Specified by:
asOWLDatatype in interface OWLEntity
Returns:
This data range 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

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(OWLEntityVisitor visitor)
Specified by:
accept in interface OWLEntity

accept

public void accept(OWLDataVisitor visitor)
Specified by:
accept in interface OWLDataRange

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(OWLDataVisitorEx<O> visitor)
Specified by:
accept in interface OWLDataRange

accept

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

accept

public void accept(OWLDataRangeVisitor visitor)
Specified by:
accept in interface OWLDataRange

accept

public <O> O accept(OWLDataRangeVisitorEx<O> visitor)
Specified by:
accept in interface OWLDataRange

compareObjectOfSameType

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

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.