org.apache.poi.xwpf.usermodel
Class XWPFFootnote

java.lang.Object
  extended by org.apache.poi.xwpf.usermodel.XWPFFootnote
All Implemented Interfaces:
java.lang.Iterable<XWPFParagraph>, IBody

public class XWPFFootnote
extends java.lang.Object
implements java.lang.Iterable<XWPFParagraph>, IBody


Constructor Summary
XWPFFootnote(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn note, XWPFFootnotes xFootnotes)
           
XWPFFootnote(XWPFDocument document, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn body)
           
 
Method Summary
 XWPFParagraph addNewParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP paragraph)
          add a new paragraph to the end of the footnote
 XWPFTable addNewTbl(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table)
          add a new table to the end of the footnote
 java.util.List<IBodyElement> getBodyElements()
          Returns an Iterator with paragraphs and tables, in the order that they occur in the text.
 org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn getCTFtnEdn()
           
 POIXMLDocumentPart getOwner()
           
 XWPFParagraph getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
          if there is a corresponding XWPFParagraph of the parameter ctTable in the paragraphList of this header or footer the method will return this paragraph if there is no corresponding XWPFParagraph the method will return null
 XWPFParagraph getParagraphArray(int pos)
          Returns the paragraph that holds the text of the header or footer.
 java.util.List<XWPFParagraph> getParagraphs()
          Returns the paragraph(s) that holds the text of the header or footer.
 POIXMLDocumentPart getPart()
          returns the Part, to which the body belongs, which you need for adding relationship to other parts
 BodyType getPartType()
          get the PartType of the body
 java.util.List<XWPFPictureData> getPictures()
           
 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 if there is no corresponding XWPFTable the method will return null
 XWPFTable getTableArray(int pos)
          Returns the table at position pos
 XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
          get the TableCell which belongs to the TableCell
 java.util.List<XWPFTable> getTables()
          Return the table(s) that holds the text of the IBodyPart, for complex cases where a paragraph isn't used.
 XWPFDocument getXWPFDocument()
          Return XWPFDocument
 XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
          add a new paragraph at position of the cursor
 XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
          inserts a new Table at the cursor position.
 void insertTable(int pos, XWPFTable table)
          inserts an existing XWPFTable to the arrays bodyElements and tables
 java.util.Iterator<XWPFParagraph> iterator()
           
 void setCTFtnEdn(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn footnote)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XWPFFootnote

public XWPFFootnote(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn note,
                    XWPFFootnotes xFootnotes)

XWPFFootnote

public XWPFFootnote(XWPFDocument document,
                    org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn body)
Method Detail

getParagraphs

public java.util.List<XWPFParagraph> getParagraphs()
Description copied from interface: IBody
Returns the paragraph(s) that holds the text of the header or footer.

Specified by:
getParagraphs in interface IBody

iterator

public java.util.Iterator<XWPFParagraph> iterator()
Specified by:
iterator in interface java.lang.Iterable<XWPFParagraph>

getTables

public java.util.List<XWPFTable> getTables()
Description copied from interface: IBody
Return the table(s) that holds the text of the IBodyPart, for complex cases where a paragraph isn't used.

Specified by:
getTables in interface IBody

getPictures

public java.util.List<XWPFPictureData> getPictures()

getBodyElements

public java.util.List<IBodyElement> getBodyElements()
Description copied from interface: IBody
Returns an Iterator with paragraphs and tables, in the order that they occur in the text.

Specified by:
getBodyElements in interface IBody

getCTFtnEdn

public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn getCTFtnEdn()

setCTFtnEdn

public void setCTFtnEdn(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn footnote)

getTableArray

public XWPFTable getTableArray(int pos)
Description copied from interface: IBody
Returns the table at position pos

Specified by:
getTableArray in interface IBody
Parameters:
pos - in table array
Returns:
The table at position pos
See Also:
IBody.getTableArray(int)

insertTable

public void insertTable(int pos,
                        XWPFTable table)
inserts an existing XWPFTable to the arrays bodyElements and tables

Specified by:
insertTable in interface IBody
Parameters:
pos -
table -
See Also:
IBody.insertTable(int pos, XWPFTable table)

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 if there is no corresponding XWPFTable the method will return null

Specified by:
getTable in interface IBody
Parameters:
ctTable -
See Also:
IBody.getTable(CTTbl ctTable)

getParagraph

public XWPFParagraph getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
if there is a corresponding XWPFParagraph of the parameter ctTable in the paragraphList of this header or footer the method will return this paragraph if there is no corresponding XWPFParagraph the method will return null

Specified by:
getParagraph in interface IBody
Parameters:
p - is instance of CTP and is searching for an XWPFParagraph
Returns:
null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this header or footer XWPFParagraph with the correspondig CTP p
See Also:
IBody.getParagraph(CTP p)

getParagraphArray

public XWPFParagraph getParagraphArray(int pos)
Returns the paragraph that holds the text of the header or footer.

Specified by:
getParagraphArray in interface IBody
See Also:
IBody.getParagraphArray(int pos)

getTableCell

public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
get the TableCell which belongs to the TableCell

Specified by:
getTableCell in interface IBody
Parameters:
cell -
See Also:
IBody.getTableCell(CTTc cell)

getOwner

public POIXMLDocumentPart getOwner()

insertNewTbl

public XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
Description copied from interface: IBody
inserts a new Table at the cursor position.

Specified by:
insertNewTbl in interface IBody
Parameters:
cursor -
Returns:
the inserted table
See Also:
IBody.insertNewTbl(XmlCursor cursor)

insertNewParagraph

public XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
add a new paragraph at position of the cursor

Specified by:
insertNewParagraph in interface IBody
Parameters:
cursor -
Returns:
the inserted paragraph
See Also:
IBody.insertNewParagraph(XmlCursor cursor)

addNewTbl

public XWPFTable addNewTbl(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table)
add a new table to the end of the footnote

Parameters:
table -
Returns:
the added XWPFTable

addNewParagraph

public XWPFParagraph addNewParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP paragraph)
add a new paragraph to the end of the footnote

Parameters:
paragraph -
Returns:
the added XWPFParagraph

getXWPFDocument

public XWPFDocument getXWPFDocument()
Description copied from interface: IBody
Return XWPFDocument

Specified by:
getXWPFDocument in interface IBody
See Also:
IBody.getXWPFDocument()

getPart

public POIXMLDocumentPart getPart()
returns the Part, to which the body belongs, which you need for adding relationship to other parts

Specified by:
getPart in interface IBody
Returns:
the Part, to which the body belongs
See Also:
IBody.getPart()

getPartType

public BodyType getPartType()
get the PartType of the body

Specified by:
getPartType in interface IBody
Returns:
the PartType of the body
See Also:
IBody.getPartType()


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.