public class

RoleMap

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

Class Overview

RoleMap is a dictionary that maps the names of structure types used in the document to their approximate equivalents in the set of standard structure types.

Summary

Public Constructors
RoleMap(Obj dict)
Initialize a RoleMap using an existing low-leval Cos/SDF role map dictionary.
Public Methods
String getDirectMap(String type)
Get the direct map from the given type.
Obj getSDFObj()
Get the RoleMap dictionary as a SDFObj.
boolean isValid()
Checks if RoleMap is valid.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public RoleMap (Obj dict)

Initialize a RoleMap using an existing low-leval Cos/SDF role map dictionary.

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

Parameters
dict - a low-level (SDF/Cos) RoleMap dictionary.

Public Methods

public String getDirectMap (String type)

Get the direct map from the given type.

Parameters
type the input StructElement type
Returns
  • The direct mapping of given StructElement type, or NULL if such mapping is not defined.

public Obj getSDFObj ()

Get the RoleMap dictionary as a SDFObj.

Returns
  • the object to the underlying SDF/Cos dictionary.

public boolean isValid ()

Checks if RoleMap is valid.

Returns
  • true if this is a valid (non-null) RoleMap, false otherwise. If the function returns false the underlying SDF/Cos object is null or is not valid and the RoleMap should be treated as NULL object.