Interface Comment


public interface Comment
The Comment interface provides methods for managing comments in a document.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the children of the comment.
    org.docx4j.wml.Comments.Comment
    Retrieves the comment associated with this object.
    org.docx4j.wml.CommentRangeEnd
    Retrieves the CommentRangeEnd object associated with this comment.
    org.docx4j.wml.CommentRangeStart
    Retrieves the CommentRangeStart object associated with this comment.
    org.docx4j.wml.R.CommentReference
    Retrieves the R.CommentReference object associated with this comment.
    org.docx4j.openpackaging.packages.WordprocessingMLPackage
    Retrieves the WordprocessingMLPackage document.
    Retrieves the elements in the document that are between the comment range anchors.
    org.docx4j.wml.ContentAccessor
    Retrieves the parent of the comment.
    void
    setChildren(Set<Comment> comments)
    Sets the children of the comment.
    void
    setComment(org.docx4j.wml.Comments.Comment comment)
    Sets the comment for this object.
    void
    setCommentRangeEnd(org.docx4j.wml.CommentRangeEnd commentRangeEnd)
    Sets the CommentRangeEnd object associated with this comment.
    void
    setCommentRangeStart(org.docx4j.wml.CommentRangeStart commentRangeStart)
    Sets the CommentRangeStart object associated with this comment.
    void
    setCommentReference(org.docx4j.wml.R.CommentReference commentReference)
    Sets the comment reference for this comment.
  • Method Details

    • getParent

      org.docx4j.wml.ContentAccessor getParent()
      Retrieves the parent of the comment.
      Returns:
      the parent of the comment
    • getElements

      List<Object> getElements()
      Retrieves the elements in the document that are between the comment range anchors.
      Returns:
      a list of objects representing the elements between the comment range anchors.
    • getCommentRangeEnd

      org.docx4j.wml.CommentRangeEnd getCommentRangeEnd()
      Retrieves the CommentRangeEnd object associated with this comment.
      Returns:
      the CommentRangeEnd object associated with this comment
    • setCommentRangeEnd

      void setCommentRangeEnd(org.docx4j.wml.CommentRangeEnd commentRangeEnd)
      Sets the CommentRangeEnd object associated with this comment.
      Parameters:
      commentRangeEnd - the CommentRangeEnd object to set
    • getCommentRangeStart

      org.docx4j.wml.CommentRangeStart getCommentRangeStart()
      Retrieves the CommentRangeStart object associated with this comment.
      Returns:
      the CommentRangeStart object associated with this comment
    • setCommentRangeStart

      void setCommentRangeStart(org.docx4j.wml.CommentRangeStart commentRangeStart)
      Sets the CommentRangeStart object associated with this comment.
      Parameters:
      commentRangeStart - the CommentRangeStart object to set
    • getCommentReference

      org.docx4j.wml.R.CommentReference getCommentReference()
      Retrieves the R.CommentReference object associated with this comment.
      Returns:
      the R.CommentReference object associated with this comment
    • setCommentReference

      void setCommentReference(org.docx4j.wml.R.CommentReference commentReference)
      Sets the comment reference for this comment.
      Parameters:
      commentReference - the comment reference to set
    • getChildren

      Set<Comment> getChildren()
      Retrieves the children of the comment.
      Returns:
      a set of Comment objects representing the children of the comment
    • setChildren

      void setChildren(Set<Comment> comments)
      Sets the children of the comment.
      Parameters:
      comments - the set of Comment objects representing the children of the comment
    • getComment

      org.docx4j.wml.Comments.Comment getComment()
      Retrieves the comment associated with this object.
      Returns:
      the comment associated with this object
    • setComment

      void setComment(org.docx4j.wml.Comments.Comment comment)
      Sets the comment for this object.
      Parameters:
      comment - the comment to set
    • getDocument

      org.docx4j.openpackaging.packages.WordprocessingMLPackage getDocument()
      Retrieves the WordprocessingMLPackage document.
      Returns:
      the WordprocessingMLPackage document.