org.knime.base.node.rules
Class RuleEngineSettings

java.lang.Object
  extended by org.knime.base.node.rules.RuleEngineSettings

public class RuleEngineSettings
extends Object

This class contains all settings for the business rule node.

Author:
Thorsten Meinl, University of Konstanz

Field Summary
(package private) static String CFG_DEFAULT_LABEL
           
 
Constructor Summary
RuleEngineSettings()
           
 
Method Summary
 void addRule(String rule)
          Adds a rule.
 void clearRules()
          Removes all rules.
 String getDefaultLabel()
          Returns the label that should be used if no rule matches.
 String getNewColName()
          Returns the name of the new column containing the matching rule's outcome.
 void loadSettings(NodeSettingsRO settings)
          Loads the settings from the settings object.
 void loadSettingsForDialog(NodeSettingsRO settings)
          Loads the settings from the settings object for use in the dialog, i.e.
 Iterable<String> rules()
          Returns an iterable over all rules.
 void saveSettings(NodeSettingsWO settings)
          Saves the setting into the node settings object.
 void setDefaultLabel(String defaultLabel)
          Sets the label that should be used if no rule matches.
 void setNewcolName(String newcolName)
          Sets the name of the new column containing the matching rule's outcome.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CFG_DEFAULT_LABEL

static final String CFG_DEFAULT_LABEL
See Also:
Constant Field Values
Constructor Detail

RuleEngineSettings

public RuleEngineSettings()
Method Detail

setNewcolName

public void setNewcolName(String newcolName)
Sets the name of the new column containing the matching rule's outcome.

Parameters:
newcolName - the column's name

setDefaultLabel

public void setDefaultLabel(String defaultLabel)
Sets the label that should be used if no rule matches.

Parameters:
defaultLabel - the default label

getNewColName

public String getNewColName()
Returns the name of the new column containing the matching rule's outcome.

Returns:
the column's name

getDefaultLabel

public String getDefaultLabel()
Returns the label that should be used if no rule matches.

Returns:
the default label

addRule

public void addRule(String rule)
Adds a rule.

Parameters:
rule - the rule string

clearRules

public void clearRules()
Removes all rules.


rules

public Iterable<String> rules()
Returns an iterable over all rules.

Returns:
an iterable over all rules

loadSettings

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

Parameters:
settings - a node settings object
Throws:
InvalidSettingsException - if some settings are missing

loadSettingsForDialog

public void loadSettingsForDialog(NodeSettingsRO settings)
Loads the settings from the settings object for use in the dialog, i.e. default values are used for missing settings.

Parameters:
settings - a node settings object

saveSettings

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

Parameters:
settings - a node settings object


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.