Class Comment
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 Summary
ConstructorsConstructorDescriptionComment()Comment(PersistentAnnotation source) Comment(String pi, int page, User owner, String text, String accessCondition, PublicationStatus publicationStatus) -
Method Summary
Modifier and TypeMethodDescriptionintCompares this comment to another based on their modification and creation dates.getText()booleanvoidMethods inherited from class io.goobi.viewer.model.annotation.PersistentAnnotation
deleteExportedTextFiles, equals, getAccessCondition, getBody, getContentString, getCreator, getCreatorId, getCreatorIfPresent, getDateCreated, getDateModified, getDisplayDate, getGenerator, getGeneratorId, getId, getMotivation, getPublicationStatus, getReviewer, getReviewerId, getTarget, getTargetLink, getTargetPageOrder, getTargetPI, hashCode, mayEdit, setAccessCondition, setBody, setCreator, setCreatorId, setDateCreated, setDateModified, setGenerator, setGeneratorId, setId, setMotivation, setPublicationStatus, setReviewer, setReviewerId, setTarget, setTargetPageOrder, setTargetPI, toString
-
Constructor Details
-
Comment
public Comment() -
Comment
- 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 recordpage- physical page order of the annotated pageowner- the user creating this commenttext- the comment text bodyaccessCondition- access condition controlling visibilitypublicationStatus- the publication/review status of this comment
-
-
Method Details
-
isTargetPiRecordIndexed
- Returns:
- true if record with
targetPIexists in index; false otherwise - Throws:
IndexUnreachableExceptionPresentationException
-
getDisplayText
-
getText
-
setText
-
compareTo
Compares this comment to another based on their modification and creation dates.- Specified by:
compareToin interfaceComparable<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
-