|
XFA4J | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.adobe.xfa.Obj
com.adobe.xfa.Node
public abstract class Node
A base class to represent all the types of nodes in a DOM.
The class provides methods to traverse XML DOMs and XFA DOMs. XFA DOMs differ from XML DOMs in that they are composed exclusively of nodes that belong to an XFA schema.
| Nested Class Summary | |
|---|---|
static interface |
Node.ChangeLogger
This interface defines the logging operations available when differences (changes) are encountered while comparing DOMs using Node.compareVersions(Node, Node.ChangeLogger, Object). |
| Field Summary | |
|---|---|
static int |
CREATE_ALWAYS_NEW
An allowable enumeration eMode value to the assignNode() method. |
static int |
CREATE_IF_NOT_EXIST
An allowable enumeration eMode value to the assignNode() method. |
static int |
CREATE_MUST_NOT_EXIST
An allowable enumeration eMode value to the assignNode() method. |
static int |
CREATE_REPLACE
An allowable enumeration eMode value to the assignNode() method. |
| Method Summary | |
|---|---|
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 node's context. |
boolean |
checkAncestorPerms()
Determines whether this node and all of its ancestors are unlocked for scripting execution. |
boolean |
checkDescendentPerms()
Checks that this node and all of its descendents are unlocked for scripting execution. |
boolean |
checkPerms()
Determines whether this node is unlocked for scripting execution. |
void |
cleanDirtyFlags()
|
boolean |
compareVersions(Node oRollbackNode,
Node.ChangeLogger oChangeLogger,
java.lang.Object oUserData)
Determines if this node (and all it's descendants) differs from the given roll-back node. |
java.lang.String |
getData()
Gets this node's data. |
protected ScriptDynamicPropObj |
getDynamicScriptProp(java.lang.String sPropertyName,
boolean bPropertyOverride,
boolean bPeek,
int nXFAVersion,
int nAvailability)
|
Node |
getFirstXFAChild()
Gets this node's first XFA child. |
Node |
getFirstXMLChild()
Gets this node's first XML child. |
Node |
getLastXMLChild()
Gets this node's last XML child. |
Model |
getModel()
Gets this node's model. |
abstract java.lang.String |
getName()
Gets this node's name. |
Node |
getNextXFASibling()
Gets this node's next XFA sibling. |
Node |
getNextXMLSibling()
Gets this node's next XML sibling. |
Document |
getOwnerDocument()
Gets this node's owner document. |
Node |
getPreviousXMLSibling()
Gets this node's previous XML sibling. |
java.lang.String |
getSOMExpression()
Gets this element's absolute SOM expression. |
int |
getXFAChildCount()
Gets this node's number of XFA children. |
Element |
getXFAParent()
Gets this node's XFA parent. |
int |
getXMLChildCount()
Gets this node's XML child count. |
Element |
getXMLParent()
Gets this node's XML parent. |
void |
hasChanged(boolean bIsDirty)
Sets this changed state of this node and its descendants to the given state. |
void |
remove()
Removes this node from its parent child list. |
Node |
resolveNode(java.lang.String somExpr)
Evaluates the Scripting Object Model expression, using this node as the current context. |
Node |
resolveNode(java.lang.String somExpr,
boolean bPeek,
boolean bLastOccurence,
boolean bNoProperties)
Evaluates the Scripting Object Model expression, using this node as the current context. |
NodeList |
resolveNodes(java.lang.String somExpr,
boolean bPeek,
boolean bLastOccurence,
boolean bNoProperties)
Evaluates the Scripting Object Model expression, using this node as the current context. |
protected void |
setNextXMLSibling(Node node)
Sets this node's next XML sibling. |
void |
setPermsLock(boolean bPermsLock)
Sets the permissions state of this node. |
protected void |
setXMLParent(Element parent)
Sets this node's XML parent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CREATE_REPLACE
assignNode() method.
public static final int CREATE_MUST_NOT_EXIST
assignNode() method.
public static final int CREATE_IF_NOT_EXIST
assignNode() method.
public static final int CREATE_ALWAYS_NEW
assignNode() method.
| Method Detail |
|---|
public Node assignNode(java.lang.String sSOMExpression,
java.lang.String sValue,
int eMode)
If the node doesn't exist, it can be created depending of the value of the given eMode. The eMode values are:
sSOMExpression - a SOM expression evaluating to a node.sValue - the value to be assigned.eMode - specifies whether the node should be created or not.
public boolean checkPerms()
true if this node is unlocked for scripting execution.Node.setPermsLock(boolean),
Node.checkAncestorPerms(),
Node.checkDescendentPerms()public boolean checkAncestorPerms()
true if this node and all of its ancestors are unlocked for scripting execution.Node.setPermsLock(boolean),
Node.checkPerms(),
Node.checkDescendentPerms()public boolean checkDescendentPerms()
true if this node and all of its descendents are unlocked for scripting execution.Node.setPermsLock(boolean),
Node.checkPerms(),
Node.checkAncestorPerms()public final int getXMLChildCount()
public java.lang.String getData()
protected ScriptDynamicPropObj getDynamicScriptProp(java.lang.String sPropertyName,
boolean bPropertyOverride,
boolean bPeek,
int nXFAVersion,
int nAvailability)
public Node getFirstXMLChild()
public Node getFirstXFAChild()
public Node getLastXMLChild()
public Model getModel()
public abstract java.lang.String getName()
public final Node getNextXMLSibling()
public Node getNextXFASibling()
public final Document getOwnerDocument()
public Element getXMLParent()
Node.getXFAParent()public Element getXFAParent()
Node.getXMLParent()public Node getPreviousXMLSibling()
public final java.lang.String getSOMExpression()
public final int getXFAChildCount()
public final void hasChanged(boolean bIsDirty)
bIsDirty - the dirty state.public final void cleanDirtyFlags()
public void remove()
public final Node resolveNode(java.lang.String somExpr)
For example, resolveNode("data.name[1]")
returns the requested node if it exists; otherwise it returns null.
The method call resolveNode(somExpr) is equivalent
to the call:
resolveNode(somExpr, false, false, false)
somExpr - a SOM expression.
ExFull - of type SOMTypeException, if more than one node
was found.Node.resolveNode(String, boolean, boolean, boolean)
public final Node resolveNode(java.lang.String somExpr,
boolean bPeek,
boolean bLastOccurence,
boolean bNoProperties)
To peek at the node, set the peek argument to true. If the 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.
somExpr - a SOM expression.bPeek - whether to beek at the node, or not.bLastOccurence - whether to get the last occurence
of the node whenever [*] is used in the somExpr argument, or not.bNoProperties - whether to return no properties
in the result, or not.
ExFull - of type SOMTypeException, if more than one node
was found.
public NodeList resolveNodes(java.lang.String somExpr,
boolean bPeek,
boolean bLastOccurence,
boolean bNoProperties)
For example, resolveNodes("data.name[*]")
returns a node list corresponding to the SOM expression, which may be
an empty.
somExpr - a SOM expression.bPeek - if true, don't create default properties in the result.bLastOccurence - if true, only get the last occurence whenever [*]
is used in the SOM expression.bNoProperties - if true, don't return properties in the result.
protected final void setNextXMLSibling(Node node)
node - the sibling.protected final void setXMLParent(Element parent)
parent - the parent.public void setPermsLock(boolean bPermsLock)
bPermsLock - the permissions state to set this node to: true
will lock the node; false will unlock the node.
public boolean compareVersions(Node oRollbackNode,
Node.ChangeLogger oChangeLogger,
java.lang.Object oUserData)
oRollbackNode - the roll-back node.oChangeLogger - an optional (may be null) instance of a change logger.
The change logger's methods will be called for each change found.oUserData - an optional (may be null) user-supplied object managed by the change logger.
|
XFA4J | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||