use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class LowVarFilter2NodeModel method validateSettings.
/**
* {@inheritDoc}
*/
@Override
protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration conf = createColFilterConf();
conf.loadConfigurationInModel(settings);
double varThresh = settings.getDouble(CFG_KEY_MAX_VARIANCE);
if (varThresh < 0.0) {
throw new InvalidSettingsException("Negative variance not allowed: " + varThresh);
}
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class SplitNodeModel2 method validateSettings.
/**
* {@inheritDoc}
*/
@Override
protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration conf = createColFilterConf();
conf.loadConfigurationInModel(settings);
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class SplitNodeModel2 method loadValidatedSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
protected void loadValidatedSettingsFrom(final NodeSettingsRO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration conf = createColFilterConf();
conf.loadConfigurationInModel(settings);
m_conf = conf;
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class DataColumnSpecFilterNodeDialogPane 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 = DataColumnSpecFilterNodeModel.createDCSFilterConfiguration();
config.loadConfigurationInDialog(settings, specs[0]);
m_filterPanel.loadConfiguration(config, specs[0]);
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.
the class MissingValueColumnFilterNodeDialogPane 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 = MissingValueColumnFilterNodeModel.createDCSFilterConfiguration();
m_filterPanel.saveConfiguration(config);
config.saveConfiguration(settings);
m_percentage.saveSettingsTo(settings);
}
Aggregations