org.semanticweb.owlapi.model
Interface OWLEntity

All Superinterfaces:
java.lang.Comparable<OWLObject>, OWLNamedObject, OWLObject
All Known Subinterfaces:
OWLAnnotationProperty, OWLClass, OWLDataProperty, OWLDatatype, OWLLogicalEntity, OWLNamedIndividual, OWLObjectProperty, OWLProperty<R,P>
All Known Implementing Classes:
OWLAnnotationPropertyImpl, OWLClassImpl, OWLDataPropertyImpl, OWLDatatypeImpl, OWLNamedIndividualImpl, OWLObjectPropertyImpl

public interface OWLEntity
extends OWLObject, OWLNamedObject

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

Represents Entities in the OWL 2 Specification.


Method Summary
 void accept(OWLEntityVisitor visitor)
           
<O> O
accept(OWLEntityVisitorEx<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()
          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).
 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.
 EntityType getEntityType()
          Gets the entity type for this entity
<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.
 boolean isBuiltIn()
          Determines if this entity is a built in entity.
 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 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 interface org.semanticweb.owlapi.model.OWLNamedObject
accept, getIRI
 

Method Detail

getEntityType

EntityType getEntityType()
Gets the entity type for this entity

Returns:
The entity type

getOWLEntity

<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.

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

boolean isType(EntityType entityType)
Tests to see if this entity is of the specified type

Parameters:
entityType - The entity type
Returns:
true if this entity is of the specified type, otherwise false.

getAnnotations

java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology)
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.

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.

getAnnotations

java.util.Set<OWLAnnotation> getAnnotations(OWLOntology ontology,
                                            OWLAnnotationProperty annotationProperty)
Obtains the annotations on this entity where the annotation has the specified URI.

Parameters:
ontology - The ontology to examine for annotation axioms
annotationProperty - The annotation property
Returns:
A set of OWLAnnotation objects that have the specified URI.

getAnnotationAssertionAxioms

java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLOntology ontology)

isBuiltIn

boolean isBuiltIn()
Determines if this entity is a built in entity. The entity is a built in entity if it is:

Returns:
true if this entity is a built in entity, or false if this entity is not a builtin entity.

isOWLClass

boolean isOWLClass()
A convenience method that determines if this entity is an OWLClass

Returns:
true if this entity is an OWLClass, otherwise false

asOWLClass

OWLClass asOWLClass()
A convenience method that obtains this entity as an OWLClass (in order to avoid explicit casting).

Returns:
The entity as an OWLClass.
Throws:
OWLRuntimeException - if this entity is not an OWLClass (check with the isOWLClass method first).

isOWLObjectProperty

boolean isOWLObjectProperty()
A convenience method that determines if this entity is an OWLObjectProperty

Returns:
true if this entity is an OWLObjectProperty, otherwise false

asOWLObjectProperty

OWLObjectProperty asOWLObjectProperty()
A convenience method that obtains this entity as an OWLObjectProperty (in order to avoid explicit casting).

Returns:
The entity as an OWLObjectProperty.
Throws:
OWLRuntimeException - if this entity is not an OWLObjectProperty (check with the isOWLObjectProperty method first).

isOWLDataProperty

boolean isOWLDataProperty()
A convenience method that determines if this entity is an OWLDataProperty

Returns:
true if this entity is an OWLDataProperty, otherwise false

asOWLDataProperty

OWLDataProperty asOWLDataProperty()
A convenience method that obtains this entity as an OWLDataProperty (in order to avoid explicit casting).

Returns:
The entity as an OWLDataProperty.
Throws:
OWLRuntimeException - if this entity is not an OWLDataProperty (check with the isOWLDataProperty method first).

isOWLNamedIndividual

boolean isOWLNamedIndividual()
A convenience method that determines if this entity is an OWLNamedIndividual

Returns:
true if this entity is an OWLNamedIndividual, otherwise false

asOWLNamedIndividual

OWLNamedIndividual asOWLNamedIndividual()
A convenience method that obtains this entity as an OWLNamedIndividual (in order to avoid explicit casting).

Returns:
The entity as an OWLNamedIndividual.
Throws:
OWLRuntimeException - if this entity is not an OWLIndividual (check with the isOWLIndividual method first).

isOWLDatatype

boolean isOWLDatatype()
A convenience method that determines if this entity is an OWLDatatype

Returns:
true if this entity is an OWLDatatype, otherwise false

asOWLDatatype

OWLDatatype asOWLDatatype()
A convenience method that obtains this entity as an OWLDatatype (in order to avoid explicit casting).

Returns:
The entity as an OWLDatatype.
Throws:
OWLRuntimeException - if this entity is not an OWLDatatype (check with the isOWLDatatype method first).

isOWLAnnotationProperty

boolean isOWLAnnotationProperty()
A convenience method that determines if this entity is an OWLAnnotationProperty

Returns:
true if this entity is an OWLAnnotationProperty, otherwise false

asOWLAnnotationProperty

OWLAnnotationProperty asOWLAnnotationProperty()
A convenience method that obtains this entity as an OWLAnnotationProperty (in order to avoid explicit casting).

Returns:
The entity as an OWLAnnotationProperty.
Throws:
OWLRuntimeException - if this entity is not an OWLAnnotationProperty

toStringID

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

Returns:
A string representing the toString of the IRI of this entity.

getReferencingAxioms

java.util.Set<OWLAxiom> getReferencingAxioms(OWLOntology ontology)
Gets the axioms in the specified ontology that contain this entity in their signature.

Parameters:
ontology - The ontology that will be searched for axioms
Returns:
The axioms in the specified ontology whose signature contains this entity.

getReferencingAxioms

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.

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.

accept

void accept(OWLEntityVisitor visitor)

accept

<O> O accept(OWLEntityVisitorEx<O> visitor)