Class XWPFComment

  • All Implemented Interfaces:
    IBody

    public class XWPFComment
    extends java.lang.Object
    implements IBody
    Sketch of XWPF comment class
    • Method Detail

      • getParagraphs

        public java.util.List<XWPFParagraph> getParagraphs()
        Returns the paragraph(s) that holds the text of the comment.
        Specified by:
        getParagraphs in interface IBody
      • getTables

        public java.util.List<XWPFTable> getTables()
        Get the list of XWPFTables in the comment.
        Specified by:
        getTables in interface IBody
        Returns:
        List of tables
      • getParagraph

        public XWPFParagraph getParagraph​(CTP p)
        Description copied from interface: IBody
        Returns the paragraph corresponding to the provided CTP.
        Specified by:
        getParagraph in interface IBody
        Parameters:
        p - is instance of CTP and is searching for an XWPFParagraph
        Returns:
        The paragraph corresponding to the CTP, or null if there is no corresponding paragraph in this body.
      • getTable

        public XWPFTable getTable​(CTTbl ctTable)
        Description copied from interface: IBody
        if there is a corresponding XWPFTable of the parameter ctTable in the tableList of this header the method will return this table if there is no corresponding XWPFTable the method will return null
        Specified by:
        getTable in interface IBody
      • getParagraphArray

        public XWPFParagraph getParagraphArray​(int pos)
        Description copied from interface: IBody
        Returns the paragraph that of position pos
        Specified by:
        getParagraphArray in interface IBody
      • getTableArray

        public XWPFTable getTableArray​(int pos)
        Description copied from interface: IBody
        Returns the table at position pos
        Specified by:
        getTableArray in interface IBody
      • insertNewTbl

        public XWPFTable insertNewTbl​(XmlCursor cursor)
        Description copied from interface: IBody
        inserts a new Table at the cursor position.
        Specified by:
        insertNewTbl in interface IBody
      • insertTable

        public void insertTable​(int pos,
                                XWPFTable table)
        Description copied from interface: IBody
        inserts a new Table at position pos
        Specified by:
        insertTable in interface IBody
      • getTableCell

        public XWPFTableCell getTableCell​(CTTc cell)
        Description copied from interface: IBody
        returns the TableCell to which the Table belongs
        Specified by:
        getTableCell in interface IBody
      • getText

        public java.lang.String getText()
      • removeParagraph

        public void removeParagraph​(XWPFParagraph paragraph)
      • removeTable

        public void removeTable​(XWPFTable table)
      • createTable

        public XWPFTable createTable​(int rows,
                                     int cols)
      • getCtComment

        public CTComment getCtComment()
        Gets the underlying CTComment object for the comment.
        Returns:
        CTComment object
      • getComments

        public XWPFComments getComments()
        The owning object for this comment
        Returns:
        The XWPFComments object that contains this comment.
      • getId

        public java.lang.String getId()
        Get a unique identifier for the current comment. The restrictions on the id attribute, if any, are defined by the parent XML element. If this attribute is omitted, then the document is non-conformant.
        Returns:
        string id
      • getAuthor

        public java.lang.String getAuthor()
        Get the author of the current comment
        Returns:
        author of the current comment
      • setAuthor

        public void setAuthor​(java.lang.String author)
        Specifies the author for the current comment If this attribute is omitted, then no author shall be associated with the parent annotation type.
        Parameters:
        author - author of the current comment
      • getInitials

        public java.lang.String getInitials()
        Get the initials of the author of the current comment
        Returns:
        initials the initials of the author of the current comment
      • setInitials

        public void setInitials​(java.lang.String initials)
        Specifies the initials of the author of the current comment
        Parameters:
        initials - the initials of the author of the current comment
      • getDate

        public java.util.Calendar getDate()
        Get the date information of the current comment
        Returns:
        the date information for the current comment.
      • setDate

        public void setDate​(java.util.Calendar date)
        Specifies the date information for the current comment. If this attribute is omitted, then no date information shall be associated with the parent annotation type.
        Parameters:
        date - the date information for the current comment.