Search in sources :

Example 1 with DataColumnSpecFilterConfiguration

use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.

the class ModifyDateNodeDialog method saveSettingsTo.

/**
 * {@inheritDoc}
 */
@Override
protected void saveSettingsTo(final NodeSettingsWO settings) throws InvalidSettingsException {
    boolean filterOnlyLocalTime = ((SettingsModelString) m_dialogCompModifySelect.getModel()).getStringValue().equals(ModifyDateNodeModel.MODIFY_OPTION_APPEND);
    DataColumnSpecFilterConfiguration filterConfiguration = ModifyDateNodeModel.createDCFilterConfiguration(filterOnlyLocalTime ? ModifyDateNodeModel.LOCAL_TIME_FILTER : ModifyDateNodeModel.DATE_TIME_FILTER);
    m_dialogCompColFilter.saveConfiguration(filterConfiguration);
    filterConfiguration.saveConfiguration(settings);
    m_dialogCompReplaceOrAppend.saveSettingsTo(settings);
    m_dialogCompSuffix.saveSettingsTo(settings);
    m_dialogCompDate.saveSettingsTo(settings);
    m_dialogCompTimeZone.saveSettingsTo(settings);
    m_dialogCompModifySelect.saveSettingsTo(settings);
}
Also used : DataColumnSpecFilterConfiguration(org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration)

Example 2 with DataColumnSpecFilterConfiguration

use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.

the class ModifyTimeNodeDialog method loadSettingsFrom.

/**
 * {@inheritDoc}
 */
@Override
protected void loadSettingsFrom(final NodeSettingsRO settings, final DataTableSpec[] specs) throws NotConfigurableException {
    m_spec = specs[0];
    m_dialogCompReplaceOrAppend.loadSettingsFrom(settings, specs);
    m_dialogCompSuffix.loadSettingsFrom(settings, specs);
    m_dialogCompModifySelect.loadSettingsFrom(settings, specs);
    m_dialogCompTime.loadSettingsFrom(settings, specs);
    m_dialogCompTimeZone.loadSettingsFrom(settings, specs);
    m_filterOnlyLocalDate = ((SettingsModelString) m_dialogCompModifySelect.getModel()).getStringValue().equals(ModifyTimeNodeModel.MODIFY_OPTION_APPEND);
    final DataColumnSpecFilterConfiguration filterConfiguration = ModifyTimeNodeModel.createDCFilterConfiguration(m_filterOnlyLocalDate ? ModifyTimeNodeModel.LOCAL_DATE_FILTER : ModifyTimeNodeModel.DATE_TIME_FILTER);
    filterConfiguration.loadConfigurationInDialog(settings, specs[0]);
    m_dialogCompColFilter.loadConfiguration(filterConfiguration, specs[0]);
}
Also used : DataColumnSpecFilterConfiguration(org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration) SettingsModelString(org.knime.core.node.defaultnodesettings.SettingsModelString)

Example 3 with DataColumnSpecFilterConfiguration

use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.

the class ModifyTimeNodeDialog method saveSettingsTo.

/**
 * {@inheritDoc}
 */
@Override
protected void saveSettingsTo(final NodeSettingsWO settings) throws InvalidSettingsException {
    final boolean filterOnlyLocalDate = ((SettingsModelString) m_dialogCompModifySelect.getModel()).getStringValue().equals(ModifyTimeNodeModel.MODIFY_OPTION_APPEND);
    final DataColumnSpecFilterConfiguration filterConfiguration = ModifyTimeNodeModel.createDCFilterConfiguration(filterOnlyLocalDate ? ModifyTimeNodeModel.LOCAL_DATE_FILTER : ModifyTimeNodeModel.DATE_TIME_FILTER);
    m_dialogCompColFilter.saveConfiguration(filterConfiguration);
    filterConfiguration.saveConfiguration(settings);
    m_dialogCompReplaceOrAppend.saveSettingsTo(settings);
    m_dialogCompSuffix.saveSettingsTo(settings);
    m_dialogCompModifySelect.saveSettingsTo(settings);
    m_dialogCompTime.saveSettingsTo(settings);
    m_dialogCompTimeZone.saveSettingsTo(settings);
}
Also used : DataColumnSpecFilterConfiguration(org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration)

Example 4 with DataColumnSpecFilterConfiguration

use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.

the class ModifyTimeZoneNodeDialog method loadSettingsFrom.

/**
 * {@inheritDoc}
 */
@Override
protected void loadSettingsFrom(final NodeSettingsRO settings, final DataTableSpec[] specs) throws NotConfigurableException {
    m_spec = specs[0];
    m_dialogCompReplaceOrAppend.loadSettingsFrom(settings, specs);
    m_dialogCompSuffix.loadSettingsFrom(settings, specs);
    m_dialogCompTimeZone.loadSettingsFrom(settings, specs);
    m_dialogCompModifySelect.loadSettingsFrom(settings, specs);
    m_includeLocalDateTime = ((SettingsModelString) m_dialogCompModifySelect.getModel()).getStringValue().equals(ModifyTimeZoneNodeModel.MODIFY_OPTION_SET);
    final DataColumnSpecFilterConfiguration filterConfiguration = ModifyTimeZoneNodeModel.createDCFilterConfiguration(m_includeLocalDateTime ? ModifyTimeZoneNodeModel.ZONED_AND_LOCAL_FILTER : ModifyTimeZoneNodeModel.ZONED_FILTER);
    filterConfiguration.loadConfigurationInDialog(settings, specs[0]);
    m_dialogCompColFilter.loadConfiguration(filterConfiguration, specs[0]);
}
Also used : DataColumnSpecFilterConfiguration(org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration) SettingsModelString(org.knime.core.node.defaultnodesettings.SettingsModelString)

Example 5 with DataColumnSpecFilterConfiguration

use of org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration in project knime-core by knime.

the class ModifyTimeZoneNodeDialog method saveSettingsTo.

/**
 * {@inheritDoc}
 */
@Override
protected void saveSettingsTo(final NodeSettingsWO settings) throws InvalidSettingsException {
    boolean includeLocalDateTime = ((SettingsModelString) m_dialogCompModifySelect.getModel()).getStringValue().equals(ModifyTimeZoneNodeModel.MODIFY_OPTION_SET);
    DataColumnSpecFilterConfiguration filterConfiguration = ModifyTimeZoneNodeModel.createDCFilterConfiguration(includeLocalDateTime ? ModifyTimeZoneNodeModel.ZONED_AND_LOCAL_FILTER : ModifyTimeZoneNodeModel.ZONED_FILTER);
    m_dialogCompColFilter.saveConfiguration(filterConfiguration);
    filterConfiguration.saveConfiguration(settings);
    m_dialogCompReplaceOrAppend.saveSettingsTo(settings);
    m_dialogCompSuffix.saveSettingsTo(settings);
    m_dialogCompTimeZone.saveSettingsTo(settings);
    m_dialogCompModifySelect.saveSettingsTo(settings);
}
Also used : DataColumnSpecFilterConfiguration(org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration)

Aggregations

DataColumnSpecFilterConfiguration (org.knime.core.node.util.filter.column.DataColumnSpecFilterConfiguration)75 DataTableSpec (org.knime.core.data.DataTableSpec)15 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)14 NotConfigurableException (org.knime.core.node.NotConfigurableException)9 ChangeEvent (javax.swing.event.ChangeEvent)4 ChangeListener (javax.swing.event.ChangeListener)4 DataColumnSpec (org.knime.core.data.DataColumnSpec)4 SettingsModelString (org.knime.core.node.defaultnodesettings.SettingsModelString)4 DatabaseConnectionSettings (org.knime.core.node.port.database.DatabaseConnectionSettings)4 EnforceOption (org.knime.core.node.util.filter.NameFilterConfiguration.EnforceOption)4 DatabaseConnectionPortObjectSpec (org.knime.core.node.port.database.DatabaseConnectionPortObjectSpec)2 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 LinkedHashSet (java.util.LinkedHashSet)1 Solver (org.knime.base.node.mine.regression.logistic.learner4.LogRegLearnerSettings.Solver)1 BinNaming (org.knime.base.node.preproc.autobinner3.AutoBinnerLearnSettings.BinNaming)1 EqualityMethod (org.knime.base.node.preproc.autobinner3.AutoBinnerLearnSettings.EqualityMethod)1 Method (org.knime.base.node.preproc.autobinner3.AutoBinnerLearnSettings.Method)1 DoubleValue (org.knime.core.data.DoubleValue)1 IntValue (org.knime.core.data.IntValue)1