|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.data.container.TableSpecReplacerTable
public final class TableSpecReplacerTable
Table that only replaces the data table spec of an underlying table. This class is not intended for subclassing or to be used in a node model implementation. Instead, use the methods provided through the execution context.
ExecutionContext.createSpecReplacerTable(
BufferedDataTable, DataTableSpec)| Constructor Summary | |
|---|---|
TableSpecReplacerTable(BufferedDataTable table,
DataTableSpec newSpec)
Creates new table. |
|
| Method Summary | |
|---|---|
void |
clear()
Do not call this method! It's used internally. |
void |
ensureOpen()
Implementation of BufferedDataTable.ensureOpen(). |
DataTableSpec |
getDataTableSpec()
Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
BufferedDataTable[] |
getReferenceTables()
Get handle to reference table in an array of length 1. |
int |
getRowCount()
Row count of the table. |
CloseableRowIterator |
iterator()
Overridden to narrow return type to closeable iterator. |
static TableSpecReplacerTable |
load(NodeSettingsRO s,
DataTableSpec newSpec,
Map<Integer,BufferedDataTable> tblRep)
Restores table from a file that has been written using KNIME 1.2.0 or later. |
static TableSpecReplacerTable |
load11x(File f,
NodeSettingsRO s,
Map<Integer,BufferedDataTable> tblRep)
Restores table from a file that has been written using KNIME 1.1.x or before. |
void |
putIntoTableRepository(HashMap<Integer,ContainerTable> rep)
Does nothing. |
boolean |
removeFromTableRepository(HashMap<Integer,ContainerTable> rep)
Does nothing. |
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 TableSpecReplacerTable(BufferedDataTable table,
DataTableSpec newSpec)
table - The reference table.newSpec - Its new spec.
IllegalArgumentException - If the spec doesn't match the data
(number of columns)| Method Detail |
|---|
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 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.
public static TableSpecReplacerTable load11x(File f,
NodeSettingsRO s,
Map<Integer,BufferedDataTable> tblRep)
throws IOException,
InvalidSettingsException
f - The file to read from.s - The settings to get meta information from.tblRep - The table repository
IOException - If reading the file fails.
InvalidSettingsException - If reading the settings fails.
public static TableSpecReplacerTable load(NodeSettingsRO s,
DataTableSpec newSpec,
Map<Integer,BufferedDataTable> tblRep)
throws InvalidSettingsException
s - The settings to get meta information from.newSpec - The new table spec.tblRep - The table repository
InvalidSettingsException - If reading the settings fails.public void clear()
clear in interface BufferedDataTable.KnowsRowCountTablepublic void ensureOpen()
BufferedDataTable.ensureOpen().
ensureOpen in interface BufferedDataTable.KnowsRowCountTablepublic 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.KnowsRowCountTableDataRowpublic int getRowCount()
getRowCount in interface BufferedDataTable.KnowsRowCountTablepublic BufferedDataTable[] getReferenceTables()
getReferenceTables in interface BufferedDataTable.KnowsRowCountTable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||