Class AccumulatorData

  • All Implemented Interfaces:
    IAccumulatorData

    public class AccumulatorData
    extends java.lang.Object
    implements IAccumulatorData
    Holds the values of an accumulator function for one non-streamed document
    • Constructor Detail

      • AccumulatorData

        public AccumulatorData​(Accumulator acc)
    • Method Detail

      • buildIndex

        public void buildIndex​(NodeInfo doc,
                               XPathContext context)
                        throws XPathException
        Build a data structure containing the values of the accumulator for each node in a document. The data structure holds the value for all nodes where the value changes; the value for other nodes is obtained by interpolation
        Parameters:
        doc - the root of the tree for which the accumulator is to be evaluated
        context - the dynamic evaluation context
        Throws:
        XPathException - if a dynamic error occurs while evaluating the accumulator
      • getValue

        public Sequence getValue​(NodeInfo node,
                                 boolean postDescent)
        Get the value of the accumulator for a given node
        Specified by:
        getValue in interface IAccumulatorData
        Parameters:
        node - the node in question
        postDescent - false if the pre-descent value of the accumulator is required; false if the post-descent value is wanted.
        Returns:
        the value of the accumulator for this node