Package org.apache.poi.xwpf.usermodel
Class XWPFEndnotes
java.lang.Object
org.apache.poi.ooxml.POIXMLDocumentPart
org.apache.poi.xwpf.usermodel.XWPFAbstractFootnotesEndnotes
org.apache.poi.xwpf.usermodel.XWPFEndnotes
Looks after the collection of end notes for a document.
Managed end notes (
XWPFEndnote).- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
POIXMLDocumentPart.RelationPart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEndnote(XWPFEndnote endnote) add anXWPFEndnoteto the documentaddEndnote(CTFtnEdn note) Add an endnote to the documentCreate a new end note and add it to the document.Get the list ofXWPFEndnotein the Endnotes part.getFootnoteById(int id) Get the end note with the specified ID, if any.booleanremoveEndnote(int pos) Remove the specified end note if present.booleanremoveFootnote(int pos) Remove the specified footnote if present.voidsetEndnotes(CTEndnotes endnotes) Set the end notes for this part.Methods inherited from class org.apache.poi.xwpf.usermodel.XWPFAbstractFootnotesEndnotes
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
-
XWPFEndnotes
public XWPFEndnotes() -
XWPFEndnotes
Construct XWPFEndnotes from a package part- Parameters:
part- the package part holding the data of the footnotes,- Since:
- POI 3.14-Beta1
-
-
Method Details
-
setEndnotes
Set the end notes for this part.- Parameters:
endnotes- The endnotes to be added.
-
createEndnote
Create a new end note and add it to the document.- Returns:
- New XWPFEndnote
- Since:
- 4.0.0
-
removeFootnote
public boolean removeFootnote(int pos) Remove the specified footnote if present.- Returns:
- True if the footnote was removed.
- Since:
- 4.0.0
-
addEndnote
add anXWPFEndnoteto the document -
addEndnote
Add an endnote to the document- Parameters:
note- Note to add- Returns:
- New
XWPFEndnote
-
getFootnoteById
Get the end note with the specified ID, if any.- Overrides:
getFootnoteByIdin classXWPFAbstractFootnotesEndnotes- Parameters:
id- End note ID.- Returns:
- The end note or null if not found.
-
getEndnotesList
Get the list ofXWPFEndnotein the Endnotes part.- Returns:
- List, possibly empty, of end notes.
-
removeEndnote
public boolean removeEndnote(int pos) Remove the specified end note if present.- Parameters:
pos- Array position of the endnote to be removed- Returns:
- True if the end note was removed.
- Since:
- 4.0.0
-