Search in sources :

Example 46 with NodeSettingsWO

use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.

the class TokenizerSettings method saveDelimitersToConfiguration.

/*
     * saves the settings of all delimiters defined by adding a configuration
     * object for each delimiter to the passed config.
     */
private void saveDelimitersToConfiguration(final NodeSettingsWO cfg) {
    if (cfg == null) {
        throw new NullPointerException("Can't save 'delimiters' " + "to null config!");
    }
    for (int d = 0; d < m_delimPatterns.size(); d++) {
        NodeSettingsWO delimConf = cfg.addNodeSettings(CFGKEY_DELIMCFG + d);
        Delimiter delim = m_delimPatterns.get(d);
        delim.saveToConfig(delimConf);
    }
}
Also used : NodeSettingsWO(org.knime.core.node.NodeSettingsWO)

Example 47 with NodeSettingsWO

use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.

the class TokenizerSettings method saveCommentsToConfiguration.

/*
     * saves the settings of all Comments defined by adding a configuration
     * object for each comment to the passed config.
     */
private void saveCommentsToConfiguration(final NodeSettingsWO cfg) {
    if (cfg == null) {
        throw new NullPointerException("Can't save 'comments' " + "to null config!");
    }
    for (int c = 0; c < m_commentPatterns.size(); c++) {
        NodeSettingsWO commentConf = cfg.addNodeSettings(CFGKEY_COMMNTCFG + c);
        Comment comment = m_commentPatterns.get(c);
        comment.saveToConfig(commentConf);
    }
}
Also used : NodeSettingsWO(org.knime.core.node.NodeSettingsWO)

Example 48 with NodeSettingsWO

use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.

the class TokenizerSettings method saveQuotesToConfiguration.

/*
     * saves the settings of all quotes defined by adding a configuration object
     * for each quote to the passed config.
     */
private void saveQuotesToConfiguration(final NodeSettingsWO cfg) {
    if (cfg == null) {
        throw new NullPointerException("Can't save 'quotes' " + "to null config!");
    }
    for (int q = 0; q < m_quotePatterns.size(); q++) {
        NodeSettingsWO quoteConf = cfg.addNodeSettings(CFGKEY_QUOTECFG + q);
        Quote quote = m_quotePatterns.get(q);
        quote.saveToConfig(quoteConf);
    }
}
Also used : NodeSettingsWO(org.knime.core.node.NodeSettingsWO)

Example 49 with NodeSettingsWO

use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.

the class FileNodeContainerMetaPersistor method saveNodeExecutionJobManager.

protected static void saveNodeExecutionJobManager(final NodeSettingsWO settings, final NodeContainer nc) {
    NodeExecutionJobManager jobManager = nc.getJobManager();
    if (jobManager != null) {
        NodeSettingsWO s = settings.addNodeSettings(CFG_JOB_MANAGER_CONFIG);
        NodeExecutionJobManagerPool.saveJobManager(jobManager, s);
    }
}
Also used : NodeSettingsWO(org.knime.core.node.NodeSettingsWO)

Example 50 with NodeSettingsWO

use of org.knime.core.node.NodeSettingsWO in project knime-core by knime.

the class FileNodeContainerMetaPersistor method saveNodeAnnotation.

protected static void saveNodeAnnotation(final NodeSettingsWO settings, final NodeContainer nc) {
    NodeAnnotation annotation = nc.getNodeAnnotation();
    if (annotation != null && !annotation.getData().isDefault()) {
        NodeSettingsWO anno = settings.addNodeSettings("nodeAnnotation");
        annotation.save(anno);
    }
}
Also used : NodeSettingsWO(org.knime.core.node.NodeSettingsWO)

Aggregations

NodeSettingsWO (org.knime.core.node.NodeSettingsWO)111 NodeSettings (org.knime.core.node.NodeSettings)16 Map (java.util.Map)11 File (java.io.File)9 FileOutputStream (java.io.FileOutputStream)9 LinkedHashMap (java.util.LinkedHashMap)9 HashMap (java.util.HashMap)8 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)8 RowKey (org.knime.core.data.RowKey)6 DataCell (org.knime.core.data.DataCell)5 BufferedOutputStream (java.io.BufferedOutputStream)4 NodeSettingsRO (org.knime.core.node.NodeSettingsRO)4 HashSet (java.util.HashSet)3 GZIPOutputStream (java.util.zip.GZIPOutputStream)3 DataRow (org.knime.core.data.DataRow)3 ExecutionMonitor (org.knime.core.node.ExecutionMonitor)3 AbstractQuickFormConfiguration (org.knime.core.quickform.AbstractQuickFormConfiguration)3 AbstractQuickFormValueInConfiguration (org.knime.core.quickform.AbstractQuickFormValueInConfiguration)3 QuickFormInputNode (org.knime.core.quickform.in.QuickFormInputNode)3 MutableInteger (org.knime.core.util.MutableInteger)3