java.lang.Object
io.goobi.viewer.model.annotation.PersistentAnnotation
io.goobi.viewer.model.annotation.comments.Comment
All Implemented Interfaces:
Serializable, Comparable<Comment>

@Entity public class Comment extends PersistentAnnotation implements Comparable<Comment>, Serializable
Author:
Florian Alpers
See Also:
  • Constructor Details

    • Comment

      public Comment()
    • Comment

      public Comment(PersistentAnnotation source)
      Parameters:
      source - the annotation to copy fields from
    • Comment

      public Comment(String pi, int page, User owner, String text, String accessCondition, PublicationStatus publicationStatus)
      Parameters:
      pi - persistent identifier of the target record
      page - physical page order of the annotated page
      owner - the user creating this comment
      text - the comment text body
      accessCondition - access condition controlling visibility
      publicationStatus - the publication/review status of this comment
  • Method Details

    • isTargetPiRecordIndexed

      public boolean isTargetPiRecordIndexed() throws IndexUnreachableException, PresentationException
      Returns:
      true if record with targetPI exists in index; false otherwise
      Throws:
      IndexUnreachableException
      PresentationException
    • getDisplayText

      public String getDisplayText()
    • getText

      public String getText()
    • setText

      public void setText(String text)
    • compareTo

      public int compareTo(Comment o)
      Compares this comment to another based on their modification and creation dates.
      Specified by:
      compareTo in interface Comparable<Comment>
      Parameters:
      o - the comment to compare to
      Returns:
      a negative integer, zero, or positive integer if this comment is earlier than, equal to, or later than the given comment