AbstractRowFilter
instead which supports more than Integer.MAX_VALUE
rows@Deprecated public abstract class RowFilter extends Object implements IRowFilter
RowFilterIterator
to determine whether a row should be filtered or not. RowFilterFactory
in
order to get load and save work.Constructor and Description |
---|
RowFilter()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deprecated.
|
abstract DataTableSpec |
configure(DataTableSpec inSpec)
Deprecated.
Called when a new
DataTableSpec is available. |
abstract void |
loadSettingsFrom(NodeSettingsRO cfg)
Deprecated.
Load your internal settings from the configuration object.
|
abstract boolean |
matches(DataRow row,
int rowIndex)
Deprecated.
Return
true if the specified row matches the criteria set in the filter. |
boolean |
matches(DataRow row,
long rowIndex)
Deprecated.
Return
true if the specified row matches the criteria set in the filter. |
protected abstract void |
saveSettings(NodeSettingsWO cfg)
Deprecated.
Do not call this function - rather call
saveSettingsTo(NodeSettingsWO) . |
void |
saveSettingsTo(NodeSettingsWO cfg)
Deprecated.
Save your internal settings into the specified configuration object.
|
public boolean matches(DataRow row, long rowIndex) throws EndOfTableException, IncludeFromNowOn
true
if the specified row matches the criteria set in the filter. Can throw a
EndOfTableException
if the filter can tell that no more rows of the table will be able to fulfill the
criteria.matches
in interface IRowFilter
row
- the row to testrowIndex
- the row index of the passed row in the original tabletrue
if the row matches the criteria set in the filter, false
if notEndOfTableException
- if there is no chance that any of the rows coming (including the current
rowIndex
) will fulfill the criteria, thus no further row in the original table will
be a match to this filter. (In general this is hard to tell, but a row number filter can
certainly use it.) If the exception is received the row filter table iterator will flag an end of
table.IncludeFromNowOn
- if the current and all following rows from now on are to be included into the result
tablepublic abstract boolean matches(DataRow row, int rowIndex) throws EndOfTableException, IncludeFromNowOn
true
if the specified row matches the criteria set in the filter. Can throw a
EndOfTableException
if the filter can tell that no more rows of the table will be able to fulfill the
criteria.row
- the row to testrowIndex
- the row index of the passed row in the original tabletrue
if the row matches the criteria set in the filter, false
if notEndOfTableException
- if there is no chance that any of the rows coming (including the current
rowIndex
) will fulfill the criteria, thus no further row in the original table will be a
match to this filter. (In general this is hard to tell, but a row number filter can certainly use
it.) If the exception is received the row filter table iterator will flag an end of table.IncludeFromNowOn
- if the current and all following rows from now on are to be included into the result
tablepublic abstract void loadSettingsFrom(NodeSettingsRO cfg) throws InvalidSettingsException
loadSettingsFrom
in interface IRowFilter
cfg
- the object holding the settings to loadInvalidSettingsException
- if cfg contains invalid/incorrect/inconsistent settingspublic final void saveSettingsTo(NodeSettingsWO cfg)
saveSettingsTo
in interface IRowFilter
cfg
- the object to add the current internal settings toprotected abstract void saveSettings(NodeSettingsWO cfg)
saveSettingsTo(NodeSettingsWO)
. This is just a helper function
for saveSettingsTo(NodeSettingsWO)
. Row filters implement this
and do the work usually done in saveSettingsTo(NodeSettingsWO)
.
The passed config is prepared in a way that the factory will be able to
recreate this object from it.cfg
- object to add the current internal settings topublic abstract DataTableSpec configure(DataTableSpec inSpec) throws InvalidSettingsException
DataTableSpec
is available. The filters can grab whatever they need from that new
config (e.g. a comparator), should do some error checking (e.g. col number against number of columns) - throw an
InvalidSettingsException
if settings are invalid, and can return a new table spec according to their
settings - if they can. If a filter cannot tell how it would modify the spec, it should return null. (Returned
table specs are not used right now anyway.)configure
in interface IRowFilter
inSpec
- the new spec propagated into the row filter node. Could be null or empty!InvalidSettingsException
- if the settings in the row filter are not compatible with the table spec coming
inpublic Object clone()
clone
in interface IRowFilter
clone
in class Object
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.