com.ibm.tivoli.maximo.report.expr

Class JoiningParserHelper

  • java.lang.Object
    • com.ibm.tivoli.maximo.report.expr.JoiningParserHelper
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      protected Node combineNodes(Node parent, java.util.List nodes)
      Combine the nodes into a single Node, applying any Joining Text, and Node Type information.
      protected boolean compareNodes(int index, Node parsedNode, Node pattenNode)
      Performs the node comparison...
      Node evaluateNode(Node parent, Node current)
      Parser Helper allows a subclass to extend the parser to create new node types, or change the parse tree during parsing.
      protected java.util.List fillPattern(Node parent, Node current)
      Fill an array of nodes, that match, in size, to the pattern that we are looking for.
      protected java.lang.String getJoinText(int i, Node first, Node second)
      Subclasses can override to add text between nodes when they are joined into a single node.
      protected int getNodeType()
      Subclasses can override to set the NOde Type on the returned node for this helper
      protected boolean verifyPattern(java.util.List curPattern)
      Verify that the pattern of Nodes that are looking for, matches the pattern of nodes that we have collected.
      • Methods inherited from class java.lang.Object

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

      • JoiningParserHelper

        public JoiningParserHelper(Node[] pattern)
    • Method Detail

      • evaluateNode

        public Node evaluateNode(Node parent,
                                 Node current)
        Description copied from interface: ExprParser.ParserHelper
        Parser Helper allows a subclass to extend the parser to create new node types, or change the parse tree during parsing.
        Specified by:
        evaluateNode in interface ExprParser.ParserHelper
        Parameters:
        parent - current parent Node (ie, Group, or Root node)
        current - current node that was just created by the parser... BEFORE it gets added to the parent
        Returns:
        Node to be added to the parent, or Null, if no node should be added
      • verifyPattern

        protected boolean verifyPattern(java.util.List curPattern)
        Verify that the pattern of Nodes that are looking for, matches the pattern of nodes that we have collected.
        Parameters:
        curPattern -
        Returns:
      • compareNodes

        protected boolean compareNodes(int index,
                                       Node parsedNode,
                                       Node pattenNode)
        Performs the node comparison... Subclasses can override to provide different comparisons.
        Parameters:
        parsedNode - Node from the current parse tree
        pattenNode - Node from the Pattern
        Returns:
      • fillPattern

        protected java.util.List fillPattern(Node parent,
                                             Node current)
        Fill an array of nodes, that match, in size, to the pattern that we are looking for. If we can't fill an array, then just return null.
        Parameters:
        parent -
        current -
        Returns:
      • getNodeType

        protected int getNodeType()
        Subclasses can override to set the NOde Type on the returned node for this helper
        Returns:
      • getJoinText

        protected java.lang.String getJoinText(int i,
                                               Node first,
                                               Node second)
        Subclasses can override to add text between nodes when they are joined into a single node.
        Returns:
      • combineNodes

        protected Node combineNodes(Node parent,
                                    java.util.List nodes)
        Combine the nodes into a single Node, applying any Joining Text, and Node Type information.
        Parameters:
        parent -
        nodes -
        Returns: