Class StemExtractionNode

    • Constructor Detail

      • StemExtractionNode

        public StemExtractionNode()
      • StemExtractionNode

        public StemExtractionNode​(TokenPosition tokenPosition)
      • StemExtractionNode

        public StemExtractionNode​(int operatorType,
                                  TokenPosition tokenPosition)
      • StemExtractionNode

        public StemExtractionNode​(int operatorType)
    • Method Detail

      • normalize

        protected IndexArgs normalize​(IndexArgs args)
        Remove any trailing *'s. These do nothing but make the system loop through everything.
             a\2\*\*\* == a\2 == a.2
         
        Parameters:
        args -
        Returns:
      • recurse

        protected Object recurse​(QDLStem in,
                                 IndexArgs sourceIndices)
        Starts descent through all of the nodes
        Parameters:
        in -
        sourceIndices -
        Returns:
      • linearizeLeftArgs

        protected IndexArgs linearizeLeftArgs​(List<IndexArg> indices,
                                              State state)
        Some parts of parse trees are left balanced, not right. linearizes a left tree
        Returns:
      • checkIfAlreadyLinearized

        protected IndexArgs checkIfAlreadyLinearized​(State state)
      • linearize

        protected List<IndexArg> linearize​(State state)
        Start linearizing the tree. This treats trees balanced on the right directly,and calls another method if there is a left hand tree.
        Returns:
      • addArgument

        public void addArgument​(IndexArg indexArg)
      • getNodeType

        public int getNodeType()
        Description copied from interface: ExpressionInterface
        QDL is not strongly typed but Java is, so each node type should have a unique integer and conditionals should use that, not the instanceof operator. This allows for efficient programming with switch statements rather than a bevy of conditionals (potentially each of which gets done even if the correct case has been handled).
        Returns: