[]
Represents the value of the ClassMap entry of the structure tree: a dictionary that maps name objects designating attribute classes to the corresponding collections of attribute objects (AttrCollection). See the PDF specification for details.
Keys are PDF names (plain JS strings); values are AttrCollection objects.
Obtain it from StructTreeRoot#classMap.
get count(): number;
Gets the number of entries in the map.
number
get id(): number;
Gets the reference to the object.
number
get om(): ObjectManager;
Gets the owner ObjectManager instance.
clear(): void;
Removes all entries from the map.
void
contains(key): boolean;
Determines whether the map contains the specified key.
string
The attribute class name to check.
boolean
true if the key is present, false otherwise.
entries(): [string, AttrCollection][];
Gets the array of key/value pairs in the map.
[string, AttrCollection][]
free(): void;
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
get(key): AttrCollection;
Gets the collection of attribute objects mapped to the specified key.
string
The attribute class name.
The mapped AttrCollection, or undefined if the key is not present.
getOrCreate(key): AttrCollection;
Gets the collection of attribute objects mapped to the specified key, creating and storing an empty AttrCollection if the key is not yet present.
string
The attribute class name.
The AttrCollection mapped to the key.
keys(): string[];
Gets the array of keys (the attribute class names).
string[]
rebind(omTo): void;
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void
remove(key): boolean;
Removes the entry with the specified key.
string
The attribute class name to remove.
boolean
true if the entry was actually removed, false otherwise.
set(key, value): void;
Maps the specified attribute class name to a collection of attribute objects.
string
The attribute class name.
The AttrCollection to map to the key.
void