use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class CategoryToNumberNodeSettings method loadSettingsForModel.
/**
* Called from model when settings are to be loaded.
* @param settings To load from
* @throws InvalidSettingsException If settings are invalid.
*/
void loadSettingsForModel(final NodeSettingsRO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration config = CategoryToNumberNodeModel.createDCSFilterConfiguration();
config.loadConfigurationInModel(settings);
m_filterConfiguration = config;
/**
* Define names of new columns.
*/
m_appendColumns = settings.getBoolean(APPEND_COLUMN);
m_columnSuffix = settings.getString(COLUMN_SUFFIX);
/**
* controls content of output columns.
*/
m_startIndex = settings.getInt(START_INDEX);
m_increment = settings.getInt(INCREMENT);
/**
* maximum number of allowed categories.
*/
m_maxCategories = settings.getInt(MAX_CATEGORIES);
/**
* corner cases for the applier.
*/
m_defaultValue = settings.getDataCell(DEFAULT_VALUE);
m_mapMissingTo = settings.getDataCell(MAP_MISSING_TO);
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class CategoryToNumberNodeSettings method loadSettingsForDialog.
/**
* Called from dialog when settings are to be loaded.
* @param settings To load from
*/
void loadSettingsForDialog(final NodeSettingsRO settings, final DataTableSpec spec) {
DataColumnSpecFilterConfiguration config = CategoryToNumberNodeModel.createDCSFilterConfiguration();
config.loadConfigurationInDialog(settings, spec);
m_filterConfiguration = config;
/**
* Define names of new columns.
*/
m_appendColumns = settings.getBoolean(APPEND_COLUMN, true);
m_columnSuffix = settings.getString(COLUMN_SUFFIX, " (to number)");
/**
* controls content of output columns.
*/
m_startIndex = settings.getInt(START_INDEX, 0);
m_increment = settings.getInt(INCREMENT, 1);
/**
* maximum number of allowed categories.
*/
m_maxCategories = settings.getInt(MAX_CATEGORIES, DEFAULT_MAX_CATEGORIES);
/**
* corner cases for the applier.
*/
m_defaultValue = settings.getDataCell(DEFAULT_VALUE, DataType.getMissingCell());
m_mapMissingTo = settings.getDataCell(MAP_MISSING_TO, DataType.getMissingCell());
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class ColumnToGrid2Configuration method loadSettings.
/**
* Loads settings in model.
* @param settings To load from.
* @throws InvalidSettingsException If invalid.
*/
void loadSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration conf = ColumnToGrid2NodeModel.createDCSFilterConfiguration();
conf.loadConfigurationInModel(settings);
m_filterConfig = conf;
m_colCount = settings.getInt("grid_col_count");
if (m_colCount <= 0) {
throw new InvalidSettingsException("Invalid grid col count: " + m_colCount);
}
m_groupColumn = settings.getString("groupColumn");
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class ColumnToGrid2Configuration method loadSettings.
/**
* Loads settings in dialog, inits default if invalid.
* @param settings To load from.
* @param spec The input spec.
*/
void loadSettings(final NodeSettingsRO settings, final DataTableSpec spec) {
DataColumnSpecFilterConfiguration conf = ColumnToGrid2NodeModel.createDCSFilterConfiguration();
conf.loadConfigurationInDialog(settings, spec);
m_filterConfig = conf;
m_colCount = settings.getInt("grid_col_count", DEF_COL_COUNT);
if (m_colCount <= 0) {
m_colCount = DEF_COL_COUNT;
}
m_groupColumn = settings.getString("groupColumn", null);
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class DataColumnSpecFilterNodeDialogPane method saveSettingsTo.
/**
* Sets the list of columns to exclude inside the corresponding
* <code>NodeModel</code> which are retrieved from the filter panel.
* @param settings the node settings to write into
* @throws InvalidSettingsException if one of the settings is not valid
*/
@Override
protected void saveSettingsTo(final NodeSettingsWO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration config = DataColumnSpecFilterNodeModel.createDCSFilterConfiguration();
m_filterPanel.saveConfiguration(config);
config.saveConfiguration(settings);
}
Aggregations