use of org.knime.base.node.util.DefaultDataArray 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.base.node.util.DefaultDataArray in project knime-core by knime.
the class ScatterPlotNodeModel method execute.
/**
* The execute function refreshs the contents of the RowInfo container. The
* model will create new RowInfos (as many as set in the dialog)
*
* @see org.knime.core.node.NodeModel
* #execute(BufferedDataTable[],ExecutionContext)
*/
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec) throws Exception {
assert inData != null;
assert inData.length == 1;
if ((m_firstRow < 1) || (m_numRows < 1)) {
throw new IllegalStateException("Setup the model's settings " + "before you execute it.");
}
BufferedDataTable table = inData[0];
int nrOfRows = Math.min(table.getRowCount(), m_numRows);
m_rows = new DefaultDataArray(table, m_firstRow, nrOfRows, exec);
return new BufferedDataTable[] {};
}
Aggregations