Search in sources :

Example 96 with Config

use of org.knime.core.node.config.Config in project knime-core by knime.

the class SettingsModelFilterString method loadSettingsForModel.

/**
 * {@inheritDoc}
 */
@Override
protected void loadSettingsForModel(final NodeSettingsRO settings) throws InvalidSettingsException {
    try {
        // no default value, throw an exception instead
        Config lists = settings.getConfig(m_configName);
        String[] incl = lists.getStringArray(CFGKEY_INCL);
        String[] excl = lists.getStringArray(CFGKEY_EXCL);
        setIncludeList(incl);
        setExcludeList(excl);
        boolean keepAll = lists.getBoolean(CFGKEY_KEEPALL, false);
        setKeepAllSelected(keepAll);
    } catch (IllegalArgumentException iae) {
        throw new InvalidSettingsException(iae.getMessage());
    }
}
Also used : InvalidSettingsException(org.knime.core.node.InvalidSettingsException) Config(org.knime.core.node.config.Config)

Aggregations

Config (org.knime.core.node.config.Config)96 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)25 Color (java.awt.Color)10 File (java.io.File)10 ArrayList (java.util.ArrayList)10 NodeSettings (org.knime.core.node.NodeSettings)10 FileOutputStream (java.io.FileOutputStream)8 DataColumnSpec (org.knime.core.data.DataColumnSpec)7 DataTableSpec (org.knime.core.data.DataTableSpec)7 ConfigRO (org.knime.core.node.config.ConfigRO)7 HashMap (java.util.HashMap)6 GZIPOutputStream (java.util.zip.GZIPOutputStream)6 HashSet (java.util.HashSet)5 LinkedHashMap (java.util.LinkedHashMap)5 DataColumnSpecCreator (org.knime.core.data.DataColumnSpecCreator)5 SimpleStreamableOperatorInternals (org.knime.core.node.streamable.simple.SimpleStreamableOperatorInternals)5 FileInputStream (java.io.FileInputStream)4 IOException (java.io.IOException)4 GZIPInputStream (java.util.zip.GZIPInputStream)4 DataCell (org.knime.core.data.DataCell)4