public class OWL2DatatypeImpl extends java.lang.Object implements OWLDatatype
Modifier and Type | Method and Description |
---|---|
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).
|
int |
compareTo(OWLObject o)
Compares this object with the specified object for order.
|
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
annotation property.
|
java.util.Set<OWLAnonymousIndividual> |
getAnonymousIndividuals()
Gets the anonymous individuals occurring in this object, as collected by an
OWLEntityCollector.
|
OWL2Datatype |
getBuiltInDatatype()
Gets the built in datatype information if this datatype is a built in
datatype.
|
java.util.Set<OWLClass> |
getClassesInSignature()
A convenience method that obtains the classes
that are in the signature of this object
|
java.util.Set<OWLDataProperty> |
getDataPropertiesInSignature()
A convenience method that obtains the data properties
that are in the signature of this object
|
DataRangeType |
getDataRangeType()
Gets the type of this data range
|
static OWLDatatype |
getDatatype(OWL2Datatype owl2Datatype)
A factory method which gets an instance of
OWLDatatype for an instance of OWL2Datatype
specified by the owl2Datatype parameter. |
java.util.Set<OWLDatatype> |
getDatatypesInSignature()
A convenience method that obtains the datatypes
that are in the signature of this object
|
EntityType<?> |
getEntityType()
Gets the entity type for this entity
|
java.util.Set<OWLNamedIndividual> |
getIndividualsInSignature()
A convenience method that obtains the individuals
that are in the signature of this object
|
IRI |
getIRI()
Gets the IRI of this object
|
java.util.Set<OWLClassExpression> |
getNestedClassExpressions()
Gets all of the nested (includes top level) class expressions that are used in this object
|
java.util.Set<OWLObjectProperty> |
getObjectPropertiesInSignature()
A convenience method that obtains the object properties
that are in the signature of this object
|
<E extends OWLEntity> |
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.util.Set<OWLEntity> |
getSignature()
Gets the signature of this object
|
int |
hashCode() |
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.
|
public static OWLDatatype getDatatype(OWL2Datatype owl2Datatype)
OWLDatatype
for an instance of OWL2Datatype
specified by the owl2Datatype
parameter.owl2Datatype
- The datatype to be retrieved.OWLDatatype
that has the same IRI as the IRI returned by owl2Datatype#getIRI()
.public OWL2Datatype getBuiltInDatatype()
true
getBuiltInDatatype
in interface OWLDatatype
OWLRuntimeException
- if this datatype is not a built in datatype.public boolean isString()
xsd:string
isString
in interface OWLDatatype
true
if this datatype has the IRI xsd:string
, otherwise false
.public boolean isInteger()
xsd:integer
isInteger
in interface OWLDatatype
true
if this datatype has the IRI xsd:integer
, otherwise false
.public boolean isFloat()
xsd:float
isFloat
in interface OWLDatatype
true
if this datatype has the IRI xsd:float
, otherwise false
.public boolean isDouble()
xsd:double
isDouble
in interface OWLDatatype
true
if this datatype has the IRI xsd:double
, otherwise false
.public boolean isBoolean()
xsd:boolean
isBoolean
in interface OWLDatatype
true
if this datatype has the IRI xsd:boolean
, otherwise false
.public boolean isRDFPlainLiteral()
rdf:PlainLiteral
isRDFPlainLiteral
in interface OWLDatatype
true
if this datatype has the IRI rdf:PlainLiteral
otherwise
false
public boolean isDatatype()
isDatatype
in interface OWLDataRange
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.public boolean isTopDatatype()
isTopDatatype
in interface OWLDataRange
true
if this data range is the top datatype otherwise
false
public OWLDatatype asOWLDatatype()
asOWLDatatype
in interface OWLDataRange
asOWLDatatype
in interface OWLEntity
OWLDatatype
public DataRangeType getDataRangeType()
getDataRangeType
in interface OWLDataRange
public void accept(OWLDataVisitor visitor)
accept
in interface OWLDataRange
public <O> O accept(OWLDataVisitorEx<O> visitor)
accept
in interface OWLDataRange
public void accept(OWLDataRangeVisitor visitor)
accept
in interface OWLDataRange
public <O> O accept(OWLDataRangeVisitorEx<O> visitor)
accept
in interface OWLDataRange
public EntityType<?> getEntityType()
getEntityType
in interface OWLEntity
public <E extends OWLEntity> E getOWLEntity(EntityType<E> entityType)
getOWLEntity
in interface OWLEntity
entityType
- The type of the entity to obtain. This entity is not affected in any way.public boolean isType(EntityType<?> entityType)
public java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
getAnnotations
in interface OWLEntity
ontology
- The ontology to be examined for annotation assertion axiomspublic java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology, OWLAnnotationProperty annotationProperty)
getAnnotations
in interface OWLEntity
ontology
- The ontology to examine for annotation axiomsannotationProperty
- The annotation propertyOWLAnnotation
objects that have the specified
URI.public java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLOntology ontology)
getAnnotationAssertionAxioms
in interface OWLEntity
ontology
- the ontology to usepublic boolean isBuiltIn()
public boolean isOWLClass()
isOWLClass
in interface OWLEntity
true
if this entity is an OWLClass, otherwise false
public OWLClass asOWLClass()
asOWLClass
in interface OWLEntity
OWLRuntimeException
- if this entity is not an OWLClass (check with the
isOWLClass method first).public boolean isOWLObjectProperty()
isOWLObjectProperty
in interface OWLEntity
true
if this entity is an OWLObjectProperty, otherwise false
public OWLObjectProperty asOWLObjectProperty()
asOWLObjectProperty
in interface OWLEntity
OWLRuntimeException
- if this entity is not an OWLObjectProperty (check with the
isOWLObjectProperty method first).public boolean isOWLDataProperty()
isOWLDataProperty
in interface OWLEntity
true
if this entity is an OWLDataProperty, otherwise false
public OWLDataProperty asOWLDataProperty()
asOWLDataProperty
in interface OWLEntity
OWLRuntimeException
- if this entity is not an OWLDataProperty (check with the
isOWLDataProperty method first).public boolean isOWLNamedIndividual()
isOWLNamedIndividual
in interface OWLEntity
true
if this entity is an OWLNamedIndividual, otherwise false
public OWLNamedIndividual asOWLNamedIndividual()
asOWLNamedIndividual
in interface OWLEntity
OWLRuntimeException
- if this entity is not an OWLIndividual (check with the
isOWLIndividual method first).public boolean isOWLDatatype()
isOWLDatatype
in interface OWLEntity
true
if this entity is an OWLDatatype, otherwise false
public boolean isOWLAnnotationProperty()
isOWLAnnotationProperty
in interface OWLEntity
true
if this entity is an OWLAnnotationProperty, otherwise false
public OWLAnnotationProperty asOWLAnnotationProperty()
asOWLAnnotationProperty
in interface OWLEntity
OWLRuntimeException
- if this entity is not an OWLAnnotationPropertypublic java.lang.String toStringID()
toStringID
in interface OWLEntity
public java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology)
getReferencingAxioms
in interface OWLEntity
ontology
- The ontology that will be searched for axiomspublic java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology, boolean includeImports)
getReferencingAxioms
in interface OWLEntity
ontology
- The ontology that will be searched for axiomsincludeImports
- 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.public void accept(OWLEntityVisitor visitor)
public <O> O accept(OWLEntityVisitorEx<O> visitor)
public IRI getIRI()
getIRI
in interface OWLNamedObject
public void accept(OWLNamedObjectVisitor visitor)
accept
in interface OWLNamedObject
public void accept(OWLObjectVisitor visitor)
public <O> O accept(OWLObjectVisitorEx<O> visitor)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.Set<OWLEntity> getSignature()
getSignature
in interface OWLObject
public java.util.Set<OWLAnonymousIndividual> getAnonymousIndividuals()
getAnonymousIndividuals
in interface OWLObject
public java.util.Set<OWLClass> getClassesInSignature()
getClassesInSignature
in interface OWLObject
public java.util.Set<OWLDataProperty> getDataPropertiesInSignature()
getDataPropertiesInSignature
in interface OWLObject
public java.util.Set<OWLObjectProperty> getObjectPropertiesInSignature()
getObjectPropertiesInSignature
in interface OWLObject
public java.util.Set<OWLNamedIndividual> getIndividualsInSignature()
getIndividualsInSignature
in interface OWLObject
public java.util.Set<OWLDatatype> getDatatypesInSignature()
getDatatypesInSignature
in interface OWLObject
public java.util.Set<OWLClassExpression> getNestedClassExpressions()
getNestedClassExpressions
in interface OWLObject
OWLClassExpression
s that represent the nested class
expressions used in this object.public boolean isTopEntity()
isTopEntity
in interface OWLObject
true
if this object corresponds to one of the above entities.public boolean isBottomEntity()
isBottomEntity
in interface OWLObject
true
if this object corresponds to one of the above entities.public int compareTo(OWLObject o)
The implementor must ensure sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception iff y.compareTo(x) throws an exception.)
The implementor must also ensure that the relation is transitive: (x.compareTo(y)>0 && y.compareTo(z)>0) implies x.compareTo(z)>0.
Finally, the implementor must ensure that x.compareTo(y)==0 implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for all z.
It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."
In the foregoing description, the notation sgn(expression) designates the mathematical signum function, which is defined to return one of -1, 0, or 1 according to whether the value of expression is negative, zero or positive.
compareTo
in interface java.lang.Comparable<OWLObject>
o
- the object to be compared.java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this object.public int hashCode()
hashCode
in class java.lang.Object