Package com.adobe.xfa
Class SOMParser
java.lang.Object
com.adobe.xfa.SOMParser
SOMParser provides support for resolving a SOM (Scripting Object Model)
expression into a list of nodes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDescribes one returned value from the SOM parser. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanresolve(Node startNode, String somExpression, Object[] objectParameters, List<SOMParser.SomResultInfo> result, BooleanHolder isAssociation) booleanresolve(Node startNode, String somExpression, List<SOMParser.SomResultInfo> result) Resolves a SOM expression to the list of Obj that the SOM expression represents.booleanresolve(Node startNode, String somExpression, List<SOMParser.SomResultInfo> result, BooleanHolder isAssociation) Resolves a SOM expression to the list of Obj that the SOM expression represents.voidsetDependencyTracker(DependencyTracker dependencyTracker) Sets the DependencyTracker for the parservoidsetOptions(boolean bPeek, boolean bLastInstance, boolean bNoProperties) Set the options for the parser
-
Constructor Details
-
SOMParser
-
SOMParser
public SOMParser()Constructs a new SOMParser.
-
-
Method Details
-
resolve
Resolves a SOM expression to the list of Obj that the SOM expression represents.- Parameters:
startNode- the Node to start at (the current node)somExpression- the SOM expression to be resolved.result- a List of SomResultInfo that will be populated with the result of evaluating the SOM expression.- Returns:
trueif any nodes were added to the result.
-
resolve
public boolean resolve(Node startNode, String somExpression, List<SOMParser.SomResultInfo> result, BooleanHolder isAssociation) Resolves a SOM expression to the list of Obj that the SOM expression represents.- Parameters:
startNode- the Node to start at (the current node)somExpression- the SOM expression to be resolved.result- a List of SomResultInfo that will be populated with the result of evaluating the SOM expression.isAssociation- (out) will be set totrueif the nodes returned include an association- Returns:
trueif any nodes were added to the result.
-
resolve
public boolean resolve(Node startNode, String somExpression, Object[] objectParameters, List<SOMParser.SomResultInfo> result, BooleanHolder isAssociation) -
setOptions
public void setOptions(boolean bPeek, boolean bLastInstance, boolean bNoProperties) Set the options for the parser- Parameters:
bPeek- - if true do not create any default children. Defaults to falsebLastInstance- - if true "*" is used return only the last instance. Defaults to falsebNoProperties- - if true no properties (such as x.name) are returned. Note that if name were a child node, it would be returned. Defaults to false
-
setDependencyTracker
Sets the DependencyTracker for the parser- Parameters:
dependencyTracker- the dependency tracker for the next call to resolve
-