Class AccumulatorData

  • All Implemented Interfaces:

    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
        doc - the root of the tree for which the accumulator is to be evaluated
        context - the dynamic evaluation context
        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
        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.
        the value of the accumulator for this node