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 commentsCommentand processing instructionsProcessingInstructionof a DOM, lie outside the XFA schemas.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceElement.DualDomNodeInterface that is implemented by classes that use a dual XFA/XML DOM.static classElement.ReplaceContentSpecifies 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 intAttrIsDefaultstatic intAttrIsFragmentstatic intAttrIsTransientstatic intCREATEACTION-
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 voidappendChild(Node child)voidappendChild(Node child, boolean bValidate)Appends the given child to this element.voidappendPI(java.lang.String aPiName, java.lang.String sData)voidappendPI(java.lang.String aPiName, java.lang.String sPropName, java.lang.String sData)NodeassignNode(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.Nodeclone(Element parent)Elementclone(Element parent, boolean deep)voidconnectPeerToDocument()connectPeerToDocument() is used to rearrange the DOM tree when inserting or appending a node.KeyconstructKey(java.util.List<java.lang.String> nodeAddressList, Node namespaceContextNode)Constructs a key (either primary or foreign) for an element given a node address list.voidconstructKeys(java.util.List<java.lang.String> nodeAddressList, Node namespaceContextNode, java.util.List<Key> keys)voidcopyContent(Element newNode, boolean deep)AttributedefaultAttribute(int eTag)intdefaultElement()Returns the class tag of the default one-of child (if there is one)NodedefaultElement(int eTag, int nOccurrence)java.lang.StringestablishID()Argevaluate(java.lang.String sEvalText, java.lang.String sEvalTypeText, int executeReason, boolean bReportNonFatalErrors)Evaluates a fragment of script.static voidexplodeQName(java.lang.String aQName, StringHolder aPrefix, StringHolder aLocalName)intfindAttr(java.lang.String URI, java.lang.String name)Find an attribute value by the combination of URI and name.intfindSchemaAttr(java.lang.String name)Find an attribute value by name.voidfoundBadAttribute(int eTag, java.lang.String attrValue)voidfoundBadAttribute(java.lang.String attrName, java.lang.String attrValue)NodeListgetAll(boolean bByName)Return the collection of like-named, in-scope, nodes.AppModelgetAppModel()java.lang.StringgetAtom(int eTag)get an attribute value, will return the default attribute value if none exist NON validatingAttributegetAttr(int n)Gets this element's n'th attribute.AttributegetAttribute(int eAttributeTag)Gets this element's attribute with the given tag.AttributegetAttribute(int eTag, boolean bPeek, boolean bValidate)Gets this element's attribute whose attribute tag is given.AttributegetAttributeByName(java.lang.String aAttrName, boolean bSearchProto)get the named attribute.intgetAttrIndex(Attribute attr)get the index of this attribute.java.lang.StringgetAttrName(int index)java.lang.StringgetAttrNS(int index)booleangetAttrProp(int attrIndex, int eProp)Get one of the volatile attribute properties.java.lang.StringgetAttrQName(int index)java.lang.StringgetAttrVal(int index)ChildRelngetChildReln(int eTag)NodeListgetClassAll()Return the collection of like-class, in-scope, nodes.intgetClassIndex()Return the position of this node in its collection of like-class, in-scope, like-child relationship, nodes.java.lang.StringgetClassName()Gets this element's class name.voidgetDeltas(Element delta, XFAList list)Gets a collection of deltas to restore.ElementgetElement(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate)Gets this element's sub element whose element tag is given.ElementgetElement(int eElementTag, int nOccurrence)get an element for a given node, The method will create a default if it doesn't exist.intgetElementClass()ElementgetElementLocal(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate)This method does the work of getElement().intgetEnum(int ePropertyTag)EnumAttrgetEnum(java.lang.String sPropertyName)EventManager.EventTablegetEventTable(boolean bCreate)NodegetFirstXFAChild()Gets this element's first XFA child.NodegetFirstXMLChild()Gets this element's first XML child.java.lang.StringgetID()intgetIndex(boolean bByName)Return the position of this node in its collection of like-named, in-scope, like-child relationship, nodes.java.lang.StringgetInheritedNS()Get our namespace by traversing to our ancestors if necessary.java.lang.StringgetInstalledLocale()Gets this element's installed locale.booleangetIsNull()Determine if this node contains a null value.NodegetLastXMLChild()Gets this element's last XML child.intgetLineNumber()java.lang.StringgetLocalName()ModelgetModel()Gets this element's model.java.lang.StringgetName()Gets this element's name.NodegetNode(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).NodeListgetNodes()Gets this element's list of children.NodeSchemagetNodeSchema()Gets the Schema for this node.java.lang.StringgetNS()Gets this element's namespace.intgetNumAttrs()Gets this element's number of attributes.NodegetOneOfChild()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.NodegetOneOfChild(boolean bPeek, boolean bReturnDefault)voidgetPI(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.voidgetPI(java.lang.String aPiName, java.util.List<java.lang.String> pis, boolean bCheckProtos)Get the processing instruction based on the aPiName.java.lang.StringgetPrefix()Gets this element's namespace prefix.java.lang.ObjectgetProperty(int ePropTag, int nOccurrence)Get a property for this node.java.lang.ObjectgetProperty(java.lang.String propertyName, int nOccurrence)string version of getProperty.booleangetSaveXMLSaveTransient()intgetSchemaType(int eTag)ScriptFuncObjgetScriptMethodInfo(java.lang.String sFunctionName)Gets the information on a script method.ScriptTablegetScriptTable()NodegetSibling(int index, boolean bByName, boolean bExceptionIfNotFound)a (not so) private method, overrides Node.getSibling()TextNodegetText(boolean bPeek, boolean bReturnDefault, boolean bValidate)Gets this element's text node child.NodegetXFAChild(int n)Gets this element's n'th XFA child.NodegetXMLChild(int n)Gets this element's n'th XML child.java.lang.StringgetXMLName()Gets this element's XML name.java.lang.StringgetXPath(java.util.Map<java.lang.String,java.lang.String> prefixList, Element contextNode)AttributegetXsiNilAttribute()booleaninhibitPrettyPrint()voidinhibitPrettyPrint(boolean bInhibit)voidinsertChild(Node newChild, Node refNode, boolean bValidate)Inserts a child before a specific child in the child list.booleanisContainer()Check to see if this is a container object.voidisFragment(boolean bFragment, boolean bSetChildren)Set the fragment state of this nodebooleanisHidden()Determine if this node is hidden or not.voidisHidden(boolean bHidden)Set the hidden state of this node.booleanisIndexed()booleanisInstalledLocaleAmbient()Determines if this element's installed locale is ambient.booleanisLeaf()Check if this node is a leaf nodebooleanisNameSpaceAttr()Is this element's name namespaced.booleanisPropertySpecified(int ePropTag, boolean bCheckProtos, int nOccurrence)Check if a specific property has been defined for this node.booleanisPropertySpecified(java.lang.String propertyName, boolean bCheckProtos, int nOccurrence)booleanisPropertyValid(int ePropTag)Check if a specified property is valid according to the schema.booleanisSpecified(int eTag, boolean bCheckProtos, int nOccurrence)Check if a property, child, or oneOfChild has been defined for this nodebooleanisSpecified(int eTag, int eType, boolean bCheckProtos, int nOccurrence)booleanisSpecified(java.lang.String sPropertyName, boolean bCheckProtos, int nOccurrence)voidisTransient(boolean bTransient, boolean bSetChildren)Set the transient state of this node.booleanisTransparent()booleanisValidAttr(int eTag, boolean bReport, java.lang.String value)Determine if a specified attribute tag is valid for this node.booleanisValidChild(int eTag, int nError, boolean bBeforeInsert, boolean bOccurrenceErrorOnly)booleanisValidElement(int eTag, boolean bReport)voidloadXML(java.io.InputStream is, boolean bIgnoreAggregatingTag, boolean bReplaceContent)Loads and appends the specified XML fragment (or document) to this element.voidloadXML(java.io.InputStream is, boolean bIgnoreAggregatingTag, Element.ReplaceContent eReplaceContent)Loads and appends the specified XML fragment (or document) to this element.voidmakeDefault()Mark this element as a default propertyvoidmakeNonDefault(boolean bRecursive)Mark this element to indicate it is not a default propertyAttributenewAttribute(int eTag, java.lang.String value)voidoptimizeNameSpace(int eAttributeTag, boolean bDeleteIfNotNeeded)For use with attributes that live in a non-standard namespace.AttributepeekAttribute(int eAttributeTag)get an attribute value only if it exists.ElementpeekElement(int eElementTag, boolean bReturnDefault, int nOccurrence)get an element only if it exists NON validating READ ONLY VERSIONNodepeekOneOfChild(boolean bReturnDefault)Deprecated.UsegetOneOfChild(true, bReturnDefault)instead.java.lang.ObjectpeekProperty(int ePropTag, int nOccurrence)java.lang.ObjectpeekProperty(java.lang.String propertyName, int nOccurrence)voidpostSave()voidpreSave(boolean bSaveXMLScript)voidprivateSetName(java.lang.String name)This version will not perform any notification or undo steps.booleanprocessTextChildrenDuringParse()Determines whether child text nodes should be processed (check validity, consolidate) at parse time.voidremoveAttr(int index)voidremoveAttr(java.lang.String URI, java.lang.String name)Remove an attribute as specified by the combination of URI and name.voidremoveChild(Node child)Removes a child from the child listvoidremovePI(java.lang.String aPiName)Remove all processing instruction based on the aPiName.voidremovePI(java.lang.String aPiName, java.lang.String sPropName)voidremoveWhiteSpace()Remove all #text children that consist of whitespacevoidremoveXsiNilAttribute()NodereplaceChild(Node newChild, Node oldChild)voidresetPostLoadXML()NodeListresolveAndEnumerateChildren(boolean bAllProperties, boolean bFirstDefaultOnly)Construct a list of element-based properties and children.SOMParser.SomResultInforesolveNodeCreate(java.lang.String somNodesInput, int eAction, boolean bLeaf, boolean bDefault, boolean bNoProperties)java.lang.StringresolvePrefix(java.lang.String aPrefix)voidsaveFilteredXML(NodeList nodeList, java.io.OutputStream outFile, DOMSaveOptions options)voidsaveXML(java.io.OutputStream outFile, DOMSaveOptions options)Serializes this element (and all its children) to an output stream.voidsaveXML(java.io.OutputStream outFile, DOMSaveOptions options, boolean bSaveXMLScript)Serializes this element (and all its children) to an output stream.voidserialize(java.io.OutputStream outStream, DOMSaveOptions options, int level, Node prevSibling)The helper function used by saveXML()voidsetAttribute(int eVal, int eTag)Sets (adds) an enumerated attribute value to this element.voidsetAttribute(Attribute attr, int eTag)Sets (adds) an attribute to this element.AttributesetAttribute(java.lang.String nameSpace, java.lang.String qName, java.lang.String localName, java.lang.String value)Sets (adds) an attribute to this element.AttributesetAttribute(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.voidsetAttrProp(int attrIndex, int eProp, boolean bValue)Set one of the volatile attribute properties.voidsetDefaultFlag(boolean bDefaultNode, boolean bSetChildren)voidsetDOMProperties(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.NodesetElement(Node child, int eTag, int nOccurrence)Set an element value.voidsetIsDataWindowRoot(boolean bIsRoot)voidsetIsIndexed(boolean bIsIndexed)Set whether this node has an XMLIDvoidsetLineNumber(int nLineNumber)voidsetLocalName(java.lang.String name)Sets this element's local name.voidsetModel(Model model)Sets this element's model.voidsetName(java.lang.String name)Sets this element's name attribute.voidsetNS(java.lang.String sNS)Sets this element's children null namespace to the given uri.NodesetOneOfChild(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.voidsetProperty(java.lang.Object property, int ePropertyTag)Set a property for this node.voidsetProperty(java.lang.Object property, java.lang.String propertyName)string version of setProperty.voidsetQName(java.lang.String name)Sets this element's qualified name.voidsetSaveXMLSaveTransient(boolean bSaveTransient)voidsetTransparent(boolean isTransparent)voidsetXMLName(java.lang.String name)Sets this element's XML name.voidsetXsiNilAttribute(java.lang.String aValue)voidupdateFromPeer(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 anExFullif 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:
assignNodein 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:
getClassNamein 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:
getFirstXMLChildin 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:
getSiblingin classNode
-
getFirstXFAChild
public Node getFirstXFAChild()
Gets this element's first XFA child.- Overrides:
getFirstXFAChildin 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:
getLastXMLChildin 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:NodeGet a property for this node.- Overrides:
getPropertyin 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:Nodestring 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:
getPropertyin classNode
-
getSaveXMLSaveTransient
public boolean getSaveXMLSaveTransient()
-
getSchemaType
public int getSchemaType(int eTag)
-
getScriptMethodInfo
public ScriptFuncObj getScriptMethodInfo(java.lang.String sFunctionName)
Description copied from class:ObjGets the information on a script method.- Overrides:
getScriptMethodInfoin classObj- Parameters:
sFunctionName- the name of the method- Returns:
- the script function object or null if not found.
-
getScriptTable
public ScriptTable getScriptTable()
- Overrides:
getScriptTablein 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:NodeCheck 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:
isContainerin 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:NodeCheck if a specific property has been defined for this node.- Overrides:
isPropertySpecifiedin 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:NodeCheck if a property, child, or oneOfChild has been defined for this node- Overrides:
isSpecifiedin 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:NodeSet the transient state of this node. Transient nodes are not saved when the DOM is written out.- Overrides:
isTransientin classNode- Parameters:
bTransient- the new transient state.- See Also:
Node.isTransient(boolean, boolean)
-
isTransparent
public boolean isTransparent()
- Overrides:
isTransparentin 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:
trueif 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:NodeMark this element as a default property- Overrides:
makeDefaultin classNode- See Also:
Node.makeDefault()
-
makeNonDefault
public void makeNonDefault(boolean bRecursive)
Description copied from class:NodeMark this element to indicate it is not a default property- Overrides:
makeNonDefaultin 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:NodeREAD 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:
peekOneOfChildin 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:
postSavein classNode- See Also:
Node.postSave()
-
preSave
public void preSave(boolean bSaveXMLScript)
- Specified by:
preSavein 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.IOExceptionDescription copied from class:NodeThe helper function used by saveXML()- Specified by:
serializein 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:PeerThis 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:
updateFromPeerin interfacePeer- Overrides:
updateFromPeerin 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:
trueif 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)
-
-