public abstract class DocNode extends Object
Modifier and Type | Field and Description |
---|---|
protected PdfDictionary |
_dict
The dictionary which defines this node.
|
protected PdfModule |
_module
The PdfModule this node is associated with.
|
protected boolean |
_pageObjectFlag
True if this node is a PageObject.
|
protected PageTreeNode |
_parent
The parent node of this node.
|
protected boolean |
_walkFinished
Set to true when all subnodes of this node
have been iterated through following a StartWalk.
|
Constructor and Description |
---|
DocNode(PdfModule module,
PageTreeNode parent,
PdfDictionary dict)
Superclass constructor.
|
Modifier and Type | Method and Description |
---|---|
PdfObject |
get(String key,
boolean inheritable)
Get an named property.
|
PdfDictionary |
getDict()
Returns the page object or page tree node dictionary from
which this object was constructed.
|
PdfDictionary |
getFontResources()
Returns the dictionary of fonts within the node's Resources
dictionary, if both exist.
|
PdfArray |
getMediaBox()
Get the MediaBox of this node.
|
DocNode |
getParent()
Returns the parent of this node.
|
PdfDictionary |
getResources()
Get the Resources dictionary.
|
boolean |
isPageObject()
Returns true if this node is a PageObject.
|
abstract DocNode |
nextDocNode()
Get the next DocNode which is under this node.
|
abstract PageObject |
nextPageObject()
Get the next PageObject which is under this node.
|
abstract void |
startWalk()
Initialize an iterator through the descendants of this node.
|
protected PdfModule _module
protected PageTreeNode _parent
protected PdfDictionary _dict
protected boolean _pageObjectFlag
protected boolean _walkFinished
public DocNode(PdfModule module, PageTreeNode parent, PdfDictionary dict)
module
- The PdfModule under which we're operatingparent
- The parent node in the document tree;
may be null only for the root nodedict
- The dictionary object on which this node
is basedpublic boolean isPageObject()
public abstract void startWalk()
public abstract PageObject nextPageObject() throws PdfMalformedException
PdfMalformedException
public abstract DocNode nextDocNode() throws PdfMalformedException
PdfMalformedException
public DocNode getParent()
public PdfDictionary getDict()
public PdfDictionary getResources() throws PdfException
PdfException
public PdfDictionary getFontResources() throws PdfException
PdfException
public PdfArray getMediaBox() throws PdfInvalidException
PdfInvalidException
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.