org.semanticweb.owl.model
Interface OWLAnnotation<O extends OWLObject>

All Superinterfaces:
java.lang.Comparable<OWLObject>, OWLObject
All Known Subinterfaces:
OWLCommentAnnotation, OWLConstantAnnotation, OWLLabelAnnotation, OWLObjectAnnotation

public interface OWLAnnotation<O extends OWLObject>
extends OWLObject

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 18-Dec-2006

Annotations are used in the various types of annotation axioms, which bind annotations to their subjects (i.e. axioms or declarations). An annotation is equal to another annotation if both objects have equal annotation URIs and have equal annotation values


Method Summary
 void accept(OWLAnnotationVisitor visitor)
           
<O> O
accept(OWLAnnotationVisitorEx<O> visitor)
           
 java.net.URI getAnnotationURI()
          Gets the annotation URI
 O getAnnotationValue()
          Gets the annotation value.
 OWLConstant getAnnotationValueAsConstant()
          If this is a constant annotation (rather than an entity annotation) then this convenience method obtains the annoation value as a constant.
 boolean isAnnotationByConstant()
          Determines if the annotation value is a constant.
 
Methods inherited from interface org.semanticweb.owl.model.OWLObject
accept, accept
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getAnnotationURI

java.net.URI getAnnotationURI()
Gets the annotation URI


isAnnotationByConstant

boolean isAnnotationByConstant()
Determines if the annotation value is a constant.

Returns:
true if the annotation value is a constant, or false if the annotation value is an entity (class, property, individual or datatype)

getAnnotationValue

O getAnnotationValue()
Gets the annotation value. The type of value will depend upon the type of the annotation e.g. whether the annotation is a constant annotation, individual annotation etc.


getAnnotationValueAsConstant

OWLConstant getAnnotationValueAsConstant()
If this is a constant annotation (rather than an entity annotation) then this convenience method obtains the annoation value as a constant. Calling this method if the isAnnotationByConstant method returns false will throws an OWLRuntimeException


accept

void accept(OWLAnnotationVisitor visitor)

accept

<O> O accept(OWLAnnotationVisitorEx<O> visitor)