Summary: Ctors | Methods | Inherited Methods | [Expand All]
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
boolean | equals(Object arg0)
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## 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.

##### Throws

PDFNetException |

#### 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.

##### Throws

PDFNetException |