org.knime.core.node
Class NodeSettings

java.lang.Object
  extended by org.knime.core.node.config.AbstractConfigEntry
      extended by org.knime.core.node.config.Config
          extended by org.knime.core.node.NodeSettings
All Implemented Interfaces:
Serializable, Iterable<String>, TreeNode, ConfigRO, ConfigWO, NodeSettingsRO, NodeSettingsWO

public final class NodeSettings
extends Config
implements NodeSettingsRO, NodeSettingsWO

This class overwrites the general Config object and specializes some method to access NodeSettings object. This object is used within the node packages.

Author:
Thomas Gabriel, University of Konstanz
See Also:
Serialized Form

Constructor Summary
NodeSettings(String key)
          Creates a new instance of this object with the given key.
 
Method Summary
 void addNodeSettings(NodeSettings settings)
          Add the given NodeSettings object to this Config using the key of the argument's NodeSettings.
 NodeSettingsWO addNodeSettings(String key)
          Creates new NodeSettingsWO object for the given key and returns it.
 Config getInstance(String key)
          Creates a new Config of this type.
 NodeSettings getNodeSettings(String key)
          Returns a read-only NodeSettingsRO object from this config.
static NodeSettingsRO loadFromXML(InputStream in)
          Reads NodeSettings object from a given XML input stream and writes them into the given NodeSettings object.
static NodeSettings readFromFile(ObjectInputStream ois)
           
 
Methods inherited from class org.knime.core.node.config.Config
addBoolean, addBooleanArray, addByte, addByteArray, addChar, addCharArray, addConfig, addConfig, addDataCell, addDataCellArray, addDataType, addDataTypeArray, addDouble, addDoubleArray, addFloat, addFloatArray, addInt, addIntArray, addLong, addLongArray, addRowKey, addRowKeyArray, addShort, addShortArray, addString, addStringArray, children, containsKey, copyTo, getBoolean, getBoolean, getBooleanArray, getBooleanArray, getByte, getByte, getByteArray, getByteArray, getChar, getChar, getCharArray, getCharArray, getChildAt, getChildCount, getConfig, getDataCell, getDataCell, getDataCellArray, getDataCellArray, getDataType, getDataType, getDataTypeArray, getDataTypeArray, getDouble, getDouble, getDoubleArray, getDoubleArray, getFloat, getFloat, getFloatArray, getFloatArray, getIndex, getInt, getInt, getIntArray, getIntArray, getLong, getLong, getLongArray, getLongArray, getRowKey, getRowKey, getRowKeyArray, getRowKeyArray, getShort, getShort, getShortArray, getShortArray, getString, getString, getStringArray, getStringArray, hasIdenticalValue, isLeaf, iterator, keySet, load, loadFromXML, saveToXML, toString, toString, toStringValue, writeToFile
 
Methods inherited from class org.knime.core.node.config.AbstractConfigEntry
equals, getAllowsChildren, getKey, getParent, hashCode, isIdentical
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.knime.core.node.config.ConfigRO
containsKey, copyTo, getBoolean, getBoolean, getBooleanArray, getBooleanArray, getByte, getByte, getByteArray, getByteArray, getChar, getChar, getCharArray, getCharArray, getConfig, getDataCell, getDataCell, getDataCellArray, getDataCellArray, getDataType, getDataType, getDataTypeArray, getDataTypeArray, getDouble, getDouble, getDoubleArray, getDoubleArray, getFloat, getFloat, getFloatArray, getFloatArray, getInt, getInt, getIntArray, getIntArray, getKey, getLong, getLong, getLongArray, getLongArray, getRowKey, getRowKey, getRowKeyArray, getRowKeyArray, getShort, getShort, getShortArray, getShortArray, getString, getString, getStringArray, getStringArray, iterator, keySet, saveToXML
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 
Methods inherited from interface org.knime.core.node.config.ConfigWO
addBoolean, addBooleanArray, addByte, addByteArray, addChar, addCharArray, addConfig, addDataCell, addDataCellArray, addDataType, addDataTypeArray, addDouble, addDoubleArray, addFloat, addFloatArray, addInt, addIntArray, addLong, addLongArray, addRowKey, addRowKeyArray, addShort, addShortArray, addString, addStringArray, getKey
 

Constructor Detail

NodeSettings

public NodeSettings(String key)
Creates a new instance of this object with the given key.

Parameters:
key - An identifier.
Method Detail

getInstance

public Config getInstance(String key)
Creates a new Config of this type.

Specified by:
getInstance in class Config
Parameters:
key - The new Config's key.
Returns:
A new instance of this Config.

readFromFile

public static NodeSettings readFromFile(ObjectInputStream ois)
                                 throws IOException
Throws:
IOException
See Also:
Config.readFromFile(java.io.ObjectInputStream)

loadFromXML

public static NodeSettingsRO loadFromXML(InputStream in)
                                  throws IOException
Reads NodeSettings object from a given XML input stream and writes them into the given NodeSettings object.

Parameters:
in - XML input stream to read settings from.
Returns:
A new settings object.
Throws:
IOException - If the stream could not be read.
NullPointerException - If one of the arguments is null.

addNodeSettings

public NodeSettingsWO addNodeSettings(String key)
Creates new NodeSettingsWO object for the given key and returns it.

Specified by:
addNodeSettings in interface NodeSettingsWO
Parameters:
key - The identifier for the given config.
Returns:
A new NodeSettingsWO object.

addNodeSettings

public void addNodeSettings(NodeSettings settings)
Add the given NodeSettings object to this Config using the key of the argument's NodeSettings.

Specified by:
addNodeSettings in interface NodeSettingsWO
Parameters:
settings - The object to add to this Config.

getNodeSettings

public NodeSettings getNodeSettings(String key)
                             throws InvalidSettingsException
Returns a read-only NodeSettingsRO object from this config.

Specified by:
getNodeSettings in interface NodeSettingsRO
Parameters:
key - The identifier.
Returns:
A new NodeSettingsRO object.
Throws:
InvalidSettingsException - If the object can't be accessed.


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.