|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.data.container.RearrangeColumnsTable
public final class RearrangeColumnsTable
Table implementation that is created based on a ColumnRearranger. This class
is not intended for subclassing or to be used directly in any node
implementation. Instead use the functionality provided through the
ColumnRearranger and the ExecutionContext
that is provided in the NodeModel's execute method. See
ColumnRearranger for more details on how to use them.
| Constructor Summary | |
|---|---|
RearrangeColumnsTable(ReferencedFile f,
NodeSettingsRO settings,
Map<Integer,BufferedDataTable> tblRep,
DataTableSpec spec,
int tableID,
HashMap<Integer,ContainerTable> bufferRep)
Creates new object based on the content in settings and
the content from the file f. |
|
| Method Summary | |
|---|---|
void |
clear()
Do not call this method! It's used internally to delete temp files. |
static RearrangeColumnsTable |
create(ColumnRearranger rearranger,
BufferedDataTable table,
ExecutionMonitor subProgress,
ExecutionContext context)
This factory method is intended to be used immediately before the BufferedDataTable is created. |
void |
ensureOpen()
Internal use. |
ContainerTable |
getAppendTable()
Get reference to the appended table. |
DataTableSpec |
getDataTableSpec()
Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
BufferedDataTable[] |
getReferenceTables()
Get handle to the reference table in an array of length 1. |
int |
getRowCount()
Row count of the table. |
CloseableRowIterator |
iterator()
Returns a row iterator which returns each row one-by-one from the table. |
void |
putIntoTableRepository(HashMap<Integer,ContainerTable> rep)
Put this table into the global table repository. |
boolean |
removeFromTableRepository(HashMap<Integer,ContainerTable> rep)
Remove this table from global table repository. |
void |
saveToFile(File f,
NodeSettingsWO s,
ExecutionMonitor exec)
Save the table to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RearrangeColumnsTable(ReferencedFile f,
NodeSettingsRO settings,
Map<Integer,BufferedDataTable> tblRep,
DataTableSpec spec,
int tableID,
HashMap<Integer,ContainerTable> bufferRep)
throws IOException,
InvalidSettingsException
settings and
the content from the file f. Used when the data is restored
from disc.
Note: You should not be required to use this constructor!
f - The file to read from the newly appended columns.settings - The settings containing the information how to assemble
the table.tblRep - The table repository (only available during start)spec - The data table spec of the resulting table. This argument
is null when the data to restore is written using
KNIME 1.1.x or before.tableID - buffer ID of underlying buffer.bufferRep - Repository of buffers for blob (de)serialization.
IOException - If reading the fails.
InvalidSettingsException - If the settings are invalid.| Method Detail |
|---|
public BufferedDataTable[] getReferenceTables()
getReferenceTables in interface BufferedDataTable.KnowsRowCountTablepublic ContainerTable getAppendTable()
public DataTableSpec getDataTableSpec()
DataTableSpec object of this table which gives
information about the structure of this data table.
getDataTableSpec in interface DataTablepublic CloseableRowIterator iterator()
iterator in interface Iterable<DataRow>iterator in interface DataTableiterator in interface BufferedDataTable.KnowsRowCountTableDataRow
public static RearrangeColumnsTable create(ColumnRearranger rearranger,
BufferedDataTable table,
ExecutionMonitor subProgress,
ExecutionContext context)
throws CanceledExecutionException
BufferedDataTable is created.
rearranger - The meta information how to assemble everything.table - The reference table.subProgress - The progress monitor for progress/cancel.context - Used for data container creation.
CanceledExecutionException - If canceled.
IllegalArgumentException - If the spec is not equal to the
spec of the rearranger.public int getRowCount()
getRowCount in interface BufferedDataTable.KnowsRowCountTable
public void saveToFile(File f,
NodeSettingsWO s,
ExecutionMonitor exec)
throws IOException,
CanceledExecutionException
saveToFile in interface BufferedDataTable.KnowsRowCountTablef - To write to.s - To add meta information to.exec - For progress/cancel.
IOException - If writing fails.
CanceledExecutionException - If canceled.public void clear()
clear in interface BufferedDataTable.KnowsRowCountTableBufferedDataTable.KnowsRowCountTable.clear()public void ensureOpen()
BufferedDataTable.ensureOpen().
ensureOpen in interface BufferedDataTable.KnowsRowCountTablepublic void putIntoTableRepository(HashMap<Integer,ContainerTable> rep)
putIntoTableRepository in interface BufferedDataTable.KnowsRowCountTablerep - The workflow table repository.public boolean removeFromTableRepository(HashMap<Integer,ContainerTable> rep)
removeFromTableRepository in interface BufferedDataTable.KnowsRowCountTablerep - The workflow table repository.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||