use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class DataColumnSpecFilterNodeModel method loadValidatedSettingsFrom.
/**
* Reads the filtered columns.
*
* @param settings to read from
* @throws InvalidSettingsException if the settings does not contain the
* size or a particular column key
*/
@Override
protected void loadValidatedSettingsFrom(final NodeSettingsRO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration conf = createDCSFilterConfiguration();
conf.loadConfigurationInModel(settings);
m_conf = conf;
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class DataColumnSpecFilterNodeModel method validateSettings.
/**
* {@inheritDoc}
*/
@Override
protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration conf = createDCSFilterConfiguration();
conf.loadConfigurationInModel(settings);
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class MissingValueColumnFilterNodeDialogPane method loadSettingsFrom.
/**
* Calls the update method of the underlying filter panel.
* @param settings the node settings to read from
* @param specs the input specs
* @throws NotConfigurableException if no columns are available for filtering
*/
@Override
protected void loadSettingsFrom(final NodeSettingsRO settings, final DataTableSpec[] specs) throws NotConfigurableException {
final DataTableSpec spec = specs[0];
if (spec == null || spec.getNumColumns() == 0) {
throw new NotConfigurableException("No columns available for " + "selection.");
}
DataColumnSpecFilterConfiguration config = MissingValueColumnFilterNodeModel.createDCSFilterConfiguration();
config.loadConfigurationInDialog(settings, specs[0]);
m_filterPanel.loadConfiguration(config, specs[0]);
m_percentage.loadSettingsFrom(settings, specs);
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class ColumnToGrid2NodeDialogPane method loadSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
protected void loadSettingsFrom(final NodeSettingsRO settings, final DataTableSpec[] specs) throws NotConfigurableException {
ColumnToGrid2Configuration config = new ColumnToGrid2Configuration();
config.loadSettings(settings, specs[0]);
DataColumnSpecFilterConfiguration filterConfig = config.getFilterConfiguration();
m_filterPanel.loadConfiguration(filterConfig, specs[0]);
m_gridColSpinner.setValue(config.getColCount());
String groupCol = config.getGroupColumn();
if (m_enableGroupingChecker.isSelected() != (groupCol != null)) {
m_enableGroupingChecker.doClick();
}
try {
m_groupColumnCombo.update(specs[0], groupCol);
} catch (NotConfigurableException nce) {
// ignore
}
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class ColumnToGrid2NodeDialogPane method saveSettingsTo.
/**
* {@inheritDoc}
*/
@Override
protected void saveSettingsTo(final NodeSettingsWO settings) throws InvalidSettingsException {
ColumnToGrid2Configuration config = new ColumnToGrid2Configuration();
config.setColCount((Integer) m_gridColSpinner.getValue());
DataColumnSpecFilterConfiguration filterConfig = ColumnToGrid2NodeModel.createDCSFilterConfiguration();
m_filterPanel.saveConfiguration(filterConfig);
config.setFilterConfiguration(filterConfig);
if (m_enableGroupingChecker.isSelected()) {
config.setGroupColumn(m_groupColumnCombo.getSelectedColumn());
}
config.saveSettingsTo(settings);
}
Aggregations