org.knime.core.node.config
Interface ConfigRO

All Superinterfaces:
Iterable<String>, TreeNode
All Known Subinterfaces:
ModelContentRO, NodeSettingsRO
All Known Implementing Classes:
Config, ModelContent, NodeSettings

public interface ConfigRO
extends TreeNode, Iterable<String>

Interface implements only access functions for Config objects. In addition, it implements the TreeNode and Iterable interface.

Author:
Thomas Gabriel, University of Konstanz

Method Summary
 boolean containsKey(String key)
          Checks if this key for a particular type is in this Config.
 void copyTo(ConfigWO config)
          Copies this Config into a write-only one.
 boolean getBoolean(String key)
          Return boolean for key.
 boolean getBoolean(String key, boolean def)
          Return boolean for key or the default value if not available.
 boolean[] getBooleanArray(String key)
          Return a boolean array for key which can be null.
 boolean[] getBooleanArray(String key, boolean... def)
          Return a boolean array which can be null for key, or the default value if not available.
 byte getByte(String key)
          Return byte for key.
 byte getByte(String key, byte def)
          Return byte for key.
 byte[] getByteArray(String key)
          Return byte array which can be null for key.
 byte[] getByteArray(String key, byte... def)
          Return byte array which can be null for key, or the default value if not available.
 char getChar(String key)
          Return char for key.
 char getChar(String key, char def)
          Return char for key or the default value if not available.
 char[] getCharArray(String key)
          Return char array which can be null for key.
 char[] getCharArray(String key, char... def)
          Return char array which can be null for key, or the default array if the key is not available.
 Config getConfig(String key)
          Returns a Config for the given key.
 DataCell getDataCell(String key)
          Return DataCell for key.
 DataCell getDataCell(String key, DataCell def)
          Return a DataCell which can be null, or the default value if the key is not available.
 DataCell[] getDataCellArray(String key)
          Return DataCell array.
 DataCell[] getDataCellArray(String key, DataCell... def)
          Return DataCell array which can be null for key, or the default array if the key is not available.
 DataType getDataType(String key)
          Return DataType for key.
 DataType getDataType(String key, DataType def)
          Return a DataType elements or null for key, or the default value if not available.
 DataType[] getDataTypeArray(String key)
          Returns an array of DataType objects which can be null.
 DataType[] getDataTypeArray(String key, DataType... v)
          Returns the array of DataType objects for the given key or if not available the given array.
 double getDouble(String key)
          Return double for key.
 double getDouble(String key, double def)
          Return double for key or the default value if not available.
 double[] getDoubleArray(String key)
          Return double array for key or the default value if not available.
 double[] getDoubleArray(String key, double... def)
          Return double array which can be null for key, or the default array if the key is not available.
 float getFloat(String key)
          Return float for key.
 float getFloat(String key, float def)
          Return float for key or the default value if not available.
 float[] getFloatArray(String key)
          Return float array for key or the default value if not available.
 float[] getFloatArray(String key, float... def)
          Return float array which can be null for key, or the default array if the key is not available.
 int getInt(String key)
          Return int for key.
 int getInt(String key, int def)
          Return int for key or the default value if not available.
 int[] getIntArray(String key)
          Return int array which can be null for key, or the default array if the key is not available.
 int[] getIntArray(String key, int... def)
          Return int array which can be null for key, or the default array if the key is not available.
 String getKey()
           
 long getLong(String key)
          Return long for key.
 long getLong(String key, long def)
          Return long value for key or the default if the key is not available.
 long[] getLongArray(String key)
          Return a long array which can be null for key, or the default value if not available.
 long[] getLongArray(String key, long... def)
          Return long array which can be null for key, or the default array if the key is not available.
 RowKey getRowKey(String key)
          Return RowKey for key.
 RowKey getRowKey(String key, RowKey def)
          Return a RowKey which can be null, or the default value if the key is not available.
 RowKey[] getRowKeyArray(String key)
          Return RowKey array for the given key.
 RowKey[] getRowKeyArray(String key, RowKey... def)
          Return a RowKey array which can be null, or the default value if the key is not available.
 short getShort(String key)
          Return short for key.
 short getShort(String key, short def)
          Return short value for key or the default if the key is not available.
 short[] getShortArray(String key)
          Return a short array which can be null for key, or the default value if not available.
 short[] getShortArray(String key, short... def)
          Return short array which can be null for key, or the default array if the key is not available.
 String getString(String key)
          Return String for key.
 String getString(String key, String def)
          Return String object which can be null, or the default array if the key is not available.
 String[] getStringArray(String key)
          Return String array which can be null for key.
 String[] getStringArray(String key, String... def)
          Return String array which can be null for key, or the default array if the key is not available.
 Iterator<String> iterator()
          
 Set<String> keySet()
          Returns an unmodifiable Set of keys in this Config.
 void saveToXML(OutputStream os)
          Saves this Config into the given stream in XML format.
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Method Detail

