use of org.knime.core.node.NodeSettings in project knime-core by knime.
the class WorkflowManager method getNodeSettings.
/**
* @return user settings for this node, possibly empty but not <code>null</code>.
* @since 3.5
*/
@Override
public NodeSettings getNodeSettings() {
NodeSettings settings = new NodeSettings("wfm_settings");
saveSettings(settings);
return settings;
}
use of org.knime.core.node.NodeSettings in project knime-core by knime.
the class WorkflowManager method getDialogPaneWithSettings.
/**
* {@inheritDoc}
*/
@Override
NodeDialogPane getDialogPaneWithSettings(final PortObjectSpec[] inSpecs, final PortObject[] inData) throws NotConfigurableException {
NodeDialogPane dialogPane = getDialogPane();
// find all quickform input nodes and update meta dialog
Map<NodeID, MetaNodeDialogNode> nodes = findNodes(MetaNodeDialogNode.class, false);
((MetaNodeDialogPane) dialogPane).setQuickformNodes(nodes);
NodeSettings settings = getNodeSettings();
Node.invokeDialogInternalLoad(dialogPane, settings, inSpecs, inData, new FlowObjectStack(getID()), new CredentialsProvider(this, m_credentialsStore), getDirectNCParent().isWriteProtected());
return dialogPane;
}
use of org.knime.core.node.NodeSettings in project knime-core by knime.
the class AbstractQuickFormConfiguration method copyValueConfigurationFrom.
/**
* @param reference the valueConfiguration to copy from, not null.
* @throws InvalidSettingsException if some settings could not be loaded
*/
public void copyValueConfigurationFrom(final V reference) throws InvalidSettingsException {
V valueConfig = createValueConfiguration();
NodeSettings settings = new NodeSettings("copy");
reference.saveValue(settings);
valueConfig.loadValueInModel(settings);
m_valueConfiguration = valueConfig;
}
use of org.knime.core.node.NodeSettings in project knime-core by knime.
the class HiLiteCollectorNodeModel method saveInternals.
/**
* {@inheritDoc}
*/
@Override
protected void saveInternals(final File nodeInternDir, final ExecutionMonitor exec) throws IOException, CanceledExecutionException {
NodeSettings sett = new NodeSettings(KEY_ANNOTATIONS);
RowKey[] cells = m_annotationMap.keySet().toArray(new RowKey[m_annotationMap.size()]);
sett.addRowKeyArray("row_keys", cells);
for (RowKey cell : cells) {
NodeSettingsWO subSett = sett.addNodeSettings(cell.toString());
for (Map.Entry<Integer, String> e : m_annotationMap.get(cell).entrySet()) {
subSett.addString(e.getKey().toString(), e.getValue());
}
}
File f = new File(nodeInternDir, KEY_ANNOTATIONS);
sett.saveToXML(new FileOutputStream(f));
}
use of org.knime.core.node.NodeSettings in project knime-core by knime.
the class UnpivotNodeModel method saveInternals.
/**
* {@inheritDoc}
*/
@Override
protected void saveInternals(final File nodeInternDir, final ExecutionMonitor exec) throws IOException, CanceledExecutionException {
if (m_enableHilite.getBooleanValue()) {
final NodeSettings config = new NodeSettings("hilite_mapping");
((DefaultHiLiteMapper) m_trans.getMapper()).save(config);
config.saveToXML(new GZIPOutputStream(new FileOutputStream(new File(nodeInternDir, "hilite_mapping.xml.gz"))));
}
}
Aggregations