Package com.adobe.xfa

Class SOMParser

java.lang.Object
com.adobe.xfa.SOMParser

public final class SOMParser extends Object
SOMParser provides support for resolving a SOM (Scripting Object Model) expression into a list of nodes.
  • Constructor Details

    • SOMParser

      public SOMParser(DependencyTracker dependencyTracker)
    • SOMParser

      public SOMParser()
      Constructs a new SOMParser.
  • Method Details

    • resolve

      public boolean resolve(Node startNode, String somExpression, List<SOMParser.SomResultInfo> result)
      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:
      true if 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 to true if the nodes returned include an association
      Returns:
      true if 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 false
      bLastInstance - - if true "*" is used return only the last instance. Defaults to false
      bNoProperties - - 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

      public void setDependencyTracker(DependencyTracker dependencyTracker)
      Sets the DependencyTracker for the parser
      Parameters:
      dependencyTracker - the dependency tracker for the next call to resolve