|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.node.ExtensionTable
public abstract class ExtensionTable
Base class for custom buffered data table types. In addition to the contract
defined by BufferedDataTable.KnowsRowCountTable, ExtensionTables must define a
constructor that accepts a single argument of type ExtensionTable.LoadContext.
| Nested Class Summary | |
|---|---|
static class |
ExtensionTable.LoadContext
Various parameters needed for loading an extension table. |
| Constructor Summary | |
|---|---|
protected |
ExtensionTable()
Default constructor; to be used to create a new table (as opposed to loading an existing table). |
protected |
ExtensionTable(ExtensionTable.LoadContext context)
Constructor to be used when loading an existing table. |
| Method Summary | |
|---|---|
protected BufferedDataTable |
create(ExecutionContext exec)
Create the actual buffered data table. |
protected JComponent[] |
getViews(BufferedDataTable owner)
Overwrite this method to provide a custom viewer. |
(package private) static ExtensionTable |
loadExtensionTable(ReferencedFile fileRef,
DataTableSpec spec,
NodeSettingsRO s,
Map<Integer,BufferedDataTable> tblRep,
ExecutionMonitor exec)
Load the extension, used internally from BufferedDataTable. |
void |
saveToFile(File f,
NodeSettingsWO settings,
ExecutionMonitor exec)
Save the table to a file. |
protected abstract void |
saveToFileOverwrite(File f,
NodeSettingsWO settings,
ExecutionMonitor exec)
Saves this extension table to the argument file. |
protected static ExtensionTable |
unwrap(BufferedDataTable table)
Provides a way to return the underlying extension table if the BufferedDataTable is an extension table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.knime.core.node.BufferedDataTable.KnowsRowCountTable |
|---|
clear, ensureOpen, getReferenceTables, getRowCount, iterator, putIntoTableRepository, removeFromTableRepository |
| Methods inherited from interface org.knime.core.data.DataTable |
|---|
getDataTableSpec |
| Constructor Detail |
|---|
protected ExtensionTable()
protected ExtensionTable(ExtensionTable.LoadContext context)
throws IOException,
CanceledExecutionException,
InvalidSettingsException
context - various parameters needed for loading
InvalidSettingsException - If settings are invalid
IOException - If reading fails
CanceledExecutionException - If canceled| Method Detail |
|---|
protected final BufferedDataTable create(ExecutionContext exec)
exec - The context, used to set ownership on table.
protected JComponent[] getViews(BufferedDataTable owner)
owner - the owner of this delegate
protected static ExtensionTable unwrap(BufferedDataTable table)
table - the table to unwrap
public final 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.
protected abstract void saveToFileOverwrite(File f,
NodeSettingsWO settings,
ExecutionMonitor exec)
throws IOException,
CanceledExecutionException
f - To write to.settings - The (derived) settings object (empty).exec - Execution monitor for cancelation, progress.
IOException - If that fails.
CanceledExecutionException - if canceled.
static ExtensionTable loadExtensionTable(ReferencedFile fileRef,
DataTableSpec spec,
NodeSettingsRO s,
Map<Integer,BufferedDataTable> tblRep,
ExecutionMonitor exec)
throws InvalidSettingsException,
IOException,
CanceledExecutionException
BufferedDataTable.
fileRef - To load from, it's a referenced file so that
implementations can delay the reading to when it's necessary.spec - The table specification.s - The settings objecttblRep - The global table map.exec - Progress monitor.
InvalidSettingsException - If settings are invalid
IOException - If reading fails
CanceledExecutionException - If canceled
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||