org.knime.base.node.preproc.groupby.aggregation
Class ColumnAggregator

java.lang.Object
  extended by org.knime.base.node.preproc.groupby.aggregation.ColumnAggregator

public class ColumnAggregator
extends Object

Class that defines the AggregationMethod for the aggregation column.

Author:
Tobias Koetter, University of Konstanz

Constructor Summary
ColumnAggregator(DataColumnSpec origColSpec, AggregationMethod method)
          Constructor for class ColumnAggregator.
 
Method Summary
 String getColName()
           
 DataColumnSpec getColSpec()
           
 DataType getDataType()
           
 AggregationMethod getMethod()
           
 AggregationOperator getOperator(int maxUniqueValues)
           
static List<ColumnAggregator> loadColumnAggregators(NodeSettingsRO settings)
          Creates a List with all ColumnAggregators that were stored in the settings.
static void saveColumnAggregators(NodeSettingsWO settings, List<ColumnAggregator> cols)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnAggregator

public ColumnAggregator(DataColumnSpec origColSpec,
                        AggregationMethod method)
Constructor for class ColumnAggregator.

Parameters:
origColSpec - the DataColumnSpec of the original column
method - the AggregationMethod to use for the given column
Method Detail

getColName

public String getColName()
Returns:
the colName of the original column

getColSpec

public DataColumnSpec getColSpec()
Returns:
the DataColumnSpec of the original column

getDataType

public DataType getDataType()
Returns:
the DataType of the original column

getMethod

public AggregationMethod getMethod()
Returns:
the AggregationMethod to use

getOperator

public AggregationOperator getOperator(int maxUniqueValues)
Parameters:
maxUniqueValues - the maximum number of unique values
Returns:
the operator for this column

toString

public String toString()

Overrides:
toString in class Object

loadColumnAggregators

public static List<ColumnAggregator> loadColumnAggregators(NodeSettingsRO settings)
                                                    throws InvalidSettingsException
Creates a List with all ColumnAggregators that were stored in the settings.

Parameters:
settings - the settings object to read from
Returns:
List with the ColumnAggregators
Throws:
InvalidSettingsException - if the settings are invalid

saveColumnAggregators

public static void saveColumnAggregators(NodeSettingsWO settings,
                                         List<ColumnAggregator> cols)
Parameters:
settings - the settings object to write to
cols - the ColumnAggregator objects to save


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.