Package com.adobe.xfa
Class Packet
java.lang.Object
com.adobe.xfa.Obj
com.adobe.xfa.Node
com.adobe.xfa.Element
com.adobe.xfa.Packet
- All Implemented Interfaces:
Element.DualDomNode
,Peer
A class to represent the children of the XFA app model
that are not otherwise represented by a model.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.adobe.xfa.Element
Element.DualDomNode, Element.ReplaceContent
Nested classes/interfaces inherited from class com.adobe.xfa.Node
Node.ChangeLogger
-
Field Summary
Fields inherited from class com.adobe.xfa.Element
AttrIsDefault, AttrIsFragment, AttrIsTransient, CREATEACTION
Fields inherited from class com.adobe.xfa.Node
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE, gsXFANamespacePrefix
Fields inherited from interface com.adobe.xfa.ut.Peer
ATTR_CHANGED, CHILD_ADDED, CHILD_REMOVED, DESCENDENT_ADDED, DESCENDENT_ATTR_CHANGED, DESCENDENT_REMOVED, DESCENDENT_VALUE_CHANGED, PARENT_CHANGED, PERMS_LOCK_CLEARED, PERMS_LOCK_SET, PROTO_ATTR_CHANGED, PROTO_CHILD_ADDED, PROTO_CHILD_REMOVED, PROTO_DESCENDENT_ADDED, PROTO_DESCENDENT_ATTR_CHANGED, PROTO_DESCENDENT_REMOVED, PROTO_DESCENDENT_VALUE_CHANGED, PROTO_VALUE_CHANGED, UPDATED, VALUE_CHANGED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String sAttrName) XFAPackets have no formal schema, so getProperty does not work to return attributes.Gets this packet's content.Gets this element's first child that is an XFA node.getName()
Gets this packet's name.boolean
isValidAttr
(int eTag, boolean bReport, String value) Determines if the given attribute tag is a valid attribute of this packet.void
removeAttribute
(String sAttrName) Removes the specified attribute.void
serialize
(OutputStream outStream, DOMSaveOptions options, int level, Node prevSibling) The helper function used by saveXML()void
setAttribute
(String sValue, String sAttrName) XFAPackets have no formal schema, so setProperty does not work to set attributes.void
setContent
(String sContent) Sets this packet's content.void
setXmlPeer
(Node peer) Methods inherited from class com.adobe.xfa.Element
appendChild, appendChild, appendPI, appendPI, assignNode, clone, clone, connectPeerToDocument, constructKey, constructKeys, copyContent, defaultAttribute, defaultElement, defaultElement, establishID, evaluate, explodeQName, findAttr, findSchemaAttr, foundBadAttribute, foundBadAttribute, getAll, getAppModel, getAtom, getAttr, getAttribute, getAttribute, getAttributeByName, getAttrIndex, getAttrName, getAttrNS, getAttrProp, getAttrQName, getAttrVal, getChildReln, getClassAll, getClassIndex, getClassName, getDeltas, getElement, getElement, getElementClass, getElementLocal, getEnum, getEnum, getEventTable, getFirstXMLChild, getID, getIndex, getInheritedNS, getInstalledLocale, getIsNull, getLastXMLChild, getLineNumber, getLocalName, getModel, getNode, getNodes, getNodeSchema, getNS, getNumAttrs, getOneOfChild, getOneOfChild, getPI, getPI, getPrefix, getProperty, getProperty, getSaveXMLSaveTransient, getSchemaType, getScriptMethodInfo, getSibling, getText, getXFAChild, getXMLChild, getXMLName, getXPath, getXsiNilAttribute, inhibitPrettyPrint, inhibitPrettyPrint, insertChild, isContainer, isFragment, isHidden, isHidden, isIndexed, isInstalledLocaleAmbient, isLeaf, isNameSpaceAttr, isPropertySpecified, isPropertySpecified, isPropertyValid, isSpecified, isSpecified, isSpecified, isTransient, isTransparent, isValidChild, isValidElement, loadXML, loadXML, makeDefault, makeNonDefault, newAttribute, optimizeNameSpace, peekAttribute, peekElement, peekOneOfChild, peekProperty, peekProperty, postSave, preSave, privateSetName, processTextChildrenDuringParse, removeAttr, removeAttr, removeChild, removePI, removePI, removeWhiteSpace, removeXsiNilAttribute, replaceChild, resetPostLoadXML, resolveAndEnumerateChildren, resolveNodeCreate, resolvePrefix, saveFilteredXML, saveXML, saveXML, setAttribute, setAttribute, setAttribute, setAttribute, setAttrProp, setDefaultFlag, setDOMProperties, setElement, setIsDataWindowRoot, setIsIndexed, setLineNumber, setLocalName, setModel, setName, setNS, setOneOfChild, setProperty, setProperty, setQName, setSaveXMLSaveTransient, setTransparent, setXMLName, setXsiNilAttribute, updateFromPeer
Methods inherited from class com.adobe.xfa.Node
checkAncestorPerms, checkDescendentPerms, checkPerms, cleanDirtyFlags, compareVersions, getData, getFirstXMLChildElement, getLocked, getNextXFASibling, getNextXMLSibling, getNextXMLSiblingElement, getNodeAsXML, getOwnerDocument, getPIAsXML, getPIName, getPreviousXMLSibling, getPrivateName, getPropName, getSOMExpression, getSOMExpression, getSomName, getUniqueSOMName, getWillDirty, getXFAChildCount, getXFAParent, getXfaPeer, getXMLChildCount, getXMLParent, hasChanged, isDefault, isDirty, isMapped, isPermsLockSet, isTransient, locateChildByClass, locateChildByName, logValueChangeHelper, notifyPeers, performSOMAssignment, remove, resolveNode, resolveNode, resolveNode, resolveNodes, resolveNodes, sendMessenge, setDirty, setDocument, setLocked, setMapped, setPermsLock, setPrivateName, setWillDirty, setXfaPeer, unLock, validateSchema, validateUsage, validateUsageFailedIsFatal
Methods inherited from class com.adobe.xfa.Obj
addPeer, addPeeredNode, clearPeers, deafen, getClassAtom, getClassTag, getPeer, getScriptProperty, getScriptThis, invokeFunction, isDeaf, isMute, isSameClass, isSameClass, isSameClass, mute, peerRemoved, removePeer, removePeeredNode, setClass, setClassTag, setScriptProperty, unDeafen, unMute
-
Constructor Details
-
Packet
Instantiates a packet node.
-
-
Method Details
-
getAttribute
XFAPackets have no formal schema, so getProperty does not work to return attributes. Instead, provide an accessor to return arbitrary attribute values.- Parameters:
sAttrName
- The name of the attribute to return- Returns:
- the attribute value, or the empty string if it doesn't exist or is empty.
-
getContent
Gets this packet's content. If this packet has content, return it. Note that for packets that contain XML content, this should return an empty string.- Returns:
- the packet content. If this packet has text content, the text is returned. Note that for packets that contain XML content, an empty string is returned.
-
getName
Gets this packet's name. -
getScriptTable
- Overrides:
getScriptTable
in classElement
-
isValidAttr
Determines if the given attribute tag is a valid attribute of this packet.- Overrides:
isValidAttr
in classElement
- Parameters:
eTag
- the XFA tag to check- Returns:
- true if valid.
- See Also:
-
getFirstXFAChild
Gets this element's first child that is an XFA node.- Overrides:
getFirstXFAChild
in classElement
- Returns:
- null -- the children of packet nodes are not exposed.
-
serialize
public void serialize(OutputStream outStream, DOMSaveOptions options, int level, Node prevSibling) throws IOException, IOException Description copied from class:Node
The helper function used by saveXML()- Overrides:
serialize
in classElement
- Parameters:
outStream
- Streamfile to write tooptions
- save optionslevel
- the indent levelprevSibling
- our previous sibling -- needed for some markup options.- Throws:
IOException
- See Also:
-
removeAttribute
Removes the specified attribute.- Parameters:
sAttrName
- the name of the attribute to remove.
-
setAttribute
XFAPackets have no formal schema, so setProperty does not work to set attributes. Instead, this sets arbitrary attribute values. If the attribute exists, we populate it, if it doesn't exist we create it.- Parameters:
sValue
- The value of the attribute to setsAttrName
- The name of the attribute to set
-
setContent
Sets this packet's content.- Parameters:
sContent
- the text content value.
-
setXmlPeer
- Specified by:
setXmlPeer
in interfaceElement.DualDomNode
-
getXmlPeer
- Specified by:
getXmlPeer
in interfaceElement.DualDomNode
-