Package com.adobe.xfa

Class SOMParser


  • public final class SOMParser
    extends java.lang.Object
    SOMParser provides support for resolving a SOM (Scripting Object Model) expression into a list of nodes.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SOMParser.SomResultInfo
      Describes one returned value from the SOM parser.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean resolve​(Node startNode, java.lang.String somExpression, java.lang.Object[] objectParameters, java.util.List<SOMParser.SomResultInfo> result, BooleanHolder isAssociation)  
      boolean resolve​(Node startNode, java.lang.String somExpression, java.util.List<SOMParser.SomResultInfo> result)
      Resolves a SOM expression to the list of Obj that the SOM expression represents.
      boolean resolve​(Node startNode, java.lang.String somExpression, java.util.List<SOMParser.SomResultInfo> result, BooleanHolder isAssociation)
      Resolves a SOM expression to the list of Obj that the SOM expression represents.
      void setDependencyTracker​(DependencyTracker dependencyTracker)
      Sets the DependencyTracker for the parser
      void setOptions​(boolean bPeek, boolean bLastInstance, boolean bNoProperties)
      Set the options for the parser
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SOMParser

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

      • resolve

        public boolean resolve​(Node startNode,
                               java.lang.String somExpression,
                               java.util.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,
                               java.lang.String somExpression,
                               java.util.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,
                               java.lang.String somExpression,
                               java.lang.Object[] objectParameters,
                               java.util.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