org.knime.base.data.aggregation.general
Class SetCellOperator

java.lang.Object
  extended by org.knime.base.data.aggregation.AggregationOperator
      extended by org.knime.base.data.aggregation.general.SetCellOperator
All Implemented Interfaces:
Comparable<AggregationMethod>, AggregationMethod
Direct Known Subclasses:
UniqueConcatenateOperator, UniqueCountOperator

public class SetCellOperator
extends AggregationOperator

Returns all values as a SetCell per group.

Author:
Tobias Koetter, University of Konstanz

Constructor Summary
  SetCellOperator(GlobalSettings globalSettings, OperatorColumnSettings opColSettings)
          Constructor for class SetCellOperator.
protected SetCellOperator(OperatorData operatorData, GlobalSettings globalSettings, OperatorColumnSettings opColSettings)
          Constructor for class SetCellOperator.
 
Method Summary
protected  boolean computeInternal(DataCell cell)
          
 AggregationOperator createInstance(GlobalSettings globalSettings, OperatorColumnSettings opColSettings)
          Creates a new instance of this operator.
protected  DataType getDataType(DataType origType)
          
 String getDescription()
          
protected  Set<DataCell> getGroupMembers()
           
protected  DataCell getResultInternal()
          
protected  void resetInternal()
          Should reset the operator to the start values.
 
Methods inherited from class org.knime.base.data.aggregation.AggregationOperator
compareTo, compute, createColumnSpec, createOperator, getColumnLabel, getGlobalSettings, getId, getLabel, getMaxUniqueValues, getOperatorData, getResult, getSkipMessage, getSupportedType, getSupportedTypeLabel, getValueDelimiter, inclMissingCells, isCompatible, isCompatible, isSkipped, isUsesLimit, keepColumnSpec, reset, setSkipMessage, setSkipped, supportsMissingValueOption, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetCellOperator

public SetCellOperator(GlobalSettings globalSettings,
                       OperatorColumnSettings opColSettings)
Constructor for class SetCellOperator.

Parameters:
globalSettings - the global settings
opColSettings - the operator column specific settings

SetCellOperator

protected SetCellOperator(OperatorData operatorData,
                          GlobalSettings globalSettings,
                          OperatorColumnSettings opColSettings)
Constructor for class SetCellOperator.

Parameters:
operatorData - the operator data
globalSettings - the global settings
opColSettings - the operator column specific settings
Method Detail

getDataType

protected DataType getDataType(DataType origType)

Specified by:
getDataType in class AggregationOperator
Parameters:
origType - the DataType of the original column to aggregate
Returns:
the DataType of the aggregation result

createInstance

public AggregationOperator createInstance(GlobalSettings globalSettings,
                                          OperatorColumnSettings opColSettings)
Creates a new instance of this operator. A new instance is created for each column.

Specified by:
createInstance in class AggregationOperator
Parameters:
globalSettings - the global settings
opColSettings - the operator column specific settings
Returns:
a new instance of this operator

computeInternal

protected boolean computeInternal(DataCell cell)

Specified by:
computeInternal in class AggregationOperator
Parameters:
cell - the DataCell to consider during computing the cell can't be null but can be a missing cell DataCell.isMissing() if the option is AggregationOperator.inclMissingCells() option is set to true.
Returns:
true if this column should be skipped in further calculations

getResultInternal

protected DataCell getResultInternal()

Specified by:
getResultInternal in class AggregationOperator
Returns:
the result DataCell

getGroupMembers

protected Set<DataCell> getGroupMembers()
Returns:
the members of the group or an empty Set

resetInternal

protected void resetInternal()
Should reset the operator to the start values.

Specified by:
resetInternal in class AggregationOperator

getDescription

public String getDescription()

Returns:
a description that explains the used aggregation method to the user


Copyright, 2003 - 2012. 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.