|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.io.filereader.FileReaderPreviewTable
public class FileReaderPreviewTable
The data table displayed in the file reader's dialog's preview. We need an
extra incarnation of a data table (different from from the FileTable
)
because if settings are not correct yet, the table in the preview must not
throw any exception on unexpected or invalid data it reads (which the
"normal" file table does). Thus, this table returns a row iterator that will
create an error row when a error occurs during file reading. It will end the
table after the erroneous element was read.
Constructor Summary | |
---|---|
FileReaderPreviewTable(DataTableSpec tableSpec,
FileReaderNodeSettings settings,
ExecutionContext exec)
Creates a new table, its like the "normal" FileTable , just not
failing on invalid data files. |
Method Summary | |
---|---|
(package private) void |
addChangeListener(ChangeListener listener)
If someone wants to be notified if an error occurred he should register through this method. |
void |
dispose()
Call this before releasing the last reference to this table and all its iterators. |
protected void |
finalize()
|
DataTableSpec |
getDataTableSpec()
Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
(package private) String |
getErrorDetail()
|
(package private) int |
getErrorLine()
|
(package private) String |
getErrorMsg()
|
(package private) boolean |
getErrorOccurred()
|
RowIterator |
iterator()
Returns a row iterator which returns each row one-by-one from the table. |
(package private) void |
removeAllChangeListeners()
Clears the list of change listeners |
(package private) void |
setError(FileReaderException fre)
This sets the flag indicating that the row iterator ended the table with an error. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
FileReaderPreviewTable(DataTableSpec tableSpec, FileReaderNodeSettings settings, ExecutionContext exec)
FileTable
, just not
failing on invalid data files.
settings
- settings for the underlying FileTable
tableSpec
- table spec for the underlying FileTable
exec
- the execution context the progress is reported toFileTable
Method Detail |
---|
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void dispose()
next()
on any of the iterators of this
table after disposing of the table has undefined behavior.
public RowIterator iterator()
iterator
in interface Iterable<DataRow>
iterator
in interface DataTable
DataRow
public DataTableSpec getDataTableSpec()
DataTableSpec
object of this table which gives
information about the structure of this data table.
getDataTableSpec
in interface DataTable
void setError(FileReaderException fre)
fre
- the exception thrown by the error.boolean getErrorOccurred()
true
if an error occurred in an underlying row
iterator. Meaning the table contains invalid data. NOTE: if
false
is returned it is not guaranteed that all
data in the table is valid. It could be that no row iterator
reached the invalid data yet.String getErrorMsg()
null
if not set.String getErrorDetail()
int getErrorLine()
void addChangeListener(ChangeListener listener)
listener
- the object being notified when an error occurs.void removeAllChangeListeners()
addChangeListener(ChangeListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |