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);
}
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]);
}
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);
}
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]);
}
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);
}
Aggregations