org.knime.base.node.preproc.stringreplacer
Class StringReplacerSettings

java.lang.Object
  extended by org.knime.base.node.preproc.stringreplacer.StringReplacerSettings

public class StringReplacerSettings
extends Object

This class holds the settings for the string replacer node.

Author:
Thorsten Meinl, University of Konstanz

Constructor Summary
StringReplacerSettings()
           
 
Method Summary
 boolean caseSensitive()
          Returns if the pattern should match case sensitive or not.
 void caseSensitive(boolean b)
          Sets if the pattern should match case sensitive or not.
 String columnName()
          Returns the name of the column that should be processed.
 void columnName(String colName)
          Sets the name of the column that should be processed.
 boolean createNewColumn()
          Returns if a new column should be created instead of overriding the values in the target column.
 void createNewColumn(boolean b)
          Sets if a new column should be created instead of overriding the values in the target column.
 void loadSettings(NodeSettingsRO settings)
          Loads the settings from the node settings object.
 void loadSettingsForDialog(NodeSettingsRO settings)
          Loads the settings from the node settings object.
 String newColumnName()
          Returns the name of the new column.
 void newColumnName(String colName)
          Sets the name of the new column.
 String pattern()
          Returns the pattern.
 void pattern(String pattern)
          Sets the pattern.
 boolean replaceAllOccurrences()
          Returns if the whole string or all occurrences of the pattern should be replaced.
 void replaceAllOccurrences(boolean b)
          Sets if the whole string or all occurrences of the pattern should be replaced.
 String replacement()
          Returns the replacement text.
 void replacement(String replacement)
          Sets the replacement text.
 void saveSettings(NodeSettingsWO settings)
          Save the settings into the node settings object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringReplacerSettings

public StringReplacerSettings()
Method Detail

caseSensitive

public boolean caseSensitive()
Returns if the pattern should match case sensitive or not.

Returns:
true if the matches should be case sensitive, false otherwise

caseSensitive

public void caseSensitive(boolean b)
Sets if the pattern should match case sensitive or not.

Parameters:
b - true if the matches should be case sensitive, false otherwise

columnName

public String columnName()
Returns the name of the column that should be processed.

Returns:
the column's name

columnName

public void columnName(String colName)
Sets the name of the column that should be processed.

Parameters:
colName - the column's name

createNewColumn

public boolean createNewColumn()
Returns if a new column should be created instead of overriding the values in the target column.

Returns:
true if a new column should be created, false otherwise
See Also:
newColumnName()

createNewColumn

public void createNewColumn(boolean b)
Sets if a new column should be created instead of overriding the values in the target column.

Parameters:
b - true if a new column should be created, false otherwise
See Also:
newColumnName(String)

loadSettings

public void loadSettings(NodeSettingsRO settings)
                  throws InvalidSettingsException
Loads the settings from the node settings object.

Parameters:
settings - node settings
Throws:
InvalidSettingsException - if settings are missing

loadSettingsForDialog

public void loadSettingsForDialog(NodeSettingsRO settings)
Loads the settings from the node settings object.

Parameters:
settings - node settings

newColumnName

public String newColumnName()
Returns the name of the new column.

Returns:
the new column's name
See Also:
createNewColumn()

newColumnName

public void newColumnName(String colName)
Sets the name of the new column.

Parameters:
colName - the new column's name
See Also:
createNewColumn(boolean)

pattern

public String pattern()
Returns the pattern.

Returns:
the pattern

pattern

public void pattern(String pattern)
Sets the pattern.

Parameters:
pattern - the pattern

replaceAllOccurrences

public boolean replaceAllOccurrences()
Returns if the whole string or all occurrences of the pattern should be replaced.

Returns:
true if all occurrences should be replaced, false if the whole string should be replaced

replaceAllOccurrences

public void replaceAllOccurrences(boolean b)
Sets if the whole string or all occurrences of the pattern should be replaced.

Parameters:
b - true if all occurrences should be replaced, false if the whole string should be replaced

replacement

public String replacement()
Returns the replacement text.

Returns:
the replacement text

replacement

public void replacement(String replacement)
Sets the replacement text.

Parameters:
replacement - the replacement text

saveSettings

public void saveSettings(NodeSettingsWO settings)
Save the settings into the node settings object.

Parameters:
settings - node settings


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.