public class XWPFNumbering extends POIXMLDocumentPart
POIXMLDocumentPart.RelationPart
Modifier and Type | Field and Description |
---|---|
protected java.util.List<XWPFAbstractNum> |
abstractNums |
protected java.util.List<XWPFNum> |
nums |
Constructor and Description |
---|
XWPFNumbering()
create a new XWPFNumbering object for use in a new document
|
XWPFNumbering(PackagePart part)
create a new styles object with an existing document
|
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
addAbstractNum(XWPFAbstractNum abstractNum)
add a new AbstractNum and return its AbstractNumID
|
java.math.BigInteger |
addNum(java.math.BigInteger abstractNumID)
Add a new num with an abstractNumID
|
void |
addNum(java.math.BigInteger abstractNumID,
java.math.BigInteger numID)
Add a new num with an abstractNumID and a numID
|
java.math.BigInteger |
addNum(XWPFNum num)
add a new number to the numbering document
|
protected void |
commit()
save and commit numbering
|
XWPFAbstractNum |
getAbstractNum(java.math.BigInteger abstractNumID)
get AbstractNum by abstractNumID
|
java.math.BigInteger |
getAbstractNumID(java.math.BigInteger numID)
return the abstractNumID
If the AbstractNumID not exists
return null
|
java.util.List<XWPFAbstractNum> |
getAbstractNums() |
java.math.BigInteger |
getIdOfAbstractNum(XWPFAbstractNum abstractNum)
Compare AbstractNum with abstractNums of this numbering document.
|
XWPFNum |
getNum(java.math.BigInteger numID)
get Num by NumID
|
java.util.List<XWPFNum> |
getNums() |
boolean |
numExist(java.math.BigInteger numID)
Checks whether number with numID exists
|
protected void |
onDocumentRead()
read numbering form an existing package
|
boolean |
removeAbstractNum(java.math.BigInteger abstractNumID)
remove an existing abstractNum
|
void |
setNumbering(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNumbering numbering)
Sets the ctNumbering
|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommitted, onDocumentCreate, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, removeRelation, setCommitted, toString
protected java.util.List<XWPFAbstractNum> abstractNums
protected java.util.List<XWPFNum> nums
public XWPFNumbering(PackagePart part)
public XWPFNumbering()
protected void onDocumentRead() throws java.io.IOException
onDocumentRead
in class POIXMLDocumentPart
java.io.IOException
- a subclass may throw an IOException when a document is readprotected void commit() throws java.io.IOException
commit
in class POIXMLDocumentPart
java.io.IOException
- a subclass may throw an IOException if the changes can't be committedpublic void setNumbering(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNumbering numbering)
numbering
- public boolean numExist(java.math.BigInteger numID)
numID
- public java.math.BigInteger addNum(XWPFNum num)
num
- public java.math.BigInteger addNum(java.math.BigInteger abstractNumID)
public void addNum(java.math.BigInteger abstractNumID, java.math.BigInteger numID)
abstractNumID
- numID
- public XWPFNum getNum(java.math.BigInteger numID)
numID
- public XWPFAbstractNum getAbstractNum(java.math.BigInteger abstractNumID)
abstractNumID
- public java.math.BigInteger getIdOfAbstractNum(XWPFAbstractNum abstractNum)
abstractNum
- public java.math.BigInteger addAbstractNum(XWPFAbstractNum abstractNum)
abstractNum
- public boolean removeAbstractNum(java.math.BigInteger abstractNumID)
abstractNumID
- public java.math.BigInteger getAbstractNumID(java.math.BigInteger numID)
numID
- public java.util.List<XWPFAbstractNum> getAbstractNums()
public java.util.List<XWPFNum> getNums()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.