Package net.sf.saxon.expr.accum
Class AccumulatorData
- java.lang.Object
-
- net.sf.saxon.expr.accum.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 Summary
Constructors Constructor Description AccumulatorData(Accumulator acc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildIndex(NodeInfo doc, XPathContext context)
Build a data structure containing the values of the accumulator for each node in a document.Accumulator
getAccumulator()
Get the associated accumulatorSequence
getValue(NodeInfo node, boolean postDescent)
Get the value of the accumulator for a given node
-
-
-
Constructor Detail
-
AccumulatorData
public AccumulatorData(Accumulator acc)
-
-
Method Detail
-
getAccumulator
public Accumulator getAccumulator()
Get the associated accumulator- Specified by:
getAccumulator
in interfaceIAccumulatorData
- Returns:
- the accumulator
-
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 evaluatedcontext
- 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 interfaceIAccumulatorData
- Parameters:
node
- the node in questionpostDescent
- 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
-
-