Package net.sf.saxon.expr.flwor
Class GroupByClausePush
java.lang.Object
net.sf.saxon.expr.flwor.TuplePush
net.sf.saxon.expr.flwor.GroupByClausePush
Represents the tuple stream delivered by an "group by" clause. This groups the tuple stream supplied
as its input, and outputs a new set of tuples one per group of the input tuples. No groups are output
until all the groups have been read.
-
Constructor Summary
ConstructorsConstructorDescriptionGroupByClausePush(Outputter outputter, TuplePush destination, GroupByClause groupBy, XPathContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddToGroup(Object key, GroupByClause.ObjectToBeGrouped objectToBeGrouped, List<GroupByClause.ObjectToBeGrouped> group, HashMap<Object, List<GroupByClause.ObjectToBeGrouped>> map) protected static voidcheckGroupingValues(Sequence[] groupingValues) voidclose()Close the tuple stream, indicating that although not all tuples have been read, no further tuples are required and resources can be releasedvoidprocessTuple(XPathContext context) Move on to the next tuple.Methods inherited from class net.sf.saxon.expr.flwor.TuplePush
getOutputter
-
Constructor Details
-
GroupByClausePush
public GroupByClausePush(Outputter outputter, TuplePush destination, GroupByClause groupBy, XPathContext context)
-
-
Method Details
-
processTuple
Move on to the next tuple. Before returning, this method must set all the variables corresponding to the "returned" tuple in the local stack frame associated with the context object- Specified by:
processTuplein classTuplePush- Parameters:
context- the dynamic evaluation context- Throws:
XPathException- if a dynamic error occurs
-
addToGroup
protected static void addToGroup(Object key, GroupByClause.ObjectToBeGrouped objectToBeGrouped, List<GroupByClause.ObjectToBeGrouped> group, HashMap<Object, List<GroupByClause.ObjectToBeGrouped>> map) -
checkGroupingValues
- Throws:
XPathException
-
close
Close the tuple stream, indicating that although not all tuples have been read, no further tuples are required and resources can be released- Overrides:
closein classTuplePush- Throws:
XPathException- if a dynamic error occurs
-