public class XWPFNumbering extends POIXMLDocumentPart
Modifier and Type | Field and Description |
---|---|
protected List<XWPFAbstractNum> |
abstractNums |
protected List<XWPFNum> |
nums |
DEFAULT_XML_OPTIONS
Constructor and Description |
---|
XWPFNumbering()
create a new XWPFNumbering object for use in a new document
|
XWPFNumbering(PackagePart part,
PackageRelationship rel)
create a new styles object with an existing document
|
Modifier and Type | Method and Description |
---|---|
BigInteger |
addAbstractNum(XWPFAbstractNum abstractNum)
add a new AbstractNum and return its AbstractNumID
|
BigInteger |
addNum(BigInteger abstractNumID)
Add a new num with an abstractNumID
|
void |
addNum(BigInteger abstractNumID,
BigInteger numID)
Add a new num with an abstractNumID and a numID
|
BigInteger |
addNum(XWPFNum num)
add a new number to the numbering document
|
protected void |
commit()
save and commit numbering
|
XWPFAbstractNum |
getAbstractNum(BigInteger abstractNumID)
get AbstractNum by abstractNumID
|
BigInteger |
getAbstractNumID(BigInteger numID)
return the abstractNumID
If the AbstractNumID not exists
return null
|
BigInteger |
getIdOfAbstractNum(XWPFAbstractNum abstractNum)
Compare AbstractNum with abstractNums of this numbering document.
|
XWPFNum |
getNum(BigInteger numID)
get Num by NumID
|
boolean |
numExist(BigInteger numID)
Checks whether number with numID exists
|
protected void |
onDocumentRead()
read numbering form an existing package
|
boolean |
removeAbstractNum(BigInteger abstractNumID)
remove an existing abstractNum
|
void |
setNumbering(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNumbering numbering)
Sets the ctNumbering
|
addRelation, clearMemoryPackagePart, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationCounter, getRelationId, getRelations, getTargetPart, onDocumentCreate, onDocumentRemove, onSave, read, rebase, removeRelation, removeRelation, toString
protected List<XWPFAbstractNum> abstractNums
public XWPFNumbering(PackagePart part, PackageRelationship rel) throws IOException, OpenXML4JException
IOException
OpenXML4JException
public XWPFNumbering()
protected void onDocumentRead() throws IOException
onDocumentRead
in class POIXMLDocumentPart
IOException
protected void commit() throws IOException
commit
in class POIXMLDocumentPart
IOException
public void setNumbering(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNumbering numbering)
numbering
- public boolean numExist(BigInteger numID)
numID
- public BigInteger addNum(XWPFNum num)
num
- public BigInteger addNum(BigInteger abstractNumID)
public void addNum(BigInteger abstractNumID, BigInteger numID)
abstractNumID
- numID
- public XWPFNum getNum(BigInteger numID)
numID
- public XWPFAbstractNum getAbstractNum(BigInteger abstractNumID)
abstractNumID
- public BigInteger getIdOfAbstractNum(XWPFAbstractNum abstractNum)
abstractNum
- public BigInteger addAbstractNum(XWPFAbstractNum abstractNum)
abstractNum
- public boolean removeAbstractNum(BigInteger abstractNumID)
abstractNumID
- public BigInteger getAbstractNumID(BigInteger numID)
numID
- Copyright © 2020. All rights reserved.