Class Element
- java.lang.Object
-
- com.adobe.xfa.Obj
-
- com.adobe.xfa.Node
-
- com.adobe.xfa.Element
-
- All Implemented Interfaces:
Peer
- Direct Known Subclasses:
ConfigurationElement
,DataModel.AttributeWrapper
,DataNode
,Document
,DSigData
,LayoutNode
,Model
,ModelPeer
,Packet
,Policy
,ProtoableNode
,RichTextNode
,SVGNode
,WSDLNode
public class Element extends Node
A class to represent the XFA elements in a DOM. Elements differ from nodes in that they all conform to an XFA schema. All the XML commentsComment
and processing instructionsProcessingInstruction
of a DOM, lie outside the XFA schemas.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Element.DualDomNode
Interface that is implemented by classes that use a dual XFA/XML DOM.static class
Element.ReplaceContent
Specifies handling of existing node content when XML content is loaded.-
Nested classes/interfaces inherited from class com.adobe.xfa.Node
Node.ChangeLogger
-
-
Field Summary
Fields Modifier and Type Field Description static int
AttrIsDefault
static int
AttrIsFragment
static int
AttrIsTransient
static int
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 Constructor Description Element(Element parent, Node prevSibling, java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes, int classTag, java.lang.String className)
Instantiates an element node with the given properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
appendChild(Node child)
void
appendChild(Node child, boolean bValidate)
Appends the given child to this element.void
appendPI(java.lang.String aPiName, java.lang.String sData)
void
appendPI(java.lang.String aPiName, java.lang.String sPropName, java.lang.String sData)
Node
assignNode(java.lang.String sSOMExpression, java.lang.String sValue, int eMode)
Assigns the value given to the node located by the given SOM (Scripting Object Model) expression and interpreted relative to this element's context.Node
clone(Element parent)
Element
clone(Element parent, boolean deep)
void
connectPeerToDocument()
connectPeerToDocument() is used to rearrange the DOM tree when inserting or appending a node.Key
constructKey(java.util.List<java.lang.String> nodeAddressList, Node namespaceContextNode)
Constructs a key (either primary or foreign) for an element given a node address list.void
constructKeys(java.util.List<java.lang.String> nodeAddressList, Node namespaceContextNode, java.util.List<Key> keys)
void
copyContent(Element newNode, boolean deep)
Attribute
defaultAttribute(int eTag)
int
defaultElement()
Returns the class tag of the default one-of child (if there is one)Node
defaultElement(int eTag, int nOccurrence)
java.lang.String
establishID()
Arg
evaluate(java.lang.String sEvalText, java.lang.String sEvalTypeText, int executeReason, boolean bReportNonFatalErrors)
Evaluates a fragment of script.static void
explodeQName(java.lang.String aQName, StringHolder aPrefix, StringHolder aLocalName)
int
findAttr(java.lang.String URI, java.lang.String name)
Find an attribute value by the combination of URI and name.int
findSchemaAttr(java.lang.String name)
Find an attribute value by name.void
foundBadAttribute(int eTag, java.lang.String attrValue)
void
foundBadAttribute(java.lang.String attrName, java.lang.String attrValue)
NodeList
getAll(boolean bByName)
Return the collection of like-named, in-scope, nodes.AppModel
getAppModel()
java.lang.String
getAtom(int eTag)
get an attribute value, will return the default attribute value if none exist NON validatingAttribute
getAttr(int n)
Gets this element's n'th attribute.Attribute
getAttribute(int eAttributeTag)
Gets this element's attribute with the given tag.Attribute
getAttribute(int eTag, boolean bPeek, boolean bValidate)
Gets this element's attribute whose attribute tag is given.Attribute
getAttributeByName(java.lang.String aAttrName, boolean bSearchProto)
get the named attribute.int
getAttrIndex(Attribute attr)
get the index of this attribute.java.lang.String
getAttrName(int index)
java.lang.String
getAttrNS(int index)
boolean
getAttrProp(int attrIndex, int eProp)
Get one of the volatile attribute properties.java.lang.String
getAttrQName(int index)
java.lang.String
getAttrVal(int index)
ChildReln
getChildReln(int eTag)
NodeList
getClassAll()
Return the collection of like-class, in-scope, nodes.int
getClassIndex()
Return the position of this node in its collection of like-class, in-scope, like-child relationship, nodes.java.lang.String
getClassName()
Gets this element's class name.void
getDeltas(Element delta, XFAList list)
Gets a collection of deltas to restore.Element
getElement(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate)
Gets this element's sub element whose element tag is given.Element
getElement(int eElementTag, int nOccurrence)
get an element for a given node, The method will create a default if it doesn't exist.int
getElementClass()
Element
getElementLocal(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate)
This method does the work of getElement().int
getEnum(int ePropertyTag)
EnumAttr
getEnum(java.lang.String sPropertyName)
EventManager.EventTable
getEventTable(boolean bCreate)
Node
getFirstXFAChild()
Gets this element's first XFA child.Node
getFirstXMLChild()
Gets this element's first XML child.java.lang.String
getID()
int
getIndex(boolean bByName)
Return the position of this node in its collection of like-named, in-scope, like-child relationship, nodes.java.lang.String
getInheritedNS()
Get our namespace by traversing to our ancestors if necessary.java.lang.String
getInstalledLocale()
Gets this element's installed locale.boolean
getIsNull()
Determine if this node contains a null value.Node
getLastXMLChild()
Gets this element's last XML child.int
getLineNumber()
java.lang.String
getLocalName()
Model
getModel()
Gets this element's model.java.lang.String
getName()
Gets this element's name.Node
getNode(int eTag, int nOccurrence)
A variant of getElement that peeks for a non-Element and returns it if it exists, otherwise falls back on getElement with bPeek = true (don't create a default).NodeList
getNodes()
Gets this element's list of children.NodeSchema
getNodeSchema()
Gets the Schema for this node.java.lang.String
getNS()
Gets this element's namespace.int
getNumAttrs()
Gets this element's number of attributes.Node
getOneOfChild()
In the case where an element may contain a "OneOf" child, this method will retrieve the child element that has the XFA::oneOfChild relationship to its parent.Node
getOneOfChild(boolean bPeek, boolean bReturnDefault)
void
getPI(java.lang.String aPiName, java.lang.String sPropName, java.util.List<java.lang.String> pis, boolean bCheckProtos)
Get the processing instruction based on the aPiName.void
getPI(java.lang.String aPiName, java.util.List<java.lang.String> pis, boolean bCheckProtos)
Get the processing instruction based on the aPiName.java.lang.String
getPrefix()
Gets this element's namespace prefix.java.lang.Object
getProperty(int ePropTag, int nOccurrence)
Get a property for this node.java.lang.Object
getProperty(java.lang.String propertyName, int nOccurrence)
string version of getProperty.boolean
getSaveXMLSaveTransient()
int
getSchemaType(int eTag)
ScriptFuncObj
getScriptMethodInfo(java.lang.String sFunctionName)
Gets the information on a script method.ScriptTable
getScriptTable()
Node
getSibling(int index, boolean bByName, boolean bExceptionIfNotFound)
a (not so) private method, overrides Node.getSibling()TextNode
getText(boolean bPeek, boolean bReturnDefault, boolean bValidate)
Gets this element's text node child.Node
getXFAChild(int n)
Gets this element's n'th XFA child.Node
getXMLChild(int n)
Gets this element's n'th XML child.java.lang.String
getXMLName()
Gets this element's XML name.java.lang.String
getXPath(java.util.Map<java.lang.String,java.lang.String> prefixList, Element contextNode)
Attribute
getXsiNilAttribute()
boolean
inhibitPrettyPrint()
void
inhibitPrettyPrint(boolean bInhibit)
void
insertChild(Node newChild, Node refNode, boolean bValidate)
Inserts a child before a specific child in the child list.boolean
isContainer()
Check to see if this is a container object.void
isFragment(boolean bFragment, boolean bSetChildren)
Set the fragment state of this nodeboolean
isHidden()
Determine if this node is hidden or not.void
isHidden(boolean bHidden)
Set the hidden state of this node.boolean
isIndexed()
boolean
isInstalledLocaleAmbient()
Determines if this element's installed locale is ambient.boolean
isLeaf()
Check if this node is a leaf nodeboolean
isNameSpaceAttr()
Is this element's name namespaced.boolean
isPropertySpecified(int ePropTag, boolean bCheckProtos, int nOccurrence)
Check if a specific property has been defined for this node.boolean
isPropertySpecified(java.lang.String propertyName, boolean bCheckProtos, int nOccurrence)
boolean
isPropertyValid(int ePropTag)
Check if a specified property is valid according to the schema.boolean
isSpecified(int eTag, boolean bCheckProtos, int nOccurrence)
Check if a property, child, or oneOfChild has been defined for this nodeboolean
isSpecified(int eTag, int eType, boolean bCheckProtos, int nOccurrence)
boolean
isSpecified(java.lang.String sPropertyName, boolean bCheckProtos, int nOccurrence)
void
isTransient(boolean bTransient, boolean bSetChildren)
Set the transient state of this node.boolean
isTransparent()
boolean
isValidAttr(int eTag, boolean bReport, java.lang.String value)
Determine if a specified attribute tag is valid for this node.boolean
isValidChild(int eTag, int nError, boolean bBeforeInsert, boolean bOccurrenceErrorOnly)
boolean
isValidElement(int eTag, boolean bReport)
void
loadXML(java.io.InputStream is, boolean bIgnoreAggregatingTag, boolean bReplaceContent)
Loads and appends the specified XML fragment (or document) to this element.void
loadXML(java.io.InputStream is, boolean bIgnoreAggregatingTag, Element.ReplaceContent eReplaceContent)
Loads and appends the specified XML fragment (or document) to this element.void
makeDefault()
Mark this element as a default propertyvoid
makeNonDefault(boolean bRecursive)
Mark this element to indicate it is not a default propertyAttribute
newAttribute(int eTag, java.lang.String value)
void
optimizeNameSpace(int eAttributeTag, boolean bDeleteIfNotNeeded)
For use with attributes that live in a non-standard namespace.Attribute
peekAttribute(int eAttributeTag)
get an attribute value only if it exists.Element
peekElement(int eElementTag, boolean bReturnDefault, int nOccurrence)
get an element only if it exists NON validating READ ONLY VERSIONNode
peekOneOfChild(boolean bReturnDefault)
Deprecated.UsegetOneOfChild(true, bReturnDefault)
instead.java.lang.Object
peekProperty(int ePropTag, int nOccurrence)
java.lang.Object
peekProperty(java.lang.String propertyName, int nOccurrence)
void
postSave()
void
preSave(boolean bSaveXMLScript)
void
privateSetName(java.lang.String name)
This version will not perform any notification or undo steps.boolean
processTextChildrenDuringParse()
Determines whether child text nodes should be processed (check validity, consolidate) at parse time.void
removeAttr(int index)
void
removeAttr(java.lang.String URI, java.lang.String name)
Remove an attribute as specified by the combination of URI and name.void
removeChild(Node child)
Removes a child from the child listvoid
removePI(java.lang.String aPiName)
Remove all processing instruction based on the aPiName.void
removePI(java.lang.String aPiName, java.lang.String sPropName)
void
removeWhiteSpace()
Remove all #text children that consist of whitespacevoid
removeXsiNilAttribute()
Node
replaceChild(Node newChild, Node oldChild)
void
resetPostLoadXML()
NodeList
resolveAndEnumerateChildren(boolean bAllProperties, boolean bFirstDefaultOnly)
Construct a list of element-based properties and children.SOMParser.SomResultInfo
resolveNodeCreate(java.lang.String somNodesInput, int eAction, boolean bLeaf, boolean bDefault, boolean bNoProperties)
java.lang.String
resolvePrefix(java.lang.String aPrefix)
void
saveFilteredXML(NodeList nodeList, java.io.OutputStream outFile, DOMSaveOptions options)
void
saveXML(java.io.OutputStream outFile, DOMSaveOptions options)
Serializes this element (and all its children) to an output stream.void
saveXML(java.io.OutputStream outFile, DOMSaveOptions options, boolean bSaveXMLScript)
Serializes this element (and all its children) to an output stream.void
serialize(java.io.OutputStream outStream, DOMSaveOptions options, int level, Node prevSibling)
The helper function used by saveXML()void
setAttribute(int eVal, int eTag)
Sets (adds) an enumerated attribute value to this element.void
setAttribute(Attribute attr, int eTag)
Sets (adds) an attribute to this element.Attribute
setAttribute(java.lang.String nameSpace, java.lang.String qName, java.lang.String localName, java.lang.String value)
Sets (adds) an attribute to this element.Attribute
setAttribute(java.lang.String nameSpace, java.lang.String qName, java.lang.String localName, java.lang.String value, boolean internSymbols)
Sets (adds) an attribute to this element.void
setAttrProp(int attrIndex, int eProp, boolean bValue)
Set one of the volatile attribute properties.void
setDefaultFlag(boolean bDefaultNode, boolean bSetChildren)
void
setDOMProperties(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
All name properties (including those in attributes) must be interned strings.Node
setElement(Node child, int eTag, int nOccurrence)
Set an element value.void
setIsDataWindowRoot(boolean bIsRoot)
void
setIsIndexed(boolean bIsIndexed)
Set whether this node has an XMLIDvoid
setLineNumber(int nLineNumber)
void
setLocalName(java.lang.String name)
Sets this element's local name.void
setModel(Model model)
Sets this element's model.void
setName(java.lang.String name)
Sets this element's name attribute.void
setNS(java.lang.String sNS)
Sets this element's children null namespace to the given uri.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
setProperty(java.lang.Object property, int ePropertyTag)
Set a property for this node.void
setProperty(java.lang.Object property, java.lang.String propertyName)
string version of setProperty.void
setQName(java.lang.String name)
Sets this element's qualified name.void
setSaveXMLSaveTransient(boolean bSaveTransient)
void
setTransparent(boolean isTransparent)
void
setXMLName(java.lang.String name)
Sets this element's XML name.void
setXsiNilAttribute(java.lang.String aValue)
void
updateFromPeer(java.lang.Object peer, int eventType, java.lang.String arg1, java.lang.Object arg2)
This method will be called by the peer whenever its state changes.-
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
-
-
-
-
Field Detail
-
AttrIsDefault
public static final int AttrIsDefault
- See Also:
- Constant Field Values
-
AttrIsFragment
public static final int AttrIsFragment
- See Also:
- Constant Field Values
-
AttrIsTransient
public static final int AttrIsTransient
- See Also:
- Constant Field Values
-
CREATEACTION
public static final int CREATEACTION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Element
public Element(Element parent, Node prevSibling, java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes, int classTag, java.lang.String className)
Instantiates an element node with the given properties. All name properties (including those in attributes) must be interned strings.- Parameters:
parent
- the element's parent, if any.prevSibling
- the element's previous sibling, if any.uri
- the element's namespace URI.localName
- the element's local name.qName
- the element's qualified name.attributes
- the element's list of XML attributes.classTag
- the element's class tag.className
- the element's class name.
-
-
Method Detail
-
appendChild
public void appendChild(Node child)
-
appendChild
public void appendChild(Node child, boolean bValidate)
Appends the given child to this element.- Parameters:
child
- the child node being appended.bValidate
- when true, ensures the given child is valid per the model's schema and throws anExFull
if not.
-
appendPI
public final void appendPI(java.lang.String aPiName, java.lang.String sData)
-
appendPI
public final void appendPI(java.lang.String aPiName, java.lang.String sPropName, java.lang.String sData)
-
assignNode
public final Node assignNode(java.lang.String sSOMExpression, java.lang.String sValue, int eMode)
Assigns the value given to the node located by the given SOM (Scripting Object Model) expression and interpreted relative to this element's context.If the node doesn't exist, it can be created depending of the value of the given eMode. The eMode values are those identified in
Node.assignNode()
.- Overrides:
assignNode
in classNode
- Parameters:
sSOMExpression
- a SOM expression evaluating to a node.sValue
- the value to be assigned.eMode
- specifies whether the node should be created or not.- Returns:
- the node identified by the SOM expression.
-
copyContent
public void copyContent(Element newNode, boolean deep)
-
defaultAttribute
public Attribute defaultAttribute(int eTag)
-
defaultElement
public int defaultElement()
Returns the class tag of the default one-of child (if there is one)- Returns:
- the integer tag for the default element.
-
defaultElement
public Node defaultElement(int eTag, int nOccurrence)
- Parameters:
eTag
- The tag of the attribute we wantnOccurrence
- The zero-based occurrence of the attribute (usually zero)- Returns:
- the default value for this attribute in the context of this node.
-
establishID
public final java.lang.String establishID()
-
evaluate
public final Arg evaluate(java.lang.String sEvalText, java.lang.String sEvalTypeText, int executeReason, boolean bReportNonFatalErrors)
Evaluates a fragment of script. This function is analogous to the built-in scripting capability wherein script fragments can be contained in "xfe:script" and "xfe:contentType" attributes in a file.- Parameters:
sEvalText
- - the text to execute.sEvalTypeText
- - the language name. This can be the name of a script language for which the application has installed a handler, such as "formcalc" or "javascript", or an empty string. An empty string is equivalent to "formcalc". Note that the appropriate language handler must be installed by the application.- Returns:
- The return value of the script.
-
findAttr
public final int findAttr(java.lang.String URI, java.lang.String name)
Find an attribute value by the combination of URI and name.- Parameters:
URI
- the namespace for this attribute. If null, don't worry about namespace matching. If non-null, this String must be interned.name
- the name of the attribute. This String must be interned.- Returns:
- The position of this attribute, or -1 if not found.
-
findSchemaAttr
public final int findSchemaAttr(java.lang.String name)
Find an attribute value by name. The attribute must be in a compatible namespace with the model.- Parameters:
name
- the name of the attribute. This String must be interned.- Returns:
- The position of this attribute. -1 if not found.
-
foundBadAttribute
public final void foundBadAttribute(int eTag, java.lang.String attrValue)
-
foundBadAttribute
public final void foundBadAttribute(java.lang.String attrName, java.lang.String attrValue)
-
getAll
public final NodeList getAll(boolean bByName)
Return the collection of like-named, in-scope, nodes.
-
getAppModel
public AppModel getAppModel()
-
getAtom
public java.lang.String getAtom(int eTag)
get an attribute value, will return the default attribute value if none exist NON validating
-
getAttr
public final Attribute getAttr(int n)
Gets this element's n'th attribute.- Parameters:
n
- the zero-based index of the attribute.- Returns:
- the n'th attribute.
-
getAttribute
public Attribute getAttribute(int eAttributeTag)
Gets this element's attribute with the given tag. It will return the default attribute value if none exist. Beware: it will NOT validate.
-
getAttribute
public Attribute getAttribute(int eTag, boolean bPeek, boolean bValidate)
Gets this element's attribute whose attribute tag is given.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.
- Parameters:
eTag
- the tag of the attribute.bPeek
- whether to peek at the attribute or not.bValidate
- whether to validate the attribute or not.- Returns:
- the attribute.
-
getAttributeByName
public Attribute getAttributeByName(java.lang.String aAttrName, boolean bSearchProto)
get the named attribute.- Parameters:
aAttrName
- - the attribute name.bSearchProto
- - whether to search protos.- Returns:
- Attribute object, which may be null.
-
getAttrIndex
public final int getAttrIndex(Attribute attr)
get the index of this attribute.- Parameters:
attr
- the attribute to find.- Returns:
- the index position in the attribute array.
-
getAttrName
public final java.lang.String getAttrName(int index)
-
getAttrNS
public final java.lang.String getAttrNS(int index)
- Parameters:
index
- the index of the attribute.- Returns:
- the namespace of the attribute at the specified index. This String must be interned.
-
getAttrProp
public final boolean getAttrProp(int attrIndex, int eProp)
Get one of the volatile attribute properties. Since attributes are immutable, we can't store these properties in the attributes themselves.- Parameters:
attrIndex
- The offset into the attribute array.eProp
- The property to return. One of AttrIsDefault, AttrIsFragment, AttrIsTransient.- Returns:
- the boolean value of the property
-
getAttrQName
public final java.lang.String getAttrQName(int index)
-
getAttrVal
public final java.lang.String getAttrVal(int index)
-
getXMLChild
public final Node getXMLChild(int n)
Gets this element's n'th XML child.- Parameters:
n
- the zero-based index of the XML child.- Returns:
- the n'th child.
-
getXFAChild
public final Node getXFAChild(int n)
Gets this element's n'th XFA child.- Parameters:
n
- the zero-based index of the XFA child.- Returns:
- the n'th child.
-
getChildReln
public final ChildReln getChildReln(int eTag)
-
getClassAll
public final NodeList getClassAll()
Return the collection of like-class, in-scope, nodes.- Returns:
- the collection.
-
getClassIndex
public final int getClassIndex()
Return the position of this node in its collection of like-class, in-scope, like-child relationship, nodes.- Returns:
- the 0-based position
-
getClassName
public final java.lang.String getClassName()
Gets this element's class name.- Overrides:
getClassName
in classObj
- Returns:
- the class name as an interned string.
-
getDeltas
public void getDeltas(Element delta, XFAList list)
Gets a collection of deltas to restore. The locale attribute is always restored immediately, and is not returned in the list of deltas.- Parameters:
delta
- an Element from the form packet.list
- the list of deltas to be populated.
-
getElement
public Element getElement(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate)
Gets this element's sub element whose element tag is given.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.
- Parameters:
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.- Returns:
- the element, or null.
-
getElement
public final Element getElement(int eElementTag, int nOccurrence)
get an element for a given node, The method will create a default if it doesn't exist. NON validating
-
getNode
public final Node getNode(int eTag, int nOccurrence)
A variant of getElement that peeks for a non-Element and returns it if it exists, otherwise falls back on getElement with bPeek = true (don't create a default). Used by compareVersions below.
-
getElementLocal
public final Element getElementLocal(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate)
This method does the work of getElement(). It's been split out so that it can be called by derived classes who don't want proto resolution to step in.
-
getElementClass
public final int getElementClass()
-
getEnum
public final int getEnum(int ePropertyTag)
-
getEnum
public final EnumAttr getEnum(java.lang.String sPropertyName)
-
getEventTable
public EventManager.EventTable getEventTable(boolean bCreate)
-
getFirstXMLChild
public Node getFirstXMLChild()
Gets this element's first XML child.- Overrides:
getFirstXMLChild
in classNode
- Returns:
- the first XML child.
-
getSibling
public final Node getSibling(int index, boolean bByName, boolean bExceptionIfNotFound)
a (not so) private method, overrides Node.getSibling()- Overrides:
getSibling
in classNode
-
getFirstXFAChild
public Node getFirstXFAChild()
Gets this element's first XFA child.- Overrides:
getFirstXFAChild
in classNode
- Returns:
- the first XFA child.
-
getID
public final java.lang.String getID()
-
getIndex
public final int getIndex(boolean bByName)
Return the position of this node in its collection of like-named, in-scope, like-child relationship, nodes.
-
getInheritedNS
public final java.lang.String getInheritedNS()
Get our namespace by traversing to our ancestors if necessary.- Returns:
- [inherited] namespace string
-
getInstalledLocale
public final java.lang.String getInstalledLocale()
Gets this element's installed locale. This method checks all enclosing field, draw, or subform ancestors, looking for their locale attribute.- Returns:
- the installed locale name.
-
isInstalledLocaleAmbient
public final boolean isInstalledLocaleAmbient()
Determines if this element's installed locale is ambient.- Returns:
- true if the installed locale name is "ambient", and false otherwise.
- See Also:
getInstalledLocale()
-
getIsNull
public boolean getIsNull()
Determine if this node contains a null value.- Returns:
- true if this node contains a null value, false otherwise.
-
getLastXMLChild
public final Node getLastXMLChild()
Gets this element's last XML child.- Overrides:
getLastXMLChild
in classNode
- Returns:
- the last XML child.
-
getLineNumber
public final int getLineNumber()
-
getLocalName
public java.lang.String getLocalName()
- Returns:
- the local name as an interned string.
-
getModel
public final Model getModel()
Gets this element's model.
-
getName
public java.lang.String getName()
Gets this element's name.The name of an element is the value of its name attribute, or the element name if there is no name attribute.
-
privateSetName
public void privateSetName(java.lang.String name)
This version will not perform any notification or undo steps. Should only be called when a node is being created.
-
getNodes
public NodeList getNodes()
Gets this element's list of children.
-
getNodeSchema
public final NodeSchema getNodeSchema()
Gets the Schema for this node.- Returns:
- an NodeSchema object.
-
getNS
public java.lang.String getNS()
Gets this element's namespace.- Returns:
- the namespace URI.
-
getNumAttrs
public final int getNumAttrs()
Gets this element's number of attributes.- Returns:
- the number of attributes.
-
getOneOfChild
public final Node getOneOfChild()
In the case where an element may contain a "OneOf" child, this method will retrieve the child element that has the XFA::oneOfChild relationship to its parent.
When one only one child node out of a set of nodes can exist for a particular node, then that set of nodes is called a oneOf children
Note!
This method is the only reliable means to return a oneOf child. Other interfaces (e.g. getProperty()) will not interpret default values or handle prototypes correctly for oneOf children.- Returns:
- the Node for this child. If this child has not been specified, this method will return the appropriate XFA default element.
-
getOneOfChild
public Node getOneOfChild(boolean bPeek, boolean bReturnDefault)
-
getPI
public void getPI(java.lang.String aPiName, java.util.List<java.lang.String> pis, boolean bCheckProtos)
Get the processing instruction based on the aPiName. If multiple Processing Instructions exist for the same aPiName, all PI's found with that name will be returned.- Parameters:
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.
-
optimizeNameSpace
public void optimizeNameSpace(int eAttributeTag, boolean bDeleteIfNotNeeded)
For use with attributes that live in a non-standard namespace. Currently the only attribute for which this is true is XFA::RIDTAG. This method has no effect for other attributes. This method declares the namespace of the specified attribute on this node. The purpose of doing this is to optimize file size when the attribute is present in the document. Otherwise the namespace will be declared with each occurrence of the attribute, leading to file bloat. For the XFA::RIDTAG attribute, this method will declare the urn:oasis:names:tc:xliff:document:1.1 namespace on the template model with the standard prefix "xliff".- Parameters:
eAttributeTag
- - the attribute (currently only XFA::RIDTAG will have any effect).bDeleteIfNotNeeded
- - if FALSE, simply declare the namespace unconditionally. This is very efficient, but if the attribute is never used in the document then the declaration of the namespace is superfluous. If TRUE, search the descendants of this node to see if the attribute is in use; if it's not in use then delete any declarations of the attribute's namespace at any level of the tree under this node. If the attribute is in use then this will have the net effect of the FALSE setting. No superfluous namespace declaration will occur with the TRUE setting.
-
getPI
public void getPI(java.lang.String aPiName, java.lang.String sPropName, java.util.List<java.lang.String> pis, boolean bCheckProtos)
Get the processing instruction based on the aPiName. If multiple Processing Instructions exist for the same aPiName, all PI's found with that name will be returned.- Parameters:
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.
-
getPrefix
public final java.lang.String getPrefix()
Gets this element's namespace prefix.- Returns:
- the namespace prefix.
-
getProperty
public final java.lang.Object getProperty(int ePropTag, int nOccurrence)
Description copied from class:Node
Get a property for this node.- Overrides:
getProperty
in classNode
- Parameters:
ePropTag
- The XFA tag (name) of the property to check for.nOccurrence
- if this property can occur a fix number of times (usually [0..n]), then specify which occurrence to get. Defaults to 0.- Returns:
- The requested property. If the property has not been specified,
this will contain a default value.
There is a special case for the handling of pcdata. Technically, pcdata
is a child node relationship, but it is retrieved via an attribute -
XFAString. The property name in this case is
XFA::textNodeTag()
. The return value will never be a null object. The XFAProperty will refer to either an Node or an Attribute.
-
getProperty
public final java.lang.Object getProperty(java.lang.String propertyName, int nOccurrence)
Description copied from class:Node
string version of getProperty. ***Less efficient than the int version The parameter propertyName should correspond to the name of either a child element that occurs 0..1 times OR is the name of an attribute. The parameter propertyName must be a valid property for this particular class.- Overrides:
getProperty
in classNode
-
getSaveXMLSaveTransient
public boolean getSaveXMLSaveTransient()
-
getSchemaType
public int getSchemaType(int eTag)
-
getScriptMethodInfo
public ScriptFuncObj getScriptMethodInfo(java.lang.String sFunctionName)
Description copied from class:Obj
Gets the information on a script method.- Overrides:
getScriptMethodInfo
in classObj
- Parameters:
sFunctionName
- the name of the method- Returns:
- the script function object or null if not found.
-
getScriptTable
public ScriptTable getScriptTable()
- Overrides:
getScriptTable
in classNode
-
getText
public TextNode getText(boolean bPeek, boolean bReturnDefault, boolean bValidate)
Gets this element's text node child.To return the text node, set the returnDefault argument to true. If the text node is present, it is returned; otherwise the default text node is created and returned.
To peek at the text node, set the peek argument to true. If the text node 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 text node, set the peek argument to false. If the text node is absent, a default text node is created and returned.
If validation argument is true, and the validation fails, this method throws.
- Parameters:
bPeek
- whether to peek at the text node, or not.bReturnDefault
- whether to create a default text node, or not.bValidate
- whether to validate the text node, or not.- Returns:
- the text node or null.
-
getXMLName
public java.lang.String getXMLName()
Gets this element's XML name.- Returns:
- the qualified name as an interned string.
-
setXMLName
public void setXMLName(java.lang.String name)
Sets this element's XML name.
-
getXPath
public java.lang.String getXPath(java.util.Map<java.lang.String,java.lang.String> prefixList, Element contextNode)
-
getXsiNilAttribute
public Attribute getXsiNilAttribute()
-
removeXsiNilAttribute
public void removeXsiNilAttribute()
-
setXsiNilAttribute
public final void setXsiNilAttribute(java.lang.String aValue)
-
inhibitPrettyPrint
public final boolean inhibitPrettyPrint()
-
inhibitPrettyPrint
public final void inhibitPrettyPrint(boolean bInhibit)
-
insertChild
public void insertChild(Node newChild, Node refNode, boolean bValidate)
Inserts a child before a specific child in the child list.- Parameters:
newChild
- the child to be insertedrefNode
- the child to insert beforebValidate
- if true, validate the insertion
-
isContainer
public boolean isContainer()
Description copied from class:Node
Check to see if this is a container object. A container is defined as something that is not a leaf node not properties ( [0..1] occurrences ). It does NOT indicate whether this node derives from XFAContainer- Overrides:
isContainer
in classNode
- Returns:
- true if this node is a container, false otherwise
-
isFragment
public void isFragment(boolean bFragment, boolean bSetChildren)
Set the fragment state of this node- Parameters:
bFragment
- the fragment statebSetChildren
- if true, set this flag on all nested children
-
isHidden
public final boolean isHidden()
Determine if this node is hidden or not.- Returns:
- boolean hidden status.
-
isHidden
public final void isHidden(boolean bHidden)
Set the hidden state of this node. Hidden nodes are not saved when the DOM is written out.- Parameters:
bHidden
- the new hidden state.
-
isIndexed
public final boolean isIndexed()
-
isLeaf
public final boolean isLeaf()
Check if this node is a leaf node
-
isNameSpaceAttr
public boolean isNameSpaceAttr()
Is this element's name namespaced.- Returns:
- true if this element's name is namespaced.
-
isPropertySpecified
public final boolean isPropertySpecified(int ePropTag, boolean bCheckProtos, int nOccurrence)
Description copied from class:Node
Check if a specific property has been defined for this node.- Overrides:
isPropertySpecified
in classNode
- Parameters:
ePropTag
- The XFA tag (name) of the property to check for.bCheckProtos
- if true, check if this property is specified via prototype inheritance. Defaults to true.nOccurrence
- if this property can occur a fix number of times (usually [0..n]), then specify which occurrence to check for. Defaults to 0.- Returns:
- True if the property has been specified.
The property name should correspond to the name of either a child element that occurs 0..1 times OR is the name of an attribute. The parameter propertyName must be a valid property for this particular class.
-
isPropertySpecified
public final boolean isPropertySpecified(java.lang.String propertyName, boolean bCheckProtos, int nOccurrence)
-
isPropertyValid
public final boolean isPropertyValid(int ePropTag)
Check if a specified property is valid according to the schema.- Parameters:
ePropTag
- The XFA tag (name) of the property to check for.- Returns:
- not-null if valid. Boolean TRUE if property is an Element
-
isSpecified
public boolean isSpecified(int eTag, boolean bCheckProtos, int nOccurrence)
Description copied from class:Node
Check if a property, child, or oneOfChild has been defined for this node- Overrides:
isSpecified
in classNode
- Parameters:
eTag
- The XFA tag (name) of the property/child/oneOfChild to check for.bCheckProtos
- if true, check if this property is specified via prototype inheritance. Defaults to true.nOccurrence
- if this property can occur a fix number of times (usually [0..n]), then specify which occurrence to check for. Defaults to 0.- Returns:
- True if the property has been specified.
-
isSpecified
public boolean isSpecified(int eTag, int eType, boolean bCheckProtos, int nOccurrence)
-
isSpecified
public final boolean isSpecified(java.lang.String sPropertyName, boolean bCheckProtos, int nOccurrence)
-
isTransient
public final void isTransient(boolean bTransient, boolean bSetChildren)
Description copied from class:Node
Set the transient state of this node. Transient nodes are not saved when the DOM is written out.- Overrides:
isTransient
in classNode
- Parameters:
bTransient
- the new transient state.- See Also:
Node.isTransient(boolean, boolean)
-
isTransparent
public boolean isTransparent()
- Overrides:
isTransparent
in classNode
-
isValidAttr
public boolean isValidAttr(int eTag, boolean bReport, java.lang.String value)
Determine if a specified attribute tag is valid for this node.- Parameters:
eTag
- the XFA tag to check- Returns:
- true if valid.
-
isValidChild
public boolean isValidChild(int eTag, int nError, boolean bBeforeInsert, boolean bOccurrenceErrorOnly)
- Parameters:
eTag
- the class tag of the node that will be or has been appendednError
-bBeforeInsert
- iftrue
, then the child has not yet been inserted into the child list of this element.bOccurrenceErrorOnly
-- Returns:
true
if eTag is a valid child.
-
isValidElement
public boolean isValidElement(int eTag, boolean bReport)
-
loadXML
public void loadXML(java.io.InputStream is, boolean bIgnoreAggregatingTag, boolean bReplaceContent)
Loads and appends the specified XML fragment (or document) to this element.- Parameters:
is
- the input stream of XML fragment.bIgnoreAggregatingTag
- ignore the root node of the XML fragment, when true, in which case, the children of the root node will be appended to this element. Append the root node of the XML fragment to this element, when false.bReplaceContent
- replace the content of this element with the content of the root node of the XML fragment, when true.
-
loadXML
public void loadXML(java.io.InputStream is, boolean bIgnoreAggregatingTag, Element.ReplaceContent eReplaceContent)
Loads and appends the specified XML fragment (or document) to this element.- Parameters:
is
- the input stream of XML fragment.bIgnoreAggregatingTag
- ignore the root node of the XML fragment, when true, in which case, the children of the root node will be appended to this element. Append the root node of the XML fragment to this element, when false.eReplaceContent
- specifies handling of existing node content.
-
makeDefault
public void makeDefault()
Description copied from class:Node
Mark this element as a default property- Overrides:
makeDefault
in classNode
- See Also:
Node.makeDefault()
-
makeNonDefault
public void makeNonDefault(boolean bRecursive)
Description copied from class:Node
Mark this element to indicate it is not a default property- Overrides:
makeNonDefault
in classNode
- See Also:
Node.makeNonDefault(boolean)
-
setDefaultFlag
public void setDefaultFlag(boolean bDefaultNode, boolean bSetChildren)
-
newAttribute
public Attribute newAttribute(int eTag, java.lang.String value)
-
peekAttribute
public final Attribute peekAttribute(int eAttributeTag)
get an attribute value only if it exists. NON validating
-
peekElement
public final Element peekElement(int eElementTag, boolean bReturnDefault, int nOccurrence)
get an element only if it exists NON validating READ ONLY VERSION
-
peekOneOfChild
public final Node peekOneOfChild(boolean bReturnDefault)
Deprecated.UsegetOneOfChild(true, bReturnDefault)
instead.Description copied from class:Node
READ ONLY VERSION of getOneOfChild In the case where an element may contain a "OneOf" child, this method will retrieve the child element that has the XFA::oneOfChild relationship to its parent.When one only one child node out of a set of nodes can exist for a particular node, then that set of nodes is called a oneOf children.
Note! Proto references are not expanded, SHOULD NOT modify the resulting node.
- Overrides:
peekOneOfChild
in classNode
- Parameters:
bReturnDefault
- true if you want the defualt node to be returned if the "OneOf" child doesn't exist, if false null will be returned- Returns:
- the "OneOf" child for this node. If this child has not been specified, this method will return null.
-
peekProperty
public final java.lang.Object peekProperty(int ePropTag, int nOccurrence)
-
peekProperty
public final java.lang.Object peekProperty(java.lang.String propertyName, int nOccurrence)
-
postSave
public void postSave()
- Specified by:
postSave
in classNode
- See Also:
Node.postSave()
-
preSave
public void preSave(boolean bSaveXMLScript)
- Specified by:
preSave
in classNode
- See Also:
Node.preSave(boolean)
-
removeAttr
public final void removeAttr(int index)
-
removeAttr
public final void removeAttr(java.lang.String URI, java.lang.String name)
Remove an attribute as specified by the combination of URI and name.- Parameters:
URI
- the namespace for this attribute. If null, don't worry about namespace matching. If non-null, this String must be interned.name
- the name of the attribute. This String must be interned.
-
removeChild
public final void removeChild(Node child)
Removes a child from the child list- Parameters:
child
- the node to be removed
-
removePI
public final void removePI(java.lang.String aPiName)
Remove all processing instruction based on the aPiName.- Parameters:
aPiName
- the processing instructions target name
-
removePI
public final void removePI(java.lang.String aPiName, java.lang.String sPropName)
-
removeWhiteSpace
public final void removeWhiteSpace()
Remove all #text children that consist of whitespace
-
resetPostLoadXML
public void resetPostLoadXML()
-
resolveAndEnumerateChildren
public NodeList resolveAndEnumerateChildren(boolean bAllProperties, boolean bFirstDefaultOnly)
Construct a list of element-based properties and children. The list is fully resolved (ie: it will have children from any prototypes in it).
-
resolveNodeCreate
public SOMParser.SomResultInfo resolveNodeCreate(java.lang.String somNodesInput, int eAction, boolean bLeaf, boolean bDefault, boolean bNoProperties)
-
saveXML
public void saveXML(java.io.OutputStream outFile, DOMSaveOptions options)
Serializes this element (and all its children) to an output stream.- Parameters:
outFile
- an output stream.options
- the XML save options
-
saveXML
public void saveXML(java.io.OutputStream outFile, DOMSaveOptions options, boolean bSaveXMLScript)
Serializes this element (and all its children) to an output stream.- Parameters:
outFile
- an output stream.options
- the XML save options
-
saveFilteredXML
public void saveFilteredXML(NodeList nodeList, java.io.OutputStream outFile, DOMSaveOptions options)
-
serialize
public void serialize(java.io.OutputStream outStream, DOMSaveOptions options, int level, Node prevSibling) throws java.io.IOException
Description copied from class:Node
The helper function used by saveXML()- Specified by:
serialize
in classNode
- Parameters:
outStream
- Streamfile to write tooptions
- save optionslevel
- the indent levelprevSibling
- our previous sibling -- needed for some markup options.- Throws:
java.io.IOException
- See Also:
Node.serialize(OutputStream, DOMSaveOptions, int, Node)
-
setAttribute
public void setAttribute(Attribute attr, int eTag)
Sets (adds) an attribute to this element.- Parameters:
attr
- the attribute.eTag
- The XFA tag name of the attribute being set.
-
setAttribute
public final void setAttribute(int eVal, int eTag)
Sets (adds) an enumerated attribute value to this element.
-
setAttribute
public final Attribute setAttribute(java.lang.String nameSpace, java.lang.String qName, java.lang.String localName, java.lang.String value)
Sets (adds) an attribute to this element.- Parameters:
nameSpace
- namespace of the attribute.qName
- the qualified name of the attribute.localName
- the local name of the attribute.value
- the value of the attribute.- Returns:
- the attribute we just updated or created
-
setAttribute
public final Attribute setAttribute(java.lang.String nameSpace, java.lang.String qName, java.lang.String localName, java.lang.String value, boolean internSymbols)
Sets (adds) an attribute to this element.The internSymbols parameter specifies whether the nameSpace, qName and localName parameters need to be interned. If it is known that these symbols are already interned (eg, they were retrieved from another Attribute, or are literal values), then specifing false for internSymbols saves the overhead for interning.
- Parameters:
nameSpace
- namespace of the attribute.qName
- the qualified name of the attribute.localName
- the local name of the attribute.value
- the value of the attribute.internSymbols
- indicates whether the namespace, qName and localName argument need to be interned.- Returns:
- the attribute we just updated or created
-
setAttrProp
public final void setAttrProp(int attrIndex, int eProp, boolean bValue)
Set one of the volatile attribute properties. Since attributes are immutable, we can't store these properties in the attributes themselves.- Parameters:
attrIndex
- The offset into the attribute array.eProp
- The property to return. One of AttrIsDefault, AttrIsFragment, AttrIsTransient.bValue
- the boolean value of the property
-
setDOMProperties
public void setDOMProperties(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
All name properties (including those in attributes) must be interned strings.
-
setElement
public Node setElement(Node child, int eTag, int nOccurrence)
Set an element value. Must be a valid 0..1 element, (not a oneOfChild or a 0..n child)- Parameters:
child
- the child to add or set.eTag
- only used if oChild isNull -- in which case we remove the element
-
setIsIndexed
public final void setIsIndexed(boolean bIsIndexed)
Set whether this node has an XMLID- Parameters:
bIsIndexed
-
-
setLineNumber
public final void setLineNumber(int nLineNumber)
-
setLocalName
public void setLocalName(java.lang.String name)
Sets this element's local name.- Parameters:
name
- the new local name.
-
setModel
public final void setModel(Model model)
Sets this element's model.- Parameters:
model
- the model this element belongs to.
-
setName
public void setName(java.lang.String name)
Sets this element's name attribute.
-
setNS
public final void setNS(java.lang.String sNS)
Sets this element's children null namespace to the given uri.- Parameters:
sNS
- the namespace uri. This string must be interned. Javaport: added.
-
setOneOfChild
public 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. If a "OneOf" child already exists, this method will replace it.- Parameters:
child
- the child to set. If this is a null object, any any existing "oneOf" child will be deleted.
-
setProperty
public final void setProperty(java.lang.Object property, int ePropertyTag)
Set a property for this node. The parameter property must be either a valid child that occurs 0..1 times (i.e. an Node) or a valid attribute (i.e. an Attribute or derivative). If this parameter is a Null object, then the corresponding attribute or element will be removed.
There is a special case for the handling of pcdata. Technically, pcdata is a child node relationship, but it is set using an attribute - usually XFAString. The property name in this case isXFA::textNodeTag()
.- Parameters:
property
- The XFA element that defines this property.ePropertyTag
- The XFA tag (name) of the property.
-
setProperty
public final void setProperty(java.lang.Object property, java.lang.String propertyName)
string version of setProperty. ***Less efficient than the int version ***.
-
setQName
public final void setQName(java.lang.String name)
Sets this element's qualified name.- Parameters:
name
- the new qualified name.
-
setSaveXMLSaveTransient
public void setSaveXMLSaveTransient(boolean bSaveTransient)
-
setTransparent
public final void setTransparent(boolean isTransparent)
-
updateFromPeer
public void updateFromPeer(java.lang.Object peer, int eventType, java.lang.String arg1, java.lang.Object arg2)
Description copied from interface:Peer
This method will be called by the peer whenever its state changes.eventType (String)arg1 (Object)arg2 UPDATED update type (optional) ATTR_CHANGED attr name (optional) CHILD_ADDED (optional) added node CHILD_REMOVED (optional) removed node VALUE_CHANGED new data (optional) PARENT_CHANGED (optional) new parent DESCENDENT_ATTR_CHANGED attr name changed node DESCENDENT_VALUE_CHANGED (optional) changed node DESCENDENT_ADDED (optional) added node DESCENDENT_REMOVED (optional) removed node PERMS_LOCK_SET (optional) (optional) PERMS_LOCK_CLEARED (optional) (optional) PROTO_ATTR_CHANGED attr name changed node PROTO_CHILD_ADDED (optional) added node of the protoype PROTO_CHILD_REMOVED (optional) removed node from the prototype PROTO_VALUE_CHANGED new data prototype node PROTO_DESCENDENT_ATTR_CHANGED attr name changed prototype node PROTO_DESCENDENT_VALUE_CHANGED (optional) changed prototype node PROTO_DESCENDENT_ADDED (optional) added node to the prototype PROTO_DESCENDENT_REMOVED (optional) removed node from the prototype
- Specified by:
updateFromPeer
in interfacePeer
- Overrides:
updateFromPeer
in classObj
- Parameters:
peer
- the peer to this object.eventType
- the event type as enumerated in this classarg1
- additional event informationarg2
- additional event information- See Also:
Obj.updateFromPeer(Object, int, String, Object)
-
processTextChildrenDuringParse
public boolean processTextChildrenDuringParse()
Determines whether child text nodes should be processed (check validity, consolidate) at parse time. Some schemas (or parts of schemas) may require an open schema that cannot be resolved at parse time, and where processing of text nodes must be delayed until load processing when the entire tree is available. Where possible, text child nodes are processed at parse time since that allows us to avoid creating many text nodes (e.g., ignorable whitespace).- Returns:
true
if child text nodes should be processed at parse time.
-
connectPeerToDocument
public void connectPeerToDocument()
connectPeerToDocument() is used to rearrange the DOM tree when inserting or appending a node. It is provided here as a utility function for derived classes that could be adding child nodes, when peered against an orphan node. In particular, this happens with xfa:datasets and xfa:data, both of which may be created during the load process. On the C++ side, this method is only used by the data model. Due to the differences between the relationship of Documents and AppModels in Java, on the Java side it is also called when creating a DOM from scratch, from any ModelFactory's createDOM method. In the DataModel context at least, it should only be called if the DOM peer is an orphan. It takes that orphan and connects it to the document, and then moves the original peer of this node to be a child of the node that previously was orphaned.
-
setIsDataWindowRoot
public final void setIsDataWindowRoot(boolean bIsRoot)
-
constructKey
public Key constructKey(java.util.List<java.lang.String> nodeAddressList, Node namespaceContextNode)
Constructs a key (either primary or foreign) for an element given a node address list. A context node must be provided for evaluating any namespace prefixes found in the node address list. (The context node is normally the data description node from which the node address list came.)
-
constructKeys
public void constructKeys(java.util.List<java.lang.String> nodeAddressList, Node namespaceContextNode, java.util.List<Key> keys)
-
explodeQName
public static void explodeQName(java.lang.String aQName, StringHolder aPrefix, StringHolder aLocalName)
-
resolvePrefix
public java.lang.String resolvePrefix(java.lang.String aPrefix)
-
-