use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.
the class MetaNodeTemplateInformation method save.
/**
* Saves this object to the argument settings.
* @param settings To save to.
*/
public void save(final NodeSettingsWO settings) {
if (!Role.None.equals(m_role)) {
NodeSettingsWO nestedSettings = settings.addNodeSettings(CFG_TEMPLATE_INFO);
nestedSettings.addString("role", m_role.name());
String dateS = getTimeStampString();
nestedSettings.addString("timestamp", dateS);
String uriS = m_sourceURI == null ? null : m_sourceURI.toString();
nestedSettings.addString("sourceURI", uriS);
if (Role.Template.equals(m_role)) {
nestedSettings.addString("templateType", m_type.name());
}
}
}
use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.
the class JavaSnippetTemplate method saveSettings.
/**
* Saves current parameters to settings object.
* @param settings To save to.
*/
@Override
public void saveSettings(final NodeSettingsWO settings) {
settings.addString(META_CATEGORY, m_metaCategory.getName());
settings.addString(CATEGORY, m_category);
settings.addString(NAME, m_name);
settings.addString(DESCRIPTION, m_description);
settings.addString(VERSION, m_version);
NodeSettingsWO snippet = settings.addNodeSettings(SNIPPET);
m_snippetSettings.saveSettings(snippet);
}
use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.
the class TimeMissingValueHandlingColSetting method saveMetaColSettings.
/**
* Saves the meta settings to a config object.
*
* @param colSettings the settings to write, may include individual settings (ignored)
* @param settings to write to
*/
static void saveMetaColSettings(final TimeMissingValueHandlingColSetting[] colSettings, final NodeSettingsWO settings) {
NodeSettingsWO defaults = settings.addNodeSettings(CFG_META);
for (int i = 0; i < colSettings.length; i++) {
if (!colSettings[i].isMetaConfig()) {
continue;
}
ConfigType type = colSettings[i].getType();
String id;
switch(type) {
case NON_NUMERICAL:
id = CFG_META_NUMERICAL;
break;
case NUMERICAL:
id = CFG_META_NON_NUMERICAL;
break;
default:
assert false;
id = CFG_META_NUMERICAL;
}
NodeSettingsWO subConfig = defaults.addNodeSettings(id);
colSettings[i].saveSettings(subConfig);
}
}
use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.
the class AppendVariableToTableSettings method saveSettingsTo.
/**
* @param settings to save to.
*/
public void saveSettingsTo(final NodeSettingsWO settings) {
settings.addBoolean("all", m_includeAll);
NodeSettingsWO sub = settings.addNodeSettings("variables");
for (Pair<String, FlowVariable.Type> v : m_variablesOfInterest) {
NodeSettingsWO sub2 = sub.addNodeSettings(v.getFirst());
sub2.addString("name", v.getFirst());
sub2.addString("type", v.getSecond().name());
}
}
use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.
the class VariableToTableSettings method saveSettingsTo.
/**
* @param settings to save to.
*/
public void saveSettingsTo(final NodeSettingsWO settings) {
settings.addBoolean("all", m_includeAll);
NodeSettingsWO sub = settings.addNodeSettings("variables");
for (Pair<String, FlowVariable.Type> v : m_variablesOfInterest) {
NodeSettingsWO sub2 = sub.addNodeSettings(v.getFirst());
sub2.addString("name", v.getFirst());
sub2.addString("type", v.getSecond().name());
}
}
Aggregations