Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure

public Class PDStructureTreeRoot

extends PDStructureNode
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .HashMap, .List, .Map, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.cos.COSArray, .COSBase, .COSDictionary, .COSName, .COSObject, org.apache.pdfbox.pdmodel.PDStructureElementNameTreeNode, org.apache.pdfbox.pdmodel.common.COSDictionaryMap, .PDNameTreeNode, .PDNumberTreeNode

A root of a structure tree.
Authors
Ben Litchfield, Johannes Koch

Field Summary

Modifier and TypeField and Description
private static final Log
LOG

Log instance.

private static final String

Constructor Summary

AccessConstructor and Description
public
PDStructureTreeRoot()

Default Constructor.

public
PDStructureTreeRoot(COSDictionary
The existing dictionary.
dic
)

Constructor for an existing structure element.

Method Summary

Modifier and TypeMethod and Description
public Map<String, Object>

Returns:

the ClassMap, never null. The elements are either PDAttributeObject or lists of it.
getClassMap
()

Sets the ClassMap.

public PDNameTreeNode<PDStructureElement>

Returns:

the ID tree
getIDTree
()

Returns the ID tree.

public COSBase

Returns:

the K entry.
getK
()

Returns the K entry.

public PDNumberTreeNode

Returns:

the parent tree.
getParentTree
()

Returns the parent tree.

public int

Returns:

The next key for the parent tree
getParentTreeNextKey
()

Returns The next key for the parent tree.

public Map<String, Object>

Returns:

the role map
getRoleMap
()

Returns the role map.

public void
setClassMap(Map<String, Object>
null, or a map whose elements are either PDAttributeObject or lists of it.
classMap
)

Sets the ClassMap.

public void
setIDTree(PDNameTreeNode<PDStructureElement>
the ID tree
idTree
)

Sets the ID tree.

public void
setK(COSBase
the K value
k
)

Sets the K entry.

public void
setParentTree(PDNumberTreeNode
the parent tree
parentTree
)

Sets the parent tree.

public void
setParentTreeNextKey(int
The next key in the parent tree.
parentTreeNextkey
)

Sets the next key in the parent tree.

public void
setRoleMap(Map<String, String>
the role map
roleMap
)

Sets the role map.

Inherited from org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDStructureNode:
appendKidappendKidappendObjectableKidcreatecreateObjectgetCOSObjectgetKidsgetTypeinsertBeforeinsertBeforeinsertObjectableBeforeremoveKidremoveKidremoveObjectableKidsetKids

Field Detail

LOGback to summary
private static final Log LOG

Log instance.

TYPEback to summary
private static final String TYPE

Constructor Detail

PDStructureTreeRootback to summary
public PDStructureTreeRoot()

Default Constructor.

PDStructureTreeRootback to summary
public PDStructureTreeRoot(COSDictionary dic)

Constructor for an existing structure element.

Parameters
dic:COSDictionary

The existing dictionary.

Method Detail

getClassMapback to summary
public Map<String, Object> getClassMap()

Sets the ClassMap.

Returns:Map<String, Object>

the ClassMap, never null. The elements are either PDAttributeObject or lists of it.

getIDTreeback to summary
public PDNameTreeNode<PDStructureElement> getIDTree()

Returns the ID tree.

Returns:PDNameTreeNode<PDStructureElement>

the ID tree

getKback to summary
public COSBase getK()

Returns the K entry. This can be a dictionary representing a structure element, or an array of them. To get it as a list of PDStructureElement objects, use getKids() instead.

Returns:COSBase

the K entry.

getParentTreeback to summary
public PDNumberTreeNode getParentTree()

Returns the parent tree.

The keys correspond to a single page of the document or to an individual object, e.g. an annotation or an XObject, which have a /StructParent or /StructParents entry.

The values of type PDParentTreeValue are either a dictionary or an array. It's a dictionary for individual objects like an annotation or an XObject, and an array for a page object or a content stream containing marked-content sequences identified by an MCID.

Returns:PDNumberTreeNode

the parent tree.

getParentTreeNextKeyback to summary
public int getParentTreeNextKey()

Returns The next key for the parent tree. This is a number greater than any existing key, and which shall be used for the next entry to be added to the tree.

Returns:int

The next key for the parent tree

getRoleMapback to summary
public Map<String, Object> getRoleMap()

Returns the role map.

Returns:Map<String, Object>

the role map

setClassMapback to summary
public void setClassMap(Map<String, Object> classMap)

Sets the ClassMap.

Parameters
classMap:Map<String, Object>

null, or a map whose elements are either PDAttributeObject or lists of it.

setIDTreeback to summary
public void setIDTree(PDNameTreeNode<PDStructureElement> idTree)

Sets the ID tree.

Parameters
idTree:PDNameTreeNode<PDStructureElement>

the ID tree

setKback to summary
public void setK(COSBase k)

Sets the K entry.

Parameters
k:COSBase

the K value

setParentTreeback to summary
public void setParentTree(PDNumberTreeNode parentTree)

Sets the parent tree.

The keys correspond to a single page of the document or to an individual object, e.g. an annotation or an XObject, which have a /StructParent or /StructParents entry.

The values of type PDParentTreeValue are either a dictionary or an array. It's a dictionary for individual objects like an annotation or an XObject, and an array for a page object or a content stream containing marked-content sequences identified by an MCID.

To create an empty parent tree, call new PDNumberTreeNode(PDParentTreeValue.class).

Parameters
parentTree:PDNumberTreeNode

the parent tree

setParentTreeNextKeyback to summary
public void setParentTreeNextKey(int parentTreeNextkey)

Sets the next key in the parent tree. This is a number greater than any existing key, and which shall be used for the next entry to be added to the tree.

Parameters
parentTreeNextkey:int

The next key in the parent tree.

setRoleMapback to summary
public void setRoleMap(Map<String, String> roleMap)

Sets the role map.

Parameters
roleMap:Map<String, String>

the role map