getConfig

Config getConfig(String key)
                 throws InvalidSettingsException
Returns a Config for the given key.

Parameters:
key - The identifier for the Config.
Returns:
A new Config object.
Throws:
InvalidSettingsException - If the Config could not be accessed.

saveToXML

void saveToXML(OutputStream os)
               throws IOException
Saves this Config into the given stream in XML format.

Parameters:
os - The stream to write into.
Throws:
IOException - If an io exception occurs during writing.

copyTo

void copyTo(ConfigWO config)
Copies this Config into a write-only one.

Parameters:
config - The Config to write this to.

getKey

String getKey()
Returns:
The identifier for this Config.

getInt

int getInt(String key)
           throws InvalidSettingsException
Return int for key.

Parameters:
key - The key.
Returns:
A generic int.
Throws:
InvalidSettingsException - If the key is not available.

getDouble

double getDouble(String key)
                 throws InvalidSettingsException
Return double for key.

Parameters:
key - The key.
Returns:
A generic double.
Throws:
InvalidSettingsException - If the key is not available.

getChar

char getChar(String key)
             throws InvalidSettingsException
Return char for key.

Parameters:
key - The key.
Returns:
A generic char.
Throws:
InvalidSettingsException - If the key is not available.

getShort

short getShort(String key)
               throws InvalidSettingsException
Return short for key.

Parameters:
key - The key.
Returns:
A generic short.
Throws:
InvalidSettingsException - If the key is not available.

getLong

long getLong(String key)
             throws InvalidSettingsException
Return long for key.

Parameters:
key - The key.
Returns:
A generic long.
Throws:
InvalidSettingsException - If the key is not available.

getByte

byte getByte(String key)
             throws InvalidSettingsException
Return byte for key.

Parameters:
key - The key.
Returns:
A generic byte.
Throws:
InvalidSettingsException - If the key is not available.

getString

String getString(String key)
                 throws InvalidSettingsException
Return String for key.

Parameters:
key - The key.
Returns:
A String object.
Throws:
InvalidSettingsException - If the key is not available.

getDataCell

DataCell getDataCell(String key)
                     throws InvalidSettingsException
Return DataCell for key.

Parameters:
key - The key.
Returns:
A DataCell.
Throws:
InvalidSettingsException - If the key is not available.

getRowKey

RowKey getRowKey(String key)
                 throws InvalidSettingsException
Return RowKey for key.

Parameters:
key - the identifier used to store the RowKey before
Returns:
the store RowKey
Throws:
InvalidSettingsException - if the key is not available

getRowKeyArray

RowKey[] getRowKeyArray(String key)
                        throws InvalidSettingsException
Return RowKey array for the given key.

Parameters:
key - the identifier used to store the RowKey array before
Returns:
the store RowKey array
Throws:
InvalidSettingsException - if the key is not available

