Package com.itextpdf.text.pdf
Class PdfStructureTreeRoot
- java.lang.Object
-
- com.itextpdf.text.pdf.PdfObject
-
- com.itextpdf.text.pdf.PdfDictionary
-
- com.itextpdf.text.pdf.PdfStructureTreeRoot
-
- All Implemented Interfaces:
IPdfStructureElement
,java.io.Serializable
public class PdfStructureTreeRoot extends PdfDictionary implements IPdfStructureElement
The structure tree root corresponds to the highest hierarchy level in a tagged PDF.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap<PdfName,PdfObject>
classes
private PdfDictionary
classMap
private java.util.HashMap<java.lang.String,PdfObject>
idTreeMap
private java.util.HashMap<java.lang.Integer,PdfIndirectReference>
numTree
private java.util.HashMap<java.lang.Integer,PdfObject>
parentTree
private PdfIndirectReference
reference
private PdfWriter
writer
Holds value of property writer.
-
Constructor Summary
Constructors Constructor Description PdfStructureTreeRoot(PdfWriter writer)
Creates a new instance of PdfStructureTreeRoot
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
buildTree()
private void
createNumTree()
PdfObject
getAttribute(PdfName name)
Gets the first entarance of attribute.PdfObject
getMappedClass(PdfName name)
java.util.HashMap<java.lang.Integer,PdfIndirectReference>
getNumTree()
PdfIndirectReference
getReference()
Gets the reference this object will be written to.PdfWriter
getWriter()
Gets the writer.void
mapClass(PdfName name, PdfObject object)
void
mapRole(PdfName used, PdfName standard)
Maps the user tags to the standard tags.(package private) void
putIDTree(java.lang.String record, PdfObject reference)
(package private) void
setAnnotationMark(int structParentIndex, PdfIndirectReference struc)
void
setAttribute(PdfName name, PdfObject obj)
Sets the attribute value.(package private) void
setPageMark(int page, PdfIndirectReference struc)
-
Methods inherited from class com.itextpdf.text.pdf.PdfDictionary
checkType, clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toString
-
Methods inherited from class com.itextpdf.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
-
-
-
Field Detail
-
parentTree
private java.util.HashMap<java.lang.Integer,PdfObject> parentTree
-
reference
private PdfIndirectReference reference
-
classMap
private PdfDictionary classMap
-
numTree
private java.util.HashMap<java.lang.Integer,PdfIndirectReference> numTree
-
idTreeMap
private java.util.HashMap<java.lang.String,PdfObject> idTreeMap
-
writer
private PdfWriter writer
Holds value of property writer.
-
-
Constructor Detail
-
PdfStructureTreeRoot
PdfStructureTreeRoot(PdfWriter writer)
Creates a new instance of PdfStructureTreeRoot
-
-
Method Detail
-
createNumTree
private void createNumTree() throws java.io.IOException
- Throws:
java.io.IOException
-
mapRole
public void mapRole(PdfName used, PdfName standard)
Maps the user tags to the standard tags. The mapping will allow a standard application to make some sense of the tagged document whatever the user tags may be.- Parameters:
used
- the user tagstandard
- the standard tag
-
putIDTree
void putIDTree(java.lang.String record, PdfObject reference)
-
getWriter
public PdfWriter getWriter()
Gets the writer.- Returns:
- the writer
-
getNumTree
public java.util.HashMap<java.lang.Integer,PdfIndirectReference> getNumTree() throws java.io.IOException
- Throws:
java.io.IOException
-
getReference
public PdfIndirectReference getReference()
Gets the reference this object will be written to.- Returns:
- the reference this object will be written to
- Since:
- 2.1.6 method removed in 2.1.5, but restored in 2.1.6
-
setPageMark
void setPageMark(int page, PdfIndirectReference struc)
-
setAnnotationMark
void setAnnotationMark(int structParentIndex, PdfIndirectReference struc)
-
buildTree
void buildTree() throws java.io.IOException
- Throws:
java.io.IOException
-
getAttribute
public PdfObject getAttribute(PdfName name)
Gets the first entarance of attribute.- Specified by:
getAttribute
in interfaceIPdfStructureElement
- Since:
- 5.3.4
-
setAttribute
public void setAttribute(PdfName name, PdfObject obj)
Sets the attribute value.- Specified by:
setAttribute
in interfaceIPdfStructureElement
- Since:
- 5.3.4
-
-