use of org.knime.core.node.ExtensionTable in project knime-core by knime.
the class RearrangeColumnsTable method saveToFile.
/**
* {@inheritDoc}
*/
@Override
public void saveToFile(final File f, final NodeSettingsWO s, final ExecutionMonitor exec) throws IOException, CanceledExecutionException {
NodeSettingsWO subSettings = s.addNodeSettings(CFG_INTERNAL_META);
subSettings.addInt(CFG_REFERENCE_ID, m_reference.getBufferedTableId());
subSettings.addIntArray(CFG_MAP, m_map);
subSettings.addBooleanArray(CFG_FLAGS, m_isFromRefTable);
if (m_appendTable != null) {
/* FIXME (later): this logic already is present in BufferedDataTable#save.
* Why do we have to replicate this logic here?
*/
if (m_appendTable instanceof BufferedContainerTable) {
subSettings.addInt(CFG_APPEND_TABLE_TYPE, BUFFERED_CONTAINER_TABLE_TYPE);
} else if (m_appendTable instanceof ExtensionTable) {
subSettings.addInt(CFG_APPEND_TABLE_TYPE, EXTENSION_TABLE_TYPE);
} else {
throw new IllegalArgumentException("Unsupported append table type in RearrangeColumnTable.");
}
m_appendTable.saveToFile(f, subSettings, exec);
}
}
Aggregations