getDataType

DataType getDataType(String key)
                     throws InvalidSettingsException
Return DataType for key.

Parameters:
key - The key.
Returns:
A DataType.
Throws:
InvalidSettingsException - If the key is not available.

keySet

Set<String> keySet()
Returns an unmodifiable Set of keys in this Config.

Returns:
A Set of keys.

containsKey

boolean containsKey(String key)
Checks if this key for a particular type is in this Config.

Parameters:
key - The key.
Returns:
true if available, false if key is null or not available.

getBoolean

boolean getBoolean(String key)
                   throws InvalidSettingsException
Return boolean for key.

Parameters:
key - The key.
Returns:
A generic boolean.
Throws:
InvalidSettingsException - If the key is not available.

getInt

int getInt(String key,
           int def)
Return int for key or the default value if not available.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A generic int.

getIntArray

int[] getIntArray(String key)
                  throws InvalidSettingsException
Return int array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
Returns:
An int array.
Throws:
InvalidSettingsException - If the key is not available.

getIntArray

int[] getIntArray(String key,
                  int... def)
Return int array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
def - The default array returned if the key is not available.
Returns:
An int array.

getDouble

double getDouble(String key,
                 double def)
Return double for key or the default value if not available.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A generic double.

getDoubleArray

double[] getDoubleArray(String key)
                        throws InvalidSettingsException
Return double array for key or the default value if not available.

Parameters:
key - The key.
Returns:
An array of double values.
Throws:
InvalidSettingsException - If the key is not available.

getDoubleArray

double[] getDoubleArray(String key,
                        double... def)
Return double array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
def - The default array returned if the key is not available.
Returns:
A double array.

getFloat

float getFloat(String key)
               throws InvalidSettingsException
Return float for key.

Parameters:
key - The key.
Returns:
A generic float.
Throws:
InvalidSettingsException - If the key is not available.

getFloat

float getFloat(String key,
               float def)
Return float for key or the default value if not available.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A generic float.

getFloatArray

float[] getFloatArray(String key)
                      throws InvalidSettingsException
Return float array for key or the default value if not available.

Parameters:
key - The key.
Returns:
An array of float values.
Throws:
InvalidSettingsException - If the key is not available.

getFloatArray

float[] getFloatArray(String key,
                      float... def)
Return float array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
def - The default array returned if the key is not available.
Returns:
A float array.

getChar

char getChar(String key,
             char def)
Return char for key or the default value if not available.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A generic char.

getCharArray

char[] getCharArray(String key)
                    throws InvalidSettingsException
Return char array which can be null for key.

Parameters:
key - The key.
Returns:
A char array.
Throws:
InvalidSettingsException - If the the key is not available.

getByteArray

byte[] getByteArray(String key,
                    byte... def)
Return byte array which can be null for key, or the default value if not available.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A byte array.

getByteArray

byte[] getByteArray(String key)
                    throws InvalidSettingsException
Return byte array which can be null for key.

Parameters:
key - The key.
Returns:
A byte array.
Throws:
InvalidSettingsException - If the the key is not available.

getByte

byte getByte(String key,
             byte def)
Return byte for key.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A generic byte.

getShortArray

short[] getShortArray(String key)
                      throws InvalidSettingsException
Return a short array which can be null for key, or the default value if not available.

Parameters:
key - The key.
Returns:
A short array.
Throws:
InvalidSettingsException - If the key is not available.

getShortArray

short[] getShortArray(String key,
                      short... def)
Return short array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
def - The default array returned if the key is not available.
Returns:
A short array.

getLongArray

long[] getLongArray(String key)
                    throws InvalidSettingsException
Return a long array which can be null for key, or the default value if not available.

Parameters:
key - The key.
Returns:
A long array.
Throws:
InvalidSettingsException - If the key is not available.

getLongArray

long[] getLongArray(String key,
                    long... def)
