org.knime.base.node.preproc.columntogrid
Class ColumnToGridConfiguration

java.lang.Object
  extended by org.knime.base.node.preproc.columntogrid.ColumnToGridConfiguration

final class ColumnToGridConfiguration
extends Object

Configuration to the node, contains grid count column number and included columns.

Author:
Bernd Wiswedel, KNIME.com, Zurich, Switzerland

Constructor Summary
ColumnToGridConfiguration()
          Default constructor, inits field empty.
ColumnToGridConfiguration(DataTableSpec spec)
          Creates new config, auto-guessing defaults if possible (prefers unknown type columns over string columns).
 
Method Summary
(package private) static String[] autoGuessIncludeColumns(DataTableSpec spec)
          Auto-guessing: choose first column that is not string, int, double as include; if no such column exists use first string column, otherwise use non (null returned).
(package private)  int getColCount()
           
(package private)  String getGroupColumn()
           
(package private)  String[] getIncludes()
           
(package private)  void loadSettings(NodeSettingsRO settings)
          Loads settings in model.
(package private)  void loadSettings(NodeSettingsRO settings, DataTableSpec spec)
          Loads settings in dialog, inits default if invalid.
(package private)  void saveSettingsTo(NodeSettingsWO settings)
          Saves current settings to argument.
(package private)  void setColCount(int colCount)
           
(package private)  void setGroupColumn(String groupColumn)
           
(package private)  void setIncludes(String[] includes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnToGridConfiguration

public ColumnToGridConfiguration(DataTableSpec spec)
                          throws InvalidSettingsException
Creates new config, auto-guessing defaults if possible (prefers unknown type columns over string columns).

Parameters:
spec - The input spec.
Throws:
InvalidSettingsException - If no config possible (only numbers)

ColumnToGridConfiguration

public ColumnToGridConfiguration()
Default constructor, inits field empty.

Method Detail

saveSettingsTo

void saveSettingsTo(NodeSettingsWO settings)
Saves current settings to argument.

Parameters:
settings - To save to.

loadSettings

void loadSettings(NodeSettingsRO settings)
            throws InvalidSettingsException
Loads settings in model.

Parameters:
settings - To load from.
Throws:
InvalidSettingsException - If invalid.

loadSettings

void loadSettings(NodeSettingsRO settings,
                  DataTableSpec spec)
Loads settings in dialog, inits default if invalid.

Parameters:
settings - To load from.
spec - The input spec.

getIncludes

String[] getIncludes()
Returns:
the includes

setIncludes

void setIncludes(String[] includes)
Parameters:
includes - the includes to set

getColCount

int getColCount()
Returns:
the colCount

setColCount

void setColCount(int colCount)
Parameters:
colCount - the colCount to set

getGroupColumn

String getGroupColumn()
Returns:
the groupColumn (or null if no grouping enabled).

setGroupColumn

void setGroupColumn(String groupColumn)
Parameters:
groupColumn - the groupColumn to set

autoGuessIncludeColumns

static String[] autoGuessIncludeColumns(DataTableSpec spec)
Auto-guessing: choose first column that is not string, int, double as include; if no such column exists use first string column, otherwise use non (null returned).

Parameters:
spec - Input spec.
Returns:
A meaningful default or null.


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.