|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.visualization.datasource.query.engine.AggregationNode
public class AggregationNode
An aggregation node is a node in an aggregation tree. This node holds a value, equal to the
value in the corresponding group-by column. It also holds: value aggregators (one for each
aggregation column), a reference to its parent in the tree, and a set of references to its
children. Each child is associated with a unique value, which corresponds to the value held
in the child node. See AggregationTree for more details.
| Constructor Summary | |
|---|---|
AggregationNode(java.util.Set<java.lang.String> columnsToAggregate,
DataTable table)
Construct a new aggregation node. |
|
| Method Summary | |
|---|---|
void |
addChild(Value key,
java.util.Set<java.lang.String> columnsToAggregate,
DataTable table)
Adds a new child. |
void |
aggregate(java.util.Map<java.lang.String,Value> valuesByColumn)
Aggregates values using the value aggregators of this node. |
boolean |
containsChild(Value v)
Returns true if a node contains a child (identified by value) and false otherwise. |
Value |
getAggregationValue(java.lang.String columnId,
AggregationType type)
Returns the aggregation value of a specific column and type. |
AggregationNode |
getChild(Value v)
Returns the child of this node defined by a specific value. |
java.util.Map<Value,AggregationNode> |
getChildren()
Returns a copy of the map of children of this node. |
protected AggregationNode |
getParent()
Returns the parent of this node in the aggregation tree. |
protected Value |
getValue()
Returns the value of this node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AggregationNode(java.util.Set<java.lang.String> columnsToAggregate,
DataTable table)
columnsToAggregate - A set of ids of the columns to aggregate (aggregation columns).table - The table.| Method Detail |
|---|
public void aggregate(java.util.Map<java.lang.String,Value> valuesByColumn)
valuesByColumn - Maps a column id to the value that needs be aggregated (for that column).
public Value getAggregationValue(java.lang.String columnId,
AggregationType type)
columnId - The requested column id.type - The requested aggregation type.
public AggregationNode getChild(Value v)
v - The value.
public boolean containsChild(Value v)
v - The value of the child.
public void addChild(Value key,
java.util.Set<java.lang.String> columnsToAggregate,
DataTable table)
key - The value defining the new child.columnsToAggregate - The ids of the columns to aggregate.table - The table.public java.util.Map<Value,AggregationNode> getChildren()
protected Value getValue()
protected AggregationNode getParent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||