Return long array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
def - The default array returned if the key is not available.
Returns:
A long array.

getShort

short getShort(String key,
               short def)
Return short value for key or the default if the key is not available.

Parameters:
key - The key.
def - The default values returned if the key is not available.
Returns:
A short value.

getLong

long getLong(String key,
             long def)
Return long value for key or the default if the key is not available.

Parameters:
key - The key.
def - The default values returned if the key is not available.
Returns:
A long value.

getCharArray

char[] getCharArray(String key,
                    char... def)
Return char array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
def - The default array returned if the key is not available.
Returns:
A char array.

getBoolean

boolean getBoolean(String key,
                   boolean def)
Return boolean for key or the default value if not available.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A generic boolean.

getBooleanArray

boolean[] getBooleanArray(String key)
                          throws InvalidSettingsException
Return a boolean array for key which can be null.

Parameters:
key - The key.
Returns:
A boolean or null.
Throws:
InvalidSettingsException - If the key is not available.

getBooleanArray

boolean[] getBooleanArray(String key,
                          boolean... def)
Return a boolean array which can be null for key, or the default value if not available.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A boolean array.

getString

String getString(String key,
                 String def)
Return String object which can be null, or the default array if the key is not available.

Parameters:
key - The key.
def - The default String returned if the key is not available.
Returns:
A String.

getStringArray

String[] getStringArray(String key)
                        throws InvalidSettingsException
Return String array which can be null for key.

Parameters:
key - The key.
Returns:
A String array.
Throws:
InvalidSettingsException - If the key is not available.

getStringArray

String[] getStringArray(String key,
                        String... def)
Return String array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
def - The default array returned if the key is not available.
Returns:
A String array.

getDataCell

DataCell getDataCell(String key,
                     DataCell def)
Return a DataCell which can be null, or the default value if the key is not available.

Parameters:
key - The key.
def - The default value, returned id the key is not available.
Returns:
A DataCell object.

getRowKey

RowKey getRowKey(String key,
                 RowKey def)
Return a RowKey which can be null, or the default value if the key is not available.

Parameters:
key - identifier used to store the RowKey before
def - default value, returned if the key is not available
Returns:
the stored RowKey

getRowKeyArray

RowKey[] getRowKeyArray(String key,
                        RowKey... def)
Return a RowKey array which can be null, or the default value if the key is not available.

Parameters:
key - identifier used to store the RowKey array before
def - default value, returned if the key is not available
Returns:
the stored RowKey array

getDataType

DataType getDataType(String key,
                     DataType def)
Return a DataType elements or null for key, or the default value if not available.

Parameters:
key - The key.
def - Returned if no value available for the given key.
Returns:
A DataType object or null, or the def value. generic boolean.

getDataCellArray

DataCell[] getDataCellArray(String key)
                            throws InvalidSettingsException
Return DataCell array. The array an the elements can be null.

Parameters:
key - The key.
Returns:
A DataCell array.
Throws:
InvalidSettingsException - If the the key is not available.

getDataCellArray

DataCell[] getDataCellArray(String key,
                            DataCell... def)
Return DataCell array which can be null for key, or the default array if the key is not available.

Parameters:
key - The key.
def - The default array returned if the key is not available.
Returns:
A char array.

getDataTypeArray

DataType[] getDataTypeArray(String key)
                            throws InvalidSettingsException
Returns an array of DataType objects which can be null.

Parameters:
key - The key.
Returns:
An array of DataType objects.
Throws:
InvalidSettingsException - The the object is not available for the given key.

getDataTypeArray

DataType[] getDataTypeArray(String key,
                            DataType... v)
Returns the array of DataType objects for the given key or if not available the given array.

Parameters:
key - The key.
v - The default array, returned if no entry available for the key.
Returns:
An array of DataType objects.

iterator

Iterator<String> iterator()

Specified by:
iterator in interface Iterable<String>


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.