Package org.apache.poi.xwpf.usermodel
Class XWPFFootnotes
java.lang.Object
org.apache.poi.ooxml.POIXMLDocumentPart
org.apache.poi.xwpf.usermodel.XWPFAbstractFootnotesEndnotes
org.apache.poi.xwpf.usermodel.XWPFFootnotes
Looks after the collection of Footnotes for a document.
Manages bottom-of-the-page footnotes (
XWPFFootnote).-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
POIXMLDocumentPart.RelationPart -
Constructor Summary
ConstructorsConstructorDescriptionConstruct XWPFFootnotes from scratch for a new document.XWPFFootnotes(PackagePart part) Construct XWPFFootnotes from a package part -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFootnote(XWPFFootnote footnote) Add anXWPFFootnoteto the documentaddFootnote(CTFtnEdn note) Add a CT footnote to the documentCreate a new footnote and add it to the document.Get the list ofXWPFFootnotein the Footnotes part.booleanremoveFootnote(int pos) Remove the specified footnote if present.voidsetFootnotes(CTFootnotes footnotes) Sets the ctFootnotesMethods inherited from class org.apache.poi.xwpf.usermodel.XWPFAbstractFootnotesEndnotes
getFootnoteById, getIdManager, getXWPFDocument, setIdManager, setXWPFDocumentMethods inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, isCommitted, setCommitted, toString
-
Constructor Details
-
XWPFFootnotes
Construct XWPFFootnotes from a package part- Parameters:
part- the package part holding the data of the footnotes,- Since:
- POI 3.14-Beta1
-
XWPFFootnotes
public XWPFFootnotes()Construct XWPFFootnotes from scratch for a new document.
-
-
Method Details
-
setFootnotes
Sets the ctFootnotes- Parameters:
footnotes- Collection of CTFntEdn objects.
-
createFootnote
Create a new footnote and add it to the document.- Returns:
- New
XWPFFootnote - Since:
- 4.0.0
-
removeFootnote
public boolean removeFootnote(int pos) Remove the specified footnote if present.- Parameters:
pos- Array position of the footnote to be removed- Returns:
- True if the footnote was removed.
- Since:
- 4.0.0
-
addFootnote
Add anXWPFFootnoteto the document- Parameters:
footnote- Footnote to add
-
addFootnote
Add a CT footnote to the document- Parameters:
note- CTFtnEdn to add.
-
getFootnotesList
Get the list ofXWPFFootnotein the Footnotes part.- Returns:
- List, possibly empty, of footnotes.
-