public class OWLClassImpl extends OWLClassExpressionImpl implements OWLClass, java.io.Serializable
Constructor and Description |
---|
OWLClassImpl(IRI iri) |
Modifier and Type | Method and Description |
---|---|
void |
accept(OWLClassExpressionVisitor visitor)
Accepts a visit from an
OWLExpressionVisitor |
<O> O |
accept(OWLClassExpressionVisitorEx<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) |
java.util.Set<OWLClassExpression> |
asConjunctSet()
Interprets this expression as a conjunction and returns the conjuncts.
|
java.util.Set<OWLClassExpression> |
asDisjunctSet()
Interprets this expression as a disjunction and returns the disjuncts.
|
OWLAnnotationProperty |
asOWLAnnotationProperty()
A convenience method that obtains this entity as an OWLAnnotationProperty (in order to
avoid explicit casting).
|
OWLClass |
asOWLClass()
If this class expression is in fact a named class then this method may be used to obtain the expression as an
OWLClass without the need for 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 |
containsConjunct(OWLClassExpression ce)
Determines if this class expression contains a particular conjunct.
|
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.
|
ClassExpressionType |
getClassExpressionType()
Gets the class expression type for this class expression
|
OWLClassExpression |
getComplementNNF()
Gets the negation normal form of the complement of this expression.
|
java.util.Set<OWLClassExpression> |
getDisjointClasses(OWLOntology ontology)
Gets the classes which have been asserted to be disjoint with this class by
axioms in the specified ontology.
|
java.util.Set<OWLClassExpression> |
getDisjointClasses(java.util.Set<OWLOntology> ontologies)
Gets the classes which have been asserted to be disjoint with this class by
axioms in the specified ontologies.
|
java.util.Set<OWLDisjointClassesAxiom> |
getDisjointClassesAxioms(OWLOntology ontology)
Deprecated.
|
java.util.Set<OWLDisjointUnionAxiom> |
getDisjointUnionAxioms(OWLOntology ontology)
Deprecated.
|
EntityType<?> |
getEntityType()
Gets the entity type for this entity
|
java.util.Set<OWLClassExpression> |
getEquivalentClasses(OWLOntology ontology)
A convenience method that examines the axioms in the specified ontology
and returns the class expressions corresponding to equivalent classes of this
class.
|
java.util.Set<OWLClassExpression> |
getEquivalentClasses(java.util.Set<OWLOntology> ontologies)
A convenience method that examines the axioms in the specified ontologies
and returns the class expressions corresponding to equivalent classes of this
class.
|
java.util.Set<OWLEquivalentClassesAxiom> |
getEquivalentClassesAxioms(OWLOntology ontology)
Deprecated.
|
java.util.Set<OWLIndividual> |
getIndividuals(OWLOntology ontology)
Gets the individuals that have been asserted to be an instance of this
class by axioms in the specified ontology.
|
java.util.Set<OWLIndividual> |
getIndividuals(java.util.Set<OWLOntology> ontologies)
Gets the individuals that have been asserted to be an instance of this
class by axioms in the speficied ontologies.
|
IRI |
getIRI()
Gets the IRI of this object
|
OWLClassExpression |
getNNF()
Gets this expression in negation normal form.
|
OWLClassExpression |
getObjectComplementOf()
Gets the object complement of this class expression.
|
<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<OWLSubClassOfAxiom> |
getSubClassAxioms(OWLOntology ontology)
Deprecated.
|
java.util.Set<OWLClassExpression> |
getSubClasses(OWLOntology ontology)
Gets the classes which have been asserted to be subclasses of this class
in the specified ontology.
|
java.util.Set<OWLClassExpression> |
getSubClasses(java.util.Set<OWLOntology> ontologies)
Gets the classes which have been asserted to be subclasses of this class
in the specified ontologies.
|
java.util.Set<OWLClassExpression> |
getSuperClasses(OWLOntology ontology)
A convenience method that examines the axioms in the specified ontology
and return the class expressions corresponding to super classes of this class.
|
java.util.Set<OWLClassExpression> |
getSuperClasses(java.util.Set<OWLOntology> ontologies)
A convenience method that examines the axioms in the specified ontologies
and returns the class expression corresponding to the asserted super classes
of this class.
|
boolean |
isAnonymous()
Determines whether or not this expression represents an anonymous class expression.
|
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 |
isClassExpressionLiteral()
Determines if this class is a literal.
|
boolean |
isDefined(OWLOntology ontology)
Determines if this class has at least one equivalent class in the
specified ontology.
|
boolean |
isDefined(java.util.Set<OWLOntology> ontologies)
Determines if this class is a top level class in an
OWLEquivalentClassesAxiom
in at least one of the specified ontologies. |
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 |
isOWLNothing()
Determines if this expression is the built in class owl:Nothing.
|
boolean |
isOWLObjectProperty()
A convenience method that determines if this entity is an OWLObjectProperty
|
boolean |
isOWLThing()
Determines if this expression is the built in class owl:Thing.
|
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.
|
compareLists, compareSets, compareTo, getAnonymousIndividuals, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, getObjectPropertiesInSignature, getOWLDataFactory, getSignature, hashCode, setOWLDataFactory, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAnonymousIndividuals, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, getObjectPropertiesInSignature, getSignature
public OWLClassImpl(IRI iri)
public boolean isTopEntity()
OWLObject
isTopEntity
in interface OWLObject
isTopEntity
in class OWLObjectImpl
true
if this object corresponds to one of the above entities.public boolean isBottomEntity()
OWLObject
isBottomEntity
in interface OWLObject
isBottomEntity
in class OWLObjectImpl
true
if this object corresponds to one of the above entities.public ClassExpressionType getClassExpressionType()
getClassExpressionType
in interface OWLClassExpression
public OWLClassExpression getObjectComplementOf()
getObjectComplementOf
in interface OWLClassExpression
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.lang.String toStringID()
toStringID
in interface OWLEntity
public IRI getIRI()
OWLNamedObject
getIRI
in interface OWLNamedObject
public boolean isBuiltIn()
OWLEntity
public java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology)
OWLEntity
getReferencingAxioms
in interface OWLEntity
ontology
- The ontology that will be searched for axiomspublic java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology, boolean includeImports)
OWLEntity
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 boolean isAnonymous()
OWLClassExpression
isAnonymous
in interface OWLClassExpression
true
if this is an anonymous class expression, or false
if this is a named
class (OWLClass
)public boolean isClassExpressionLiteral()
OWLClassExpression
isClassExpressionLiteral
in interface OWLClassExpression
true
if this is a literal, or false if this is not a literal.public OWLClass asOWLClass()
OWLClassExpression
OWLClass
without the need for casting. The general pattern of use is to use the
isAnonymous
to first checkasOWLClass
in interface OWLClassExpression
asOWLClass
in interface OWLEntity
OWLClass
.public boolean isOWLThing()
OWLClassExpression
isOWLThing
in interface OWLClassExpression
true
if this expression is owl:Thing, or false
if this expression is not
owl:Thingpublic boolean isOWLNothing()
OWLClassExpression
isOWLNothing
in interface OWLClassExpression
true
if this expression is owl:Nothing, or false
if this expression is not
owl:Nothing.public OWLClassExpression getNNF()
OWLClassExpression
getNNF
in interface OWLClassExpression
public java.util.Set<OWLClassExpression> asConjunctSet()
OWLClassExpression
asConjunctSet
in interface OWLClassExpression
public boolean containsConjunct(OWLClassExpression ce)
OWLClassExpression
containsConjunct
in interface OWLClassExpression
ce
- The conjunct to test fortrue
if this class expression is equal to ce
or if this class expression
is an ObjectIntersectionOf
(possibly nested withing another ObjectIntersectionOf
)
that contains ce
, otherwise false
.public java.util.Set<OWLClassExpression> asDisjunctSet()
OWLClassExpression
asDisjunctSet
in interface OWLClassExpression
public OWLClassExpression getComplementNNF()
OWLClassExpression
getComplementNNF
in interface OWLClassExpression
@Deprecated public java.util.Set<OWLSubClassOfAxiom> getSubClassAxioms(OWLOntology ontology)
@Deprecated public java.util.Set<OWLEquivalentClassesAxiom> getEquivalentClassesAxioms(OWLOntology ontology)
@Deprecated public java.util.Set<OWLDisjointClassesAxiom> getDisjointClassesAxioms(OWLOntology ontology)
@Deprecated public java.util.Set<OWLDisjointUnionAxiom> getDisjointUnionAxioms(OWLOntology ontology)
public java.util.Set<OWLClassExpression> getSuperClasses(OWLOntology ontology)
OWLClass
getSuperClasses
in interface OWLClass
ontology
- The ontology to be examinedSet
of OWLClassExpression
s that represent
the superclasses of this class, which have been asserted in the specified
ontology.public java.util.Set<OWLClassExpression> getSuperClasses(java.util.Set<OWLOntology> ontologies)
OWLClass
getSuperClasses
in interface OWLClass
ontologies
- The set of ontologies to be examined.OWLClassExpressions
s that represent the super classes
of this classpublic java.util.Set<OWLClassExpression> getSubClasses(OWLOntology ontology)
OWLClass
getSubClasses
in interface OWLClass
ontology
- The ontology which should be examined for subclass axioms.Set
of OWLClassExpression
s that represet the
asserted subclasses of this class.public java.util.Set<OWLClassExpression> getSubClasses(java.util.Set<OWLOntology> ontologies)
OWLClass
getSubClasses
in interface OWLClass
ontologies
- The ontologies which should be examined for subclass axioms.Set
of OWLClassExpression
s that represet the
asserted subclasses of this class.public java.util.Set<OWLClassExpression> getEquivalentClasses(OWLOntology ontology)
OWLClass
getEquivalentClasses
in interface OWLClass
ontology
- The ontology to be examined for axiomsSet
of OWLClassExpression
s that represent
the equivalent classes of this class, that have been asserted in the specified
ontology.public java.util.Set<OWLClassExpression> getEquivalentClasses(java.util.Set<OWLOntology> ontologies)
OWLClass
getEquivalentClasses
in interface OWLClass
ontologies
- The ontologies to be examined for axiomsSet
of OWLClassExpression
s that represent
the equivalent classes of this class, that have been asserted in the specified
ontologies.public java.util.Set<OWLClassExpression> getDisjointClasses(OWLOntology ontology)
OWLClass
getDisjointClasses
in interface OWLClass
ontology
- The ontology to search for disjoint class axiomsSet
of OWLClassExpression
s that represent
the disjoint classes of this class.public java.util.Set<OWLClassExpression> getDisjointClasses(java.util.Set<OWLOntology> ontologies)
OWLClass
getDisjointClasses
in interface OWLClass
ontologies
- The ontologies to search for disjoint class axiomsSet
of OWLClassExpression
s that represent
the disjoint classes of this class.public java.util.Set<OWLIndividual> getIndividuals(OWLOntology ontology)
OWLClass
getIndividuals
in interface OWLClass
ontology
- The ontology to be examined for class assertion axioms that
assert an individual to be an instance of this class.Set
of OWLIndividual
s that represent
the individual that have been asserted to be an instance of this class.public java.util.Set<OWLIndividual> getIndividuals(java.util.Set<OWLOntology> ontologies)
OWLClass
getIndividuals
in interface OWLClass
ontologies
- The ontologies to be examined for class assertion axioms that
assert an individual to be an instance of this class.Set
of OWLIndividual
s that represent
the individual that have been asserted to be an instance of this class.public java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
OWLEntity
getAnnotations
in interface OWLEntity
ontology
- The ontology to be examined for annotation assertion axiomspublic java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLOntology ontology)
getAnnotationAssertionAxioms
in interface OWLEntity
ontology
- the ontology to usepublic java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology, OWLAnnotationProperty annotationProperty)
OWLEntity
getAnnotations
in interface OWLEntity
ontology
- The ontology to examine for annotation axiomsannotationProperty
- The annotation propertyOWLAnnotation
objects that have the specified
URI.public boolean isDefined(OWLOntology ontology)
public boolean isDefined(java.util.Set<OWLOntology> ontologies)
OWLClass
OWLEquivalentClassesAxiom
in at least one of the specified ontologies.public OWLDataProperty asOWLDataProperty()
OWLEntity
asOWLDataProperty
in interface OWLEntity
public OWLDatatype asOWLDatatype()
OWLEntity
asOWLDatatype
in interface OWLEntity
public OWLNamedIndividual asOWLNamedIndividual()
OWLEntity
asOWLNamedIndividual
in interface OWLEntity
public OWLObjectProperty asOWLObjectProperty()
OWLEntity
asOWLObjectProperty
in interface OWLEntity
public boolean isOWLClass()
OWLEntity
isOWLClass
in interface OWLEntity
true
if this entity is an OWLClass, otherwise false
public boolean isOWLDataProperty()
OWLEntity
isOWLDataProperty
in interface OWLEntity
true
if this entity is an OWLDataProperty, otherwise false
public boolean isOWLDatatype()
OWLEntity
isOWLDatatype
in interface OWLEntity
true
if this entity is an OWLDatatype, otherwise false
public boolean isOWLNamedIndividual()
OWLEntity
isOWLNamedIndividual
in interface OWLEntity
true
if this entity is an OWLNamedIndividual, otherwise false
public boolean isOWLObjectProperty()
OWLEntity
isOWLObjectProperty
in interface OWLEntity
true
if this entity is an OWLObjectProperty, otherwise false
public OWLAnnotationProperty asOWLAnnotationProperty()
OWLEntity
asOWLAnnotationProperty
in interface OWLEntity
public boolean isOWLAnnotationProperty()
OWLEntity
isOWLAnnotationProperty
in interface OWLEntity
true
if this entity is an OWLAnnotationProperty, otherwise false
public boolean equals(java.lang.Object obj)
equals
in class OWLObjectImpl
public void accept(OWLClassExpressionVisitor visitor)
OWLClassExpression
OWLExpressionVisitor
accept
in interface OWLClassExpression
visitor
- The visitor that wants to visitpublic void accept(OWLEntityVisitor visitor)
public void accept(OWLObjectVisitor visitor)
public void accept(OWLNamedObjectVisitor visitor)
accept
in interface OWLNamedObject
public <O> O accept(OWLEntityVisitorEx<O> visitor)
public <O> O accept(OWLClassExpressionVisitorEx<O> visitor)
accept
in interface OWLClassExpression
public <O> O accept(OWLObjectVisitorEx<O> visitor)
protected int compareObjectOfSameType(OWLObject object)
compareObjectOfSameType
in class OWLObjectImpl