uk.ac.manchester.cs.owl
Class OWLClassImpl

java.lang.Object
  extended by uk.ac.manchester.cs.owl.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.OWLClassImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLClass, OWLDescription, OWLEntity, OWLNamedObject, OWLObject, OWLPropertyRange

public class OWLClassImpl
extends OWLObjectImpl
implements OWLClass

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


Constructor Summary
OWLClassImpl(OWLDataFactory dataFactory, java.net.URI uri)
           
 
Method Summary
 void accept(OWLDescriptionVisitor visitor)
          Accepts a visit from an OWLDescriptionVisitor
<O> O
accept(OWLDescriptionVisitorEx<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)
           
 OWLClass asOWLClass()
          If this class description is in fact a named class then this method may be used to obtain the description 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).
 OWLIndividual asOWLIndividual()
          A convenience method that obtains this entity as an OWLIndividual (in order to avoid explicit casting).
 OWLObjectProperty asOWLObjectProperty()
          A convenience method that obtains this entity as an OWLObjectProperty (in order to avoid explicit casting).
 boolean equals(java.lang.Object obj)
           
 java.util.Set<OWLAnnotationAxiom> getAnnotationAxioms(OWLOntology ontology)
           
 java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
          Obtains annotations on this entity where the annotation have been asserted on the specified entity.
 java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology, java.net.URI annotationURI)
          Obtains the annotations on this entity where the annotation has the specified URI.
 OWLDescription getComplementNNF()
          Gets the negation normal form of the complement of this description.
 java.util.Set<OWLDescription> 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<OWLDescription> 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)
           
 java.util.Set<OWLDisjointUnionAxiom> getDisjointUnionAxioms(OWLOntology ontology)
           
 java.util.Set<OWLDescription> getEquivalentClasses(OWLOntology ontology)
          A convenience method that examines the axioms in the specified ontology and returns the descriptions corresponding to equivalent classes of this class.
 java.util.Set<OWLDescription> getEquivalentClasses(java.util.Set<OWLOntology> ontologies)
          A convenience method that examines the axioms in the specified ontologies and returns the descriptions corresponding to equivalent classes of this class.
 java.util.Set<OWLEquivalentClassesAxiom> getEquivalentClassesAxioms(OWLOntology ontology)
           
 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 speficied 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.
 OWLDescription getNNF()
          Gets this description in negation normal form.
 java.util.Set<OWLSubClassAxiom> getSubClassAxioms(OWLOntology ontology)
           
 java.util.Set<OWLDescription> getSubClasses(OWLOntology ontology)
          Gets the classes which have been asserted to be subclasses of this class in the specified ontology.
 java.util.Set<OWLDescription> 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<OWLDescription> getSuperClasses(OWLOntology ontology)
          A convenience method that examines the axioms in the specified ontology and return the descriptions corresponding to super classes of this class.
 java.util.Set<OWLDescription> getSuperClasses(java.util.Set<OWLOntology> ontologies)
          A convenience method that examines the axioms in the specified ontologies and returns the description corresponding to the asserted super classes of this class.
 java.net.URI getURI()
          Gets the name of this object.
 boolean isAnonymous()
          Determines whether or not this description represents an anonymous class description.
 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 has at least one equvialent class specified by an equvialent classes axiom in one of the ontologies.
 boolean isLiteral()
          Determines if this class is a literal.
 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 isOWLIndividual()
          A convenience method that determines if this entity is an OWLIndividual
 boolean isOWLNothing()
          Determines if this description 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 description is the built in class owl:Thing.
 
Methods inherited from class uk.ac.manchester.cs.owl.OWLObjectImpl
compareTo, getOWLDataFactory, getSignature, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OWLClassImpl

public OWLClassImpl(OWLDataFactory dataFactory,
                    java.net.URI uri)
Method Detail

isAnonymous

public boolean isAnonymous()
Description copied from interface: OWLDescription
Determines whether or not this description represents an anonymous class description.

Specified by:
isAnonymous in interface OWLDescription
Returns:
true if this is an anonymous class description, or false if this is a named class (OWLClass)

isLiteral

public boolean isLiteral()
Description copied from interface: OWLDescription
Determines if this class is a literal. A literal being either a named class or the negation of a named class (i.e. A or not(A)).

Specified by:
isLiteral in interface OWLDescription
Returns:
true if this is a literal, or false if this is not a literal.

asOWLClass

public OWLClass asOWLClass()
Description copied from interface: OWLDescription
If this class description is in fact a named class then this method may be used to obtain the description as an OWLClass without the need for casting. The general pattern of use is to use the isAnonymous to first check

Specified by:
asOWLClass in interface OWLDescription
Specified by:
asOWLClass in interface OWLEntity
Returns:
This class description as an OWLClass.

getURI

public java.net.URI getURI()
Description copied from interface: OWLNamedObject
Gets the name of this object.

Specified by:
getURI in interface OWLNamedObject
Returns:
A URI that represents the name of the object

isOWLThing

public boolean isOWLThing()
Description copied from interface: OWLDescription
Determines if this description is the built in class owl:Thing. This method does not determine if the class is equivalent to owl:Thing.

Specified by:
isOWLThing in interface OWLDescription
Returns:
true if this description is owl:Thing, or false if this description is not owl:Thing

isOWLNothing

public boolean isOWLNothing()
Description copied from interface: OWLDescription
Determines if this description is the built in class owl:Nothing. This method does not determine if the class is equivalent to owl:Nothing.

Specified by:
isOWLNothing in interface OWLDescription
Returns:
true if this description is owl:Nothing, or false if this description is not owl:Nothing.

getNNF

public OWLDescription getNNF()
Description copied from interface: OWLDescription
Gets this description in negation normal form.

Specified by:
getNNF in interface OWLDescription
Returns:
The description in negation normal form.

getComplementNNF

public OWLDescription getComplementNNF()
Description copied from interface: OWLDescription
Gets the negation normal form of the complement of this description.

Specified by:
getComplementNNF in interface OWLDescription
Returns:
A description that represents the NNF of the complement of this description.

getSubClassAxioms

public java.util.Set<OWLSubClassAxiom> getSubClassAxioms(OWLOntology ontology)

getEquivalentClassesAxioms

public java.util.Set<OWLEquivalentClassesAxiom> getEquivalentClassesAxioms(OWLOntology ontology)

getDisjointClassesAxioms

public java.util.Set<OWLDisjointClassesAxiom> getDisjointClassesAxioms(OWLOntology ontology)

getDisjointUnionAxioms

public java.util.Set<OWLDisjointUnionAxiom> getDisjointUnionAxioms(OWLOntology ontology)

getSuperClasses

public java.util.Set<OWLDescription> getSuperClasses(OWLOntology ontology)
Description copied from interface: OWLClass
A convenience method that examines the axioms in the specified ontology and return the descriptions corresponding to super classes of this class.

Specified by:
getSuperClasses in interface OWLClass
Parameters:
ontology - The ontology to be examined
Returns:
A Set of OWLDescriptions that represent the superclasses of this class, which have been asserted in the specified ontology.

getSuperClasses

public java.util.Set<OWLDescription> getSuperClasses(java.util.Set<OWLOntology> ontologies)
Description copied from interface: OWLClass
A convenience method that examines the axioms in the specified ontologies and returns the description corresponding to the asserted super classes of this class.

Specified by:
getSuperClasses in interface OWLClass
Parameters:
ontologies - The set of ontologies to be examined.
Returns:
A set of OWLDescriptions that represent the super classes of this class

getSubClasses

public java.util.Set<OWLDescription> getSubClasses(OWLOntology ontology)
Description copied from interface: OWLClass
Gets the classes which have been asserted to be subclasses of this class in the specified ontology.

Specified by:
getSubClasses in interface OWLClass
Parameters:
ontology - The ontology which should be examined for subclass axioms.
Returns:
A Set of OWLDescriptions that represet the asserted subclasses of this class.

getSubClasses

public java.util.Set<OWLDescription> getSubClasses(java.util.Set<OWLOntology> ontologies)
Description copied from interface: OWLClass
Gets the classes which have been asserted to be subclasses of this class in the specified ontologies.

Specified by:
getSubClasses in interface OWLClass
Parameters:
ontologies - The ontologies which should be examined for subclass axioms.
Returns:
A Set of OWLDescriptions that represet the asserted subclasses of this class.

getEquivalentClasses

public java.util.Set<OWLDescription> getEquivalentClasses(OWLOntology ontology)
Description copied from interface: OWLClass
A convenience method that examines the axioms in the specified ontology and returns the descriptions corresponding to equivalent classes of this class.

Specified by:
getEquivalentClasses in interface OWLClass
Parameters:
ontology - The ontology to be examined for axioms
Returns:
A Set of OWLDescriptions that represent the equivalent classes of this class, that have been asserted in the specified ontology.

getEquivalentClasses

public java.util.Set<OWLDescription> getEquivalentClasses(java.util.Set<OWLOntology> ontologies)
Description copied from interface: OWLClass
A convenience method that examines the axioms in the specified ontologies and returns the descriptions corresponding to equivalent classes of this class.

Specified by:
getEquivalentClasses in interface OWLClass
Parameters:
ontologies - The ontologies to be examined for axioms
Returns:
A Set of OWLDescriptions that represent the equivalent classes of this class, that have been asserted in the specified ontologies.

getDisjointClasses

public java.util.Set<OWLDescription> getDisjointClasses(OWLOntology ontology)
Description copied from interface: OWLClass
Gets the classes which have been asserted to be disjoint with this class by axioms in the specified ontology.

Specified by:
getDisjointClasses in interface OWLClass
Parameters:
ontology - The ontology to search for disjoint class axioms
Returns:
A Set of OWLDescriptions that represent the disjoint classes of this class.

getDisjointClasses

public java.util.Set<OWLDescription> getDisjointClasses(java.util.Set<OWLOntology> ontologies)
Description copied from interface: OWLClass
Gets the classes which have been asserted to be disjoint with this class by axioms in the specified ontologies.

Specified by:
getDisjointClasses in interface OWLClass
Parameters:
ontologies - The ontologies to search for disjoint class axioms
Returns:
A Set of OWLDescriptions that represent the disjoint classes of this class.

getIndividuals

public java.util.Set<OWLIndividual> getIndividuals(OWLOntology ontology)
Description copied from interface: OWLClass
Gets the individuals that have been asserted to be an instance of this class by axioms in the speficied ontology.

Specified by:
getIndividuals in interface OWLClass
Parameters:
ontology - The ontology to be examined for class assertion axioms that assert an individual to be an instance of this class.
Returns:
A Set of OWLIndividuals that represent the individual that have been asserted to be an instance of this class.

getIndividuals

public java.util.Set<OWLIndividual> getIndividuals(java.util.Set<OWLOntology> ontologies)
Description copied from interface: OWLClass
Gets the individuals that have been asserted to be an instance of this class by axioms in the speficied ontologies.

Specified by:
getIndividuals in interface OWLClass
Parameters:
ontologies - The ontologies to be examined for class assertion axioms that assert an individual to be an instance of this class.
Returns:
A Set of OWLIndividuals that represent the individual that have been asserted to be an instance of this class.

getAnnotations

public java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
Description copied from interface: OWLEntity
Obtains annotations on this entity where the annotation have been asserted on the specified entity.

Specified by:
getAnnotations in interface OWLEntity

getAnnotationAxioms

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

getAnnotations

public java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology,
                                                   java.net.URI annotationURI)
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
annotationURI - The annotation URI
Returns:
A set of OWLAnnotation objects that have the specified URI.

isDefined

public boolean isDefined(OWLOntology ontology)
Determines if this class has at least one equivalent class in the specified ontology.

Specified by:
isDefined in interface OWLClass
Parameters:
ontology - The ontology to examine for axioms.

isDefined

public boolean isDefined(java.util.Set<OWLOntology> ontologies)
Description copied from interface: OWLClass
Determines if this class has at least one equvialent class specified by an equvialent classes axiom in one of the ontologies.

Specified by:
isDefined in interface OWLClass
Parameters:
ontologies - The ontologies to be examined for equivalent classes axioms

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.

asOWLIndividual

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

Specified by:
asOWLIndividual in interface OWLEntity
Returns:
The entity as an OWLIndividual.

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

isOWLIndividual

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

Specified by:
isOWLIndividual in interface OWLEntity
Returns:
true if this entity is an OWLIndividual, 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

equals

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

accept

public void accept(OWLDescriptionVisitor visitor)
Description copied from interface: OWLDescription
Accepts a visit from an OWLDescriptionVisitor

Specified by:
accept in interface OWLDescription
Parameters:
visitor - The visitor that wants to visit

accept

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

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

accept

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