Class XfaTreeNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
org.openpdf.rups.view.icons.IconTreeNode
org.openpdf.rups.view.itext.treenodes.FormTreeNode
org.openpdf.rups.view.itext.treenodes.XfaTreeNode
- All Implemented Interfaces:
Serializable,Cloneable,MutableTreeNode,TreeNode,OutputStreamResource
This is the root tree node for the different parts of the XFA resource; it's a child of the root in the FormTree.
This resource can be one XDP stream (in which case this root will only have one child) or different streams with
individual packets comprising the XML Data Package.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]End sequence of an artificial boundary between XFA fragments added by RUPSstatic final byte[]Middle sequence of an artificial boundary between XFA fragments added by RUPSstatic final byte[]Start sequence of an artificial boundary between XFA fragments added by RUPSprivate static final longA serial version UID.Fields inherited from class org.openpdf.rups.view.itext.treenodes.FormTreeNode
object_nodeFields inherited from class org.openpdf.rups.view.icons.IconTreeNode
iconFields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPacket(String key, PdfObjectTreeNode value) Adds a child node to the XFA root.voidwriteTo(OutputStream os) Writes (part of) the XFA resource to an OutputStream.Methods inherited from class org.openpdf.rups.view.itext.treenodes.FormTreeNode
getCorrespondingPdfObjectNodeMethods inherited from class org.openpdf.rups.view.icons.IconTreeNode
getIconMethods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
-
Field Details
-
BOUNDARY_START
public static final byte[] BOUNDARY_STARTStart sequence of an artificial boundary between XFA fragments added by RUPS -
BOUNDARY_MIDDLE
public static final byte[] BOUNDARY_MIDDLEMiddle sequence of an artificial boundary between XFA fragments added by RUPS -
BOUNDARY_END
public static final byte[] BOUNDARY_ENDEnd sequence of an artificial boundary between XFA fragments added by RUPS -
serialVersionUID
private static final long serialVersionUIDA serial version UID.- See Also:
-
-
Constructor Details
-
XfaTreeNode
Creates the root node of the XFA tree. This will be a child of the FormTree root node.- Parameters:
xfa- the XFA node in the PdfTree (a child of the AcroForm node in the PDF catalog)
-
-
Method Details
-
writeTo
Writes (part of) the XFA resource to an OutputStream. If key isnull, the complete resource is written; if key refers to an individual package, this package only is written to the OutputStream.- Specified by:
writeToin interfaceOutputStreamResource- Parameters:
os- the OutputStream to which the XML is written.- Throws:
IOException- usual exception when there's a problem writing to an OutputStream
-
addPacket
Adds a child node to the XFA root. The child node either corresponds with the complete XDP stream (if the XFA root only has one child) or with individual packet.- Parameters:
key- the name of the packetvalue- the corresponding stream node in the PdfTree
-