Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.xwpf.usermodel
Class XWPFNumbering

    java.lang.Object
      org.apache.poi.POIXMLDocumentPart
          org.apache.poi.xwpf.usermodel.XWPFNumbering

    public class XWPFNumbering

extends POIXMLDocumentPart

Author:
  Philipp Epp

Field Summary
`protected java.util.List<XWPFAbstractNum>` | `abstractNums`
`protected boolean` | `isNew`
`protected java.util.List<XWPFNum>` | `nums`

Fields inherited from class org.apache.poi.POIXMLDocumentPart
`DEFAULT_XML_OPTIONS`

Constructor Summary
`XWPFNumbering(PackagePart part, PackageRelationship rel)` create a new styles object with an existing document

Method Summary
`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
`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.math.BigInteger` | `getIdOfAbstractNum(XWPFAbstractNum abstractNum)` Compare AbstractNum with abstractNums of this numbering document.
`XWPFNum` | `getNum(java.math.BigInteger numID)` get Num by NumID
`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

Methods inherited from class org.apache.poi.POIXMLDocumentPart
`addRelation, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelations, onDocumentCreate, onSave, read, rebase, removeRelation, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### abstractNums

    protected java.util.List<XWPFAbstractNum> abstractNums

### nums

    protected java.util.List<XWPFNum> nums

### isNew

    protected boolean isNew

Constructor Detail

### XWPFNumbering

    public XWPFNumbering(PackagePart part,
                         PackageRelationship rel)
                  throws java.io.IOException,
                         OpenXML4JException

  create a new styles object with an existing document

  Throws:
    `java.io.IOException`
    `OpenXML4JException`

Method Detail

### onDocumentRead

    protected void onDocumentRead()
                           throws java.io.IOException

  read numbering form an existing package

  Overrides:
    `onDocumentRead` in class `POIXMLDocumentPart`
  Throws:
    `java.io.IOException`

### commit

    protected void commit()
                   throws java.io.IOException

  save and commit numbering

  Overrides:
    `commit` in class `POIXMLDocumentPart`
  Throws:
    `java.io.IOException`

### numExist

    public boolean numExist(java.math.BigInteger numID)

  Checks whether number with numID exists

  Parameters:
    `numID` -
  Returns:
    boolean true if num exist, false if num not exist

### addNum

    public java.math.BigInteger addNum(XWPFNum num)

  add a new number to the numbering document

  Parameters:
    `num` -

### addNum

    public java.math.BigInteger addNum(java.math.BigInteger abstractNumID)

  Add a new num with an abstractNumID

  Returns:
    return NumId of the added num

### getNum

    public XWPFNum getNum(java.math.BigInteger numID)

  get Num by NumID

  Parameters:
    `numID` -
  Returns:
    abstractNum with NumId if no Num exists with that NumID null will be returned

### getAbstractNum

    public XWPFAbstractNum getAbstractNum(java.math.BigInteger abstractNumID)

  get AbstractNum by abstractNumID

  Parameters:
    `abstractNumID` -
  Returns:
    abstractNum with abstractNumId if no abstractNum exists with that abstractNumID null will be returned

### getIdOfAbstractNum

    public java.math.BigInteger getIdOfAbstractNum(XWPFAbstractNum abstractNum)

  Compare AbstractNum with abstractNums of this numbering document. If the content of abstractNum equals with an abstractNum of the List in numbering the BigInteger Value of it will be returned. If no equal abstractNum is existing null will be returned

  Parameters:
    `abstractNum` -
  Returns:
    BigInteger

### addAbstractNum

    public java.math.BigInteger addAbstractNum(XWPFAbstractNum abstractNum)

  add a new AbstractNum and return its AbstractNumID

  Parameters:
    `abstractNum` -

### removeAbstractNum

    public boolean removeAbstractNum(java.math.BigInteger abstractNumID)

  remove an existing abstractNum

  Parameters:
    `abstractNumID` -
  Returns:
    true if abstractNum with abstractNumID exists in NumberingArray, false if abstractNum with abstractNumID not exists

### getAbstractNumID

    public java.math.BigInteger getAbstractNumID(java.math.BigInteger numID)

  return the abstractNumID If the AbstractNumID not exists return null

  Parameters:
    `numID` -
  Returns:
    abstractNumID

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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