Class XWPFAbstractFootnoteEndnote

    • Constructor Detail

      • XWPFAbstractFootnoteEndnote

        public XWPFAbstractFootnoteEndnote()
      • XWPFAbstractFootnoteEndnote

        @Internal
        protected XWPFAbstractFootnoteEndnote​(XWPFDocument document,
                                              org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn body)
      • XWPFAbstractFootnoteEndnote

        @Internal
        protected XWPFAbstractFootnoteEndnote​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn note,
                                              XWPFAbstractFootnotesEndnotes footnotes)
    • Method Detail

      • init

        protected void init()
      • getCTFtnEdn

        public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn getCTFtnEdn()
        Gets the underlying CTFtnEdn object for the footnote.
        Returns:
        CTFtnEdn object
      • setCTFtnEdn

        public void setCTFtnEdn​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn footnote)
        Set the underlying CTFtnEdn for the footnote.

        Use XWPFDocument.createFootnote() to create new footnotes.

        Parameters:
        footnote - The CTFtnEdn object that will underly the footnote.
      • getTableArray

        public XWPFTable getTableArray​(int pos)
        Gets the XWPFTable at the specified position from the footnote's table array.
        Specified by:
        getTableArray in interface IBody
        Parameters:
        pos - in table array
        Returns:
        The XWPFTable at position pos, or null if there is no table at position pos.
      • insertTable

        public void insertTable​(int pos,
                                XWPFTable table)
        Inserts an existing XWPFTable into the arrays bodyElements and tables.
        Specified by:
        insertTable in interface IBody
        Parameters:
        pos - Position, in the bodyElements array, to insert the table
        table - XWPFTable to be inserted
      • getTable

        public XWPFTable getTable​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
        if there is a corresponding XWPFTable of the parameter ctTable in the tableList of this header the method will return this table, or null if there is no corresponding XWPFTable.
        Specified by:
        getTable in interface IBody
      • getParagraph

        public XWPFParagraph getParagraph​(org.openxmlformats.schemas.wordprocessingml.x2006.main.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.
      • getParagraphArray

        public XWPFParagraph getParagraphArray​(int pos)
        Returns the XWPFParagraph at position pos in footnote's paragraph array.
        Specified by:
        getParagraphArray in interface IBody
        Parameters:
        pos - Array position of the paragraph to get.
        Returns:
        the XWPFParagraph at position pos, or null if there is no paragraph at that position.
      • getTableCell

        public XWPFTableCell getTableCell​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
        get the XWPFTableCell that belongs to the CTTc cell.
        Specified by:
        getTableCell in interface IBody
        Returns:
        XWPFTableCell that corresponds to the CTTc cell, if there is one, otherwise null.
      • addNewTbl

        public XWPFTable addNewTbl​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table)
        Add a new XWPFTable to the end of the footnote.
        Parameters:
        table - CTTbl object from which to construct the XWPFTable
        Returns:
        The added XWPFTable
      • addNewParagraph

        public XWPFParagraph addNewParagraph​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP paragraph)
        Add a new XWPFParagraph to the end of the footnote.
        Parameters:
        paragraph - CTP paragraph from which to construct the XWPFParagraph
        Returns:
        The added XWPFParagraph
      • getPart

        public POIXMLDocumentPart getPart()
        Get the Part to which the footnote belongs, which you need for adding relationships to other parts
        Specified by:
        getPart in interface IBody
        Returns:
        POIXMLDocumentPart that contains the footnote.
      • getId

        public BigInteger getId()
        Get the ID of the footnote.

        Footnote IDs are unique across all bottom-of-the-page and end note footnotes.

        Returns:
        Footnote ID
        Since:
        4.0.0
      • ensureFootnoteRef

        public abstract void ensureFootnoteRef​(XWPFParagraph p)
        Ensure that the specified paragraph has a reference marker for this footnote by adding a footnote reference if one is not found.

        This method is for the first paragraph in the footnote, not paragraphs that will refer to the footnote. For references to the footnote, use XWPFParagraph.addFootnoteReference(XWPFAbstractFootnoteEndnote).

        The first run of the first paragraph in a footnote should contain a CTFtnEdnRef object.

        Parameters:
        p - The XWPFParagraph to ensure
        Since:
        4.0.0
      • createTable

        public XWPFTable createTable​(int rows,
                                     int cols)
        Appends a new XWPFTable to this footnote
        Parameters:
        rows - Number of rows to initialize the table with
        cols - Number of columns to initialize the table with
        Returns:
        the new XWPFTable with the specified number of rows and columns
        Since:
        4.0.0