public interface IRowFilter extends Cloneable
|Modifier and Type||Method and Description|
Called when a new
Load your internal settings from the configuration object.
Save your internal settings into the specified configuration object.
boolean matches(DataRow row, long rowIndex) throws EndOfTableException, IncludeFromNowOn
trueif the specified row matches the criteria set in the filter. Can throw a
EndOfTableExceptionif the filter can tell that no more rows of the table will be able to fulfill the criteria.
row- the row to test
rowIndex- the row index of the passed row in the original table
trueif the row matches the criteria set in the filter,
EndOfTableException- 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 table
void loadSettingsFrom(NodeSettingsRO cfg) throws InvalidSettingsException
cfg- the object holding the settings to load
InvalidSettingsException- if cfg contains invalid/incorrect/inconsistent settings
void saveSettingsTo(NodeSettingsWO cfg)
cfg- the object to add the current internal settings to
DataTableSpec configure(DataTableSpec inSpec) throws InvalidSettingsException
DataTableSpecis 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
InvalidSettingsExceptionif 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.)
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 in
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.