org.knime.base.data.aggregation
Class GlobalSettings

java.lang.Object
  extended by org.knime.base.data.aggregation.GlobalSettings

public class GlobalSettings
extends Object

Utility class that contains general information such as the column delimiter and the total number of rows. The informations might be provided by the user in the node dialog.

Author:
Tobias Koetter, University of Konstanz

Field Summary
static GlobalSettings DEFAULT
          Default global settings object used in operator templates.
static String STANDARD_DELIMITER
          The standard delimiter used in concatenation operators.
 
Constructor Summary
GlobalSettings()
          Constructor for class GlobalSettings.
GlobalSettings(int maxUniqueValues)
          Constructor for class GlobalSettings that uses the standard value delimiter.
GlobalSettings(int maxUniqueValues, String valueDelimiter, DataTableSpec spec, int noOfRows)
          Constructor for class GlobalSettings.
 
Method Summary
 int findColumnIndex(String columnName)
          Finds the column with the specified name in the TableSpec of the original input table and returns its index, or -1 if the name doesn't exist in the table.
 int getMaxUniqueValues()
           
 int getNoOfColumns()
          Returns the number of columns of the original input table.
 int getNoOfRows()
           
 DataColumnSpec getOriginalColumnSpec(int index)
          Returns column information of the original column with the provided index.
 DataColumnSpec getOriginalColumnSpec(String column)
          Returns the DataColumnSpec of the original column with the provided name.
 String getValueDelimiter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final GlobalSettings DEFAULT
Default global settings object used in operator templates.


STANDARD_DELIMITER

public static final String STANDARD_DELIMITER
The standard delimiter used in concatenation operators.

See Also:
Constant Field Values
Constructor Detail

GlobalSettings

GlobalSettings()
Constructor for class GlobalSettings. This constructor is used to create a dummy object that contains default settings.


GlobalSettings

public GlobalSettings(int maxUniqueValues)
Constructor for class GlobalSettings that uses the standard value delimiter.

Parameters:
maxUniqueValues - the maximum number of unique values to consider

GlobalSettings

public GlobalSettings(int maxUniqueValues,
                      String valueDelimiter,
                      DataTableSpec spec,
                      int noOfRows)
Constructor for class GlobalSettings.

Parameters:
maxUniqueValues - the maximum number of unique values to consider
valueDelimiter - the delimiter to use for value separation
spec - the DataTableSpec of the input table
noOfRows - the number of rows of the input table
Method Detail

getMaxUniqueValues

public int getMaxUniqueValues()
Returns:
the maximum number of unique values to consider

getValueDelimiter

public String getValueDelimiter()
Returns:
the standard delimiter to use for value separation

getNoOfRows

public int getNoOfRows()
Returns:
the total number of rows of the input table

getNoOfColumns

public int getNoOfColumns()
Returns the number of columns of the original input table.

Returns:
the number of columns

findColumnIndex

public int findColumnIndex(String columnName)
Finds the column with the specified name in the TableSpec of the original input table and returns its index, or -1 if the name doesn't exist in the table. This method returns -1 if the argument is null.

Parameters:
columnName - the name to search for
Returns:
the index of the column with the specified name, or -1 if not found.

getOriginalColumnSpec

public DataColumnSpec getOriginalColumnSpec(int index)
Returns column information of the original column with the provided index.

Parameters:
index - the column index within the table
Returns:
the column specification
Throws:
ArrayIndexOutOfBoundsException - if the index is out of range

getOriginalColumnSpec

public DataColumnSpec getOriginalColumnSpec(String column)
Returns the DataColumnSpec of the original column with the provided name. This method returns null if the argument is null.

Parameters:
column - the column name to find the spec for
Returns:
the column specification or null if not available


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.