Class DefaultAnnotationReference



  • public class DefaultAnnotationReference
    extends io.annot8.common.implementations.references.AbstractAnnotationReference
    A reference which will always retrieve the latest annotation from the appropriate annotation store.

    Does not hold a reference to the group.

    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultAnnotationReference​(io.annot8.core.data.BaseItem item, java.lang.String contentId, java.lang.String annotationId)
      New reference either from another reference or manually created.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAnnotationId​()  
      java.lang.String getContentId​()  
      static DefaultAnnotationReference to​(io.annot8.core.data.BaseItem item, io.annot8.core.annotations.Annotation annotation)
      Create an annotation reference for the annotation.
      java.util.Optional<io.annot8.core.annotations.Annotation> toAnnotation​()  
      • Methods inherited from class io.annot8.common.implementations.references.AbstractAnnotationReference

        equals, hashCode, toString
      • Methods inherited from interface io.annot8.core.references.AnnotationReference

        toAnnotations
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultAnnotationReference

        public DefaultAnnotationReference​(io.annot8.core.data.BaseItem item,
                                          java.lang.String contentId,
                                          java.lang.String annotationId)
        New reference either from another reference or manually created.
    • Method Detail

      • to

        public static DefaultAnnotationReference to​(io.annot8.core.data.BaseItem item,
                                                    io.annot8.core.annotations.Annotation annotation)
        Create an annotation reference for the annotation.
      • getAnnotationId

        public java.lang.String getAnnotationId​()
      • getContentId

        public java.lang.String getContentId​()
      • toAnnotation

        public java.util.Optional<io.annot8.core.annotations.Annotation> toAnnotation​()