Interface OWLAnnotation

All Superinterfaces:
Comparable<OWLObject>, HasAnnotationPropertiesInSignature, HasAnnotations, HasAnnotationValue, HasAnonymousIndividuals, HasClassesInSignature, HasComponents, HasContainsEntityInSignature, HasDataPropertiesInSignature, HasDatatypesInSignature, HasHashIndex, HasIndex, HasIndividualsInSignature, HasObjectPropertiesInSignature, HasProperty<OWLAnnotationProperty>, HasSignature, IsAnonymous, OWLObject, Serializable
All Known Implementing Classes:
OWLAnnotationImpl, OWLAnnotationImplNotAnnotated

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.
Since:
2.0.0
Author:
Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
  • Method Details

    • componentsWithoutAnnotations

      default Stream<?> componentsWithoutAnnotations()
      Specified by:
      componentsWithoutAnnotations in interface HasComponents
      Returns:
      components as a stream; for objects that can have annotations on them, these are skipped. This is useful for comparing axioms without taking annotations into account. Note: annotations on nested objects are not affected. The stream is ordered (by visit order) but not sorted. Implementations that override components() must ensure the order is compatible with equals() and hashCode().
    • components

      default Stream<?> components()
      Specified by:
      components in interface HasComponents
      Returns:
      components as a stream. The stream is ordered (by visit order) but not sorted. Implementations that override components() must ensure the order is compatible with equals() and hashCode().
    • initHashCode

      default int initHashCode()
      Specified by:
      initHashCode in interface OWLObject
      Returns:
      hash code for the object; called on first use, cached by OWLObjectImpl in the default implementation.
    • componentsAnnotationsFirst

      default Stream<?> componentsAnnotationsFirst()
      Specified by:
      componentsAnnotationsFirst in interface HasComponents
      Returns:
      components as a stream; for objects that can have annotations on them, annotation streams appear first. This is useful in renderers. The stream is ordered (by visit order) but not sorted. Implementations that override components() must ensure the order is compatible with equals() and hashCode().
    • hashIndex

      default int hashIndex()
      Specified by:
      hashIndex in interface HasHashIndex
      Returns:
      index for this type. This is not a hashcode for instances, rather a hashcode for the types.
    • typeIndex

      default int typeIndex()
      Specified by:
      typeIndex in interface HasIndex
      Returns:
      index for this type. This is not a hashcode for instances, rather a sorting index for the types.
    • getProperty

      OWLAnnotationProperty getProperty()
      Gets the property that this annotation acts along.
      Specified by:
      getProperty in interface HasProperty<OWLAnnotationProperty>
      Returns:
      The annotation property
    • getValue

      OWLAnnotationValue getValue()
      Gets the annotation value. The type of value will depend upon the type of the annotation e.g. whether the annotation is an OWLLiteral, an IRI or an OWLAnonymousIndividual.
      Returns:
      The annotation value.
      See Also:
    • isDeprecatedIRIAnnotation

      boolean isDeprecatedIRIAnnotation()
      Determines if this annotation is an annotation used to deprecate an IRI. This is the case if the annotation property has an IRI of owl:deprecated and the value of the annotation is "true"^^xsd:boolean
      Returns:
      true if this annotation is an annotation that can be used to deprecate an IRI, otherwise false.
    • getAnnotatedAnnotation

      OWLAnnotation getAnnotatedAnnotation(Collection<OWLAnnotation> annotations)
      Gets an OWLAnnotation which is a copy of this annotation but which has the specified annotations.
      Parameters:
      annotations - The annotations
      Returns:
      A copy of this annotation with the specified annotations annotating it
    • getAnnotatedAnnotation

      OWLAnnotation getAnnotatedAnnotation(Stream<OWLAnnotation> annotations)
      Gets an OWLAnnotation which is a copy of this annotation but which has the specified annotations.
      Parameters:
      annotations - The annotations
      Returns:
      A copy of this annotation with the specified annotations annotating it
    • accept

      default void accept(OWLAnnotationObjectVisitor visitor)
      Parameters:
      visitor - visitor to accept
    • accept

      default <O> O accept(OWLAnnotationObjectVisitorEx<O> visitor)
      Type Parameters:
      O - visitor return type
      Parameters:
      visitor - visitor to accept
      Returns:
      visitor value
    • accept

      default void accept(OWLObjectVisitor visitor)
      Description copied from interface: OWLObject
      Accepts a visitor
      Specified by:
      accept in interface OWLObject
      Parameters:
      visitor - The visitor
    • accept

      default <O> O accept(OWLObjectVisitorEx<O> visitor)
      Description copied from interface: OWLObject
      Accepts a visitor
      Specified by:
      accept in interface OWLObject
      Type Parameters:
      O - visitor return type
      Parameters:
      visitor - The visitor
      Returns:
      visitor value
    • annotationValue

      default OWLAnnotationValue annotationValue()
      Specified by:
      annotationValue in interface HasAnnotationValue
      Returns:
      the annotation value itself; this method allows OWLAnnotationAssertionAxiom and OWLAnnotation to use the default methods rather than replicate the methods. For OWLAnnotationValue instances, the value returned is the object itself.