use of org.knime.core.data.container.ContainerTable in project knime-core by knime.
the class ScatterPlotNodeModel method loadInternals.
/**
* {@inheritDoc}
*/
@Override
protected void loadInternals(final File internDir, final ExecutionMonitor exec) throws IOException, CanceledExecutionException {
File data = new File(internDir, FILE_NAME);
ContainerTable table = DataContainer.readFromZip(data);
int rowCount = table.getRowCount();
m_rows = new DefaultDataArray(table, 1, rowCount, exec);
}
use of org.knime.core.data.container.ContainerTable in project knime-core by knime.
the class NativeNodeContainer method putOutputTablesIntoGlobalRepository.
/**
* Enumerates the output tables and puts them into the workflow global repository of tables. All other (temporary)
* tables that were created in the given execution context, will be put in a set of temporary tables in the node.
*
* <p>
* This method is only to be called by the framework and by other external executor after execution.
*
* @param c The execution context containing the (so far) local tables.
* @noreference This method is not intended to be referenced by clients.
*/
public final void putOutputTablesIntoGlobalRepository(final ExecutionContext c) {
HashMap<Integer, ContainerTable> globalRep = getParent().getGlobalTableRepository();
m_node.putOutputTablesIntoGlobalRepository(globalRep);
HashMap<Integer, ContainerTable> localRep = Node.getLocalTableRepositoryFromContext(c);
Set<ContainerTable> localTables = new HashSet<ContainerTable>();
for (Map.Entry<Integer, ContainerTable> t : localRep.entrySet()) {
ContainerTable fromGlob = globalRep.get(t.getKey());
if (fromGlob == null) {
// not used globally
localTables.add(t.getValue());
} else {
assert fromGlob == t.getValue();
}
}
m_node.addToTemporaryTables(localTables);
}
Aggregations