public class

STree

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.struct.STree

Class Overview

STree is the root of the structure tree, which is a central repository for information related to a PDF document's logical structure. There is at most one structure tree in each document.

Summary

Public Constructors
STree(Obj struct_dict)
Initialize a STree using an existing low-level Cos/SDF object.
Public Methods
static STree __Create(long impl, Object ref)
__ create.
ClassMap getClassMap()
Get the class map.
SElement getElement(String id)
Get the element with given id
SElement getElement(byte[] id_buf)
Get the element with give ID
SElement getKid(int index)
Get the kid at given index
int getNumKids()
Get the number of kids of the structure tree root.
RoleMap getRoleMap()
Get the role map.
Obj getSDFObj()
Get the SDFObj.
boolean isValid()
Checks if STree is valid.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public STree (Obj struct_dict)

Initialize a STree using an existing low-level Cos/SDF object.

Note: This constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
struct_dict - a low-level (SDF/Cos) dictionary representing the .

Public Methods

public static STree __Create (long impl, Object ref)

__ create.

Parameters
impl the impl
ref the ref
Returns
  • the s tree

public ClassMap getClassMap ()

Get the class map.

Returns
  • the ClassMap object from the structure tree root.

public SElement getElement (String id)

Get the element with given id

Parameters
id the input Element ID
Returns
  • the element associated with the given ID.

public SElement getElement (byte[] id_buf)

Get the element with give ID

Parameters
id_buf buffer containing the ID to search for
Returns
  • the element associated with the given ID

public SElement getKid (int index)

Get the kid at given index

Parameters
index The index of the kid to obtain.
Returns
  • The kid at an array index in the structure tree root.

public int getNumKids ()

Get the number of kids of the structure tree root.

Returns
  • The number of kids of the structure tree root.

public RoleMap getRoleMap ()

Get the role map.

Returns
  • the RoleMap object from the structure tree root.

public Obj getSDFObj ()

Get the SDFObj.

Returns
  • Pointer to the underlying SDF/Cos object.

public boolean isValid ()

Checks if STree is valid.

Returns
  • true if this is a valid STree object, false otherwise.