use of org.knime.core.node.NodeSettingsRO in project knime-core by knime.
the class SettingsModelPCADimensions method loadSettingsForDialog.
/**
* {@inheritDoc}
*/
@Override
protected void loadSettingsForDialog(final NodeSettingsRO settings, final PortObjectSpec[] specs) throws NotConfigurableException {
try {
final NodeSettingsRO mySettings = settings.getNodeSettings(m_configName);
setValues(mySettings.getDouble("doubleVal"), mySettings.getInt("intVal"), mySettings.getBoolean("choice"));
if (specs.length > 1 && specs[1] instanceof PCAModelPortObjectSpec) {
m_eigenvalues = ((PCAModelPortObjectSpec) specs[1]).getEigenValues();
} else {
m_eigenvalues = null;
}
} catch (final InvalidSettingsException e) {
setValues(100, 2, false);
}
}
use of org.knime.core.node.NodeSettingsRO in project knime-core by knime.
the class EditNominalDomainConfiguration method loadColumnMapping.
/**
* Loads the column settings.
*
* @param settings
* @throws InvalidSettingsException
*/
private void loadColumnMapping(final NodeSettingsRO settings) throws InvalidSettingsException {
NodeSettingsRO nodeSettings = settings.getNodeSettings(COLUMNS);
for (String cols : nodeSettings) {
NodeSettingsRO colSettings = nodeSettings.getNodeSettings(cols);
DataCell[] dataCellArray = colSettings.getDataCellArray(COLUMN_ORDERING, new DataCell[0]);
DataCell[] createdSettings = colSettings.getDataCellArray(COLUMN_CREATED_VALS, new DataCell[0]);
CheckUtils.checkSetting(dataCellArray != null, "invalid settings for column '%s'", cols);
m_colMapping.put(cols, Arrays.asList(dataCellArray));
m_createdDomainValues.put(cols, new HashSet<DataCell>(Arrays.asList(createdSettings)));
}
}
use of org.knime.core.node.NodeSettingsRO in project knime-core by knime.
the class OrRowFilter method loadSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
public void loadSettingsFrom(final NodeSettingsRO cfg) throws InvalidSettingsException {
NodeSettingsRO cfg1 = cfg.getNodeSettings(CFG_FILTER1);
NodeSettingsRO cfg2 = cfg.getNodeSettings(CFG_FILTER2);
m_in1 = RowFilterFactory.createRowFilter(cfg1);
m_in2 = RowFilterFactory.createRowFilter(cfg2);
}
use of org.knime.core.node.NodeSettingsRO in project knime-core by knime.
the class NegRowFilter method loadSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
public void loadSettingsFrom(final NodeSettingsRO cfg) throws InvalidSettingsException {
NodeSettingsRO inCfg = cfg.getNodeSettings(CFG_INFILTER);
m_inFilter = RowFilterFactory.createRowFilter(inCfg);
}
use of org.knime.core.node.NodeSettingsRO in project knime-core by knime.
the class GroupByNodeModel method loadInternals.
/**
* {@inheritDoc}
*/
@Override
protected void loadInternals(final File nodeInternDir, final ExecutionMonitor exec) throws IOException {
if (m_enableHilite.getBooleanValue()) {
final NodeSettingsRO config = NodeSettings.loadFromXML(new FileInputStream(new File(nodeInternDir, INTERNALS_FILE_NAME)));
try {
setHiliteMapping(DefaultHiLiteMapper.load(config));
m_hilite.addToHiLiteHandler(getInHiLiteHandler(0));
} catch (final InvalidSettingsException ex) {
throw new IOException(ex.getMessage());
}
}
}
Aggregations