|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.data.container.ContainerTable
public final class ContainerTable
Class implementing the DataTable interface and using a buffer
from a DataContainer as data source. This class doesn't do
functional things. It only provides the DataTable methods.
We split it from the Buffer implementation as a buffer is
dynamic in size. This table should only be used when the buffer has been
fixed.
| Constructor Summary | |
|---|---|
ContainerTable(Buffer buffer)
Create new Table based on a Buffer. |
|
ContainerTable(CopyOnAccessTask readTask,
DataTableSpec spec)
Constructor when table is read from file. |
|
| Method Summary | |
|---|---|
void |
clear()
Do not call this method! It's used internally to delete temp files. |
void |
ensureOpen()
Do not use this method (only invoked by the framework). |
(package private) Buffer |
getBuffer()
Get reference to buffer. |
int |
getBufferID()
Delegates to buffer to get its ID. |
DataTableSpec |
getDataTableSpec()
Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
BufferedDataTable[] |
getReferenceTables()
Returns an empty array. |
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. |
protected void |
restoreIntoMemory()
Instruct the underlying buffer to cache the rows into main memory to accelerate future iterations. |
void |
saveToFile(File f,
NodeSettingsWO settings,
ExecutionMonitor exec)
Do not call this method! Internal use! 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 |
|---|
ContainerTable(Buffer buffer)
DataContainer.getTable().
buffer - To read data from.DataContainer.getTable()
ContainerTable(CopyOnAccessTask readTask,
DataTableSpec spec)
readTask - Carries out the copy process when iterator is requested
(just once).spec - The spec of this table.| Method Detail |
|---|
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.KnowsRowCountTableDataRowpublic int getRowCount()
getRowCount in interface BufferedDataTable.KnowsRowCountTableBuffer getBuffer()
public int getBufferID()
Buffer.getBufferID()protected void restoreIntoMemory()
Buffer.restoreIntoMemory()
public void saveToFile(File f,
NodeSettingsWO settings,
ExecutionMonitor exec)
throws IOException,
CanceledExecutionException
saveToFile in interface BufferedDataTable.KnowsRowCountTablef - To write to.settings - 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 void clear()
clear in interface BufferedDataTable.KnowsRowCountTableBufferedDataTable.KnowsRowCountTable.clear()public void ensureOpen()
BufferedDataTable.ensureOpen().
ensureOpen in interface BufferedDataTable.KnowsRowCountTablepublic BufferedDataTable[] getReferenceTables()
getReferenceTables in interface BufferedDataTable.KnowsRowCountTablenull.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||