public class ProtoableNode extends Element
Element.DualDomNode, Element.ReplaceContent
Node.ChangeLogger
AttrIsDefault, AttrIsFragment, AttrIsTransient, CREATEACTION
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE, gsXFANamespacePrefix
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 and Description |
---|
ProtoableNode() |
Modifier and Type | Method and Description |
---|---|
Element |
clone(Element parent,
boolean bDeep)
clone will establish any proto relationships
|
ProtoableNode |
createProto(Element parent,
boolean bFull) |
Attribute |
elementGetAttribute(int eTag,
boolean bPeek,
boolean bValidate)
We need this method so that derived classes can explicitly call the
getAttribute() method on Element.
|
boolean |
externalProtoFailed() |
void |
fetchIDValues(List<String> idValues) |
Attribute |
getAttribute(int eTag,
boolean bPeek,
boolean bValidate)
Gets this element's attribute whose attribute tag is given.
|
Attribute |
getAttributeByName(String aAttrName,
boolean bSearchProto)
get the named attribute.
|
Element |
getElement(int eTag,
boolean bPeek,
int nOccurrence,
boolean bReturnDefault,
boolean bValidate)
Gets this element's sub element whose element tag is given.
|
ProtoableNode |
getExternalProtoSource()
Get the external prototype reference node used in the creation of this node
|
Node |
getOneOfChild(boolean bPeek,
boolean bReturnDefault) |
void |
getPI(String aPiName,
List<String> pis,
boolean bCheckProtos)
Get the processing instruction based on the aPiName.
|
void |
getPI(String aPiName,
String sPropName,
List<String> pis,
boolean bCheckProtos)
Get the processing instruction based on the aPiName.
|
ProtoableNode |
getProto()
Get the reference node for this node
|
ProtoableNode |
getProtoed(int nIndex) |
ScriptTable |
getScriptTable() |
TextNode |
getText(boolean bPeek,
boolean bReturnDefault,
boolean bValidate)
Gets the first text node child.
|
boolean |
hasExternalProto() |
boolean |
hasProto()
Check if this node has a reference node
|
boolean |
isContextSensitiveAttribute(int eTag) |
boolean |
isDefault(boolean bCheckProto) |
boolean |
isSpecified(int eTag,
int eType,
boolean bCheckProtos,
int nOccurrence) |
void |
notifyPeers(int eventType,
String arg1,
Object arg2)
This method will be called whenever its state changes.
|
boolean |
performResolveProtos(boolean bResolveExternalProtos) |
void |
preSave(boolean bSaveXMLScript) |
static void |
releaseExternalProtos(ProtoableNode node)
Static helper method to help prevent memory leaks in the case of circular
fragment references.
|
boolean |
reResolveProto(boolean bFull)
remove any existing proto children and re-resolve the proto
|
boolean |
resolveProto(ProtoableNode srcProto,
boolean bFull,
boolean bMarkTransient,
boolean bSrcIsExternal) |
void |
setAttribute(Attribute attr,
int eTag)
Sets an attribute of this element.
|
Node |
setElement(Node child,
int eTag,
int nOccurrence)
Set an element value.
|
Node |
setOneOfChild(Node child)
In the case where an element may contain a "OneOf" child, this method
will set the child element that has the XFA::oneOfChild relationship.
|
void |
setPermsLock(boolean bPermsLock)
Sets the permissions state of this node.
|
void |
setProto(ProtoableNode refProto) |
void |
updateIDValues(String sPrefix,
List<String> oldReferenceList) |
appendChild, appendChild, appendPI, appendPI, assignNode, clone, connectPeerToDocument, constructKey, constructKeys, copyContent, defaultAttribute, defaultElement, defaultElement, establishID, evaluate, explodeQName, findAttr, findSchemaAttr, foundBadAttribute, foundBadAttribute, getAll, getAppModel, getAtom, getAttr, getAttribute, getAttrIndex, getAttrName, getAttrNS, getAttrProp, getAttrQName, getAttrVal, getChildReln, getClassAll, getClassIndex, getClassName, getDeltas, getElement, getElementClass, getElementLocal, getEnum, getEnum, getEventTable, getFirstXFAChild, getFirstXMLChild, getID, getIndex, getInheritedNS, getInstalledLocale, getIsNull, getLastXMLChild, getLineNumber, getLocalName, getModel, getName, getNode, getNodes, getNodeSchema, getNS, getNumAttrs, getOneOfChild, getPrefix, getProperty, getProperty, getSaveXMLSaveTransient, getSchemaType, getScriptMethodInfo, getSibling, getXFAChild, getXMLChild, getXMLName, getXPath, getXsiNilAttribute, inhibitPrettyPrint, inhibitPrettyPrint, insertChild, isContainer, isFragment, isHidden, isHidden, isIndexed, isInstalledLocaleAmbient, isLeaf, isNameSpaceAttr, isPropertySpecified, isPropertySpecified, isPropertyValid, isSpecified, isSpecified, isTransient, isTransparent, isValidAttr, isValidChild, isValidElement, loadXML, loadXML, makeDefault, makeNonDefault, newAttribute, optimizeNameSpace, peekAttribute, peekElement, peekOneOfChild, peekProperty, peekProperty, postSave, privateSetName, processTextChildrenDuringParse, removeAttr, removeAttr, removeChild, removePI, removePI, removeWhiteSpace, removeXsiNilAttribute, replaceChild, resetPostLoadXML, resolveAndEnumerateChildren, resolveNodeCreate, resolvePrefix, saveFilteredXML, saveXML, saveXML, serialize, setAttribute, setAttribute, setAttribute, setAttrProp, setDefaultFlag, setDOMProperties, setIsDataWindowRoot, setIsIndexed, setLineNumber, setLocalName, setModel, setName, setNS, setProperty, setProperty, setQName, setSaveXMLSaveTransient, setTransparent, setXMLName, setXsiNilAttribute, updateFromPeer
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, isDirty, isMapped, isPermsLockSet, isTransient, locateChildByClass, locateChildByName, logValueChangeHelper, performSOMAssignment, remove, resolveNode, resolveNode, resolveNode, resolveNodes, resolveNodes, sendMessenge, setDirty, setDocument, setLocked, setMapped, setPrivateName, setWillDirty, setXfaPeer, unLock, validateSchema, validateUsage, validateUsageFailedIsFatal
addPeer, addPeeredNode, clearPeers, deafen, getClassAtom, getClassTag, getPeer, getScriptProperty, getScriptThis, invokeFunction, isDeaf, isMute, isSameClass, isSameClass, isSameClass, mute, peerRemoved, removePeer, removePeeredNode, setClass, setClassTag, setScriptProperty, unDeafen, unMute
public Element clone(Element parent, boolean bDeep)
public ProtoableNode createProto(Element parent, boolean bFull)
public Attribute elementGetAttribute(int eTag, boolean bPeek, boolean bValidate)
public final boolean externalProtoFailed()
public ProtoableNode getProtoed(int nIndex)
public ScriptTable getScriptTable()
getScriptTable
in class Element
public Attribute getAttribute(int eTag, boolean bPeek, boolean bValidate)
Element
To peek at an attribute, set the peek argument to true. If the attribute is present, it is returned; otherwise null is returned.
To create an attribute, set the peek argument to false. If the attribute is absent, a default attribute is created and returned; for attributes with no default, null is returned.
If validation argument is true, and the validation fails, this method throws.
getAttribute
in class Element
eTag
- the tag of the attribute.bPeek
- whether to peek at the attribute or not.bValidate
- whether to validate the attribute or not.public Attribute getAttributeByName(String aAttrName, boolean bSearchProto)
getAttributeByName
in class Element
aAttrName
- - the attribute name.bSearchProto
- - whether to search protos.public Element getElement(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate)
Element
To return the element, set the returnDefault argument to true. If the element is present, it is returned; otherwise the default element is created and returned.
To peek at the element, set the peek argument to true. If the element is present, it is returned; otherwise null is returned. When set to true, default properties aren't created, and proto references are not expanded.
To create the element, set the peek argument to false. If the element is absent, a default element is created and returned.
If validation argument is true, and the validation fails, this method throws.
If the occurrence argument is out of range, this method throws.
getElement
in class Element
eTag
- the tag of the element to retrieve.bPeek
- whether to peek at the element, or not.nOccurrence
- the n'th occurrence of the element to retrieve.bReturnDefault
- whether to create a default element, or not.bValidate
- whether to validate the element, or not.public Node getOneOfChild(boolean bPeek, boolean bReturnDefault)
getOneOfChild
in class Element
public void getPI(String aPiName, List<String> pis, boolean bCheckProtos)
Element
getPI
in class Element
aPiName
- the processing instruction's target name. This String must be interned.pis
- an input/output parameter that is populated with the values of
all the Processing Instructions found for PI name. with the
same aPiName.bCheckProtos
- if TRUE, check if this element is specified via prototype
inheritance. Defaults to FALSE.public void getPI(String aPiName, String sPropName, List<String> pis, boolean bCheckProtos)
Element
getPI
in class Element
aPiName
- the processing instructions target namesPropName
- the processing instructions property namepis
- an input/output parameter that is populated with the values of
all the Processing Instructions found for PI name. with the
same aPiName.bCheckProtos
- if TRUE, check if this element is specified via prototype
inheritance. Defaults to FALSE.public ProtoableNode getProto()
public ProtoableNode getExternalProtoSource()
public final TextNode getText(boolean bPeek, boolean bReturnDefault, boolean bValidate)
public boolean hasExternalProto()
public boolean hasProto()
public boolean isContextSensitiveAttribute(int eTag)
public boolean isDefault(boolean bCheckProto)
isDefault
in class Node
Node.isDefault(boolean)
public boolean isSpecified(int eTag, int eType, boolean bCheckProtos, int nOccurrence)
isSpecified
in class Element
public void notifyPeers(int eventType, String arg1, Object arg2)
notifyPeers
in interface Peer
notifyPeers
in class Node
eventType
- the event type as enumerated in this classarg1
- additional event informationarg2
- additional event informationpublic boolean performResolveProtos(boolean bResolveExternalProtos)
public void preSave(boolean bSaveXMLScript)
preSave
in class Element
Node.preSave(boolean)
public final boolean reResolveProto(boolean bFull)
bFull
- see resolveProtopublic boolean resolveProto(ProtoableNode srcProto, boolean bFull, boolean bMarkTransient, boolean bSrcIsExternal)
public Node setElement(Node child, int eTag, int nOccurrence)
Element
setElement
in class Element
child
- the child to add or set.eTag
- only used if oChild isNull -- in which case we remove the
elementElement.setElement(Node, int, int)
public Node setOneOfChild(Node child)
Element
setOneOfChild
in class Element
child
- the child to set. If this is a null object, any any existing
"oneOf" child will be deleted.Element.setOneOfChild(Node)
public void setAttribute(Attribute attr, int eTag)
setAttribute
in class Element
attr
- the attribute.eTag
- The XFA tag name of the attribute being set.public void setPermsLock(boolean bPermsLock)
Node
setPermsLock
in class Node
bPermsLock
- the permissions state to set this node to: true
will lock the node; false
will unlock the node.public void setProto(ProtoableNode refProto)
public static void releaseExternalProtos(ProtoableNode node)
Copyright © 2010 - 2020 Adobe. All Rights Reserved