|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.preproc.filter.row.rowfilter.RowFilter
org.knime.base.node.preproc.filter.row.rowfilter.ColValFilterOldObsolete
MissingValueRowFilter
,
StringCompareRowFilter
, RangeRowFilter
.
@Deprecated public class ColValFilterOldObsolete
A filter selecting rows depending on the content of a column (or cell of the row). The cell content can either be matched against a regular expression or compared to a given range. Matches and rows inside the range can either be included or excluded. RegExpr match can be done case sensitive or insensitive.
Constructor Summary | |
---|---|
ColValFilterOldObsolete()
Deprecated. Default constructor. |
|
ColValFilterOldObsolete(DataValueComparator comp,
DataCell lowerBound,
DataCell upperBound,
String colName,
boolean include)
Deprecated. Creates a new filter that tests the value of the specified cell against the specified range. |
|
ColValFilterOldObsolete(String colName,
boolean include)
Deprecated. Creates a new filter that filters missing values of the specified column. |
|
ColValFilterOldObsolete(String regExpr,
String colName,
boolean include,
boolean caseSensitive,
boolean startsWith)
Deprecated. Creates a new filter which matches the string representation of the specified column against a given regular expression. |
Method Summary | |
---|---|
boolean |
caseSensitiveMatch()
Deprecated. |
DataTableSpec |
configure(DataTableSpec inSpec)
Deprecated. The column value filter grabs the comparator from the table spec (if available) and checks settings against the latest spec. |
String |
getColumnName()
Deprecated. |
boolean |
getFilterMissingValues()
Deprecated. |
DataCell |
getLowerBound()
Deprecated. |
String |
getRegExpr()
Deprecated. |
DataCell |
getUpperBound()
Deprecated. |
boolean |
includeMatchingLines()
Deprecated. |
void |
loadSettingsFrom(NodeSettingsRO cfg)
Deprecated. A comparator MUST be set if a range is specified in the config object!! Load your internal settings from the configuration object. |
boolean |
matches(DataRow row,
int rowIndex)
Deprecated. Return true if the specified row matches the criteria set
in the filter. |
boolean |
mustEntirelyMatch()
Deprecated. |
boolean |
rangeSet()
Deprecated. |
protected void |
saveSettings(NodeSettingsWO cfg)
Deprecated. Do not call this function - rather call RowFilter.saveSettingsTo(NodeSettingsWO) . |
void |
setDataValueComparator(DataValueComparator dcComp)
Deprecated. Sets a new comparator used to check the range if lower and upper bounds are set. |
boolean |
testingStringPattern()
Deprecated. |
String |
toString()
Deprecated. |
Methods inherited from class org.knime.base.node.preproc.filter.row.rowfilter.RowFilter |
---|
clone, saveSettingsTo |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColValFilterOldObsolete(String regExpr, String colName, boolean include, boolean caseSensitive, boolean startsWith)
regExpr
- a valid regular expression; causes an exception to fly if
its not a valid reg exprcolName
- the name of the column to test in the rowinclude
- flag indicating whether to include or exclude rows with a
matching valuecaseSensitive
- if true the match will be done case sensitive, or if
false case insensitivestartsWith
- determines whether the value must match entirely the
regular expression or can only start with it.
IllegalArgumentException
- if the pattern passed as regular
expression is not a valid regExprpublic ColValFilterOldObsolete(DataValueComparator comp, DataCell lowerBound, DataCell upperBound, String colName, boolean include)
comp
- the comparator that will be used to compare the column's cell
with the bounds of the range.lowerBound
- if the comparator doesn't return a negative number when
the cell is compared with this value, the cell is above the
lower bound. If null
no minimum is set.upperBound
- if the comparator doesn't return a positive number when
the cell is compared with this value, the cell is below the
upper bound. If null
, no maximum is set.colName
- the name of the column to test in the rowinclude
- determines whether to include or exclude rows with a value
inside the rangepublic ColValFilterOldObsolete(String colName, boolean include)
colName
- the name of the column to test the values ofinclude
- if true, rows with a missing value in the specified column
are included, otherwise excludedColValFilterOldObsolete()
Method Detail |
---|
public void setDataValueComparator(DataValueComparator dcComp)
dcComp
- the comparator used to compare the column's value with the
upper and lower rangepublic boolean includeMatchingLines()
true
if rows inside the specified range or
matching the specified regular expression will be included,
false
if they are excludedpublic String getColumnName()
public boolean getFilterMissingValues()
public boolean rangeSet()
public DataCell getLowerBound()
null
if no range testing is
happening or if no minimum is setpublic DataCell getUpperBound()
null
if no range testing is
happening or if no maximum is setpublic boolean testingStringPattern()
true
if the string representation of the column's
value is tested against a regular expressionpublic String getRegExpr()
null
if no pattern matching is happeningpublic boolean mustEntirelyMatch()
true
if the value pattern must entirely match the
reg expr, false
if it can also only start with the
expressionpublic boolean caseSensitiveMatch()
true
if the reg expr match is done in a case
sensitive waypublic 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.
matches
in class RowFilter
row
- the row to testrowIndex
- the row index of the passed row in the original table
true
if the row matches the criteria set in the
filter, false
if not
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 tablepublic void loadSettingsFrom(NodeSettingsRO cfg) throws InvalidSettingsException
loadSettingsFrom
in class RowFilter
cfg
- the object holding the settings to load
InvalidSettingsException
- if cfg contains
invalid/incorrect/inconsistent settingsprotected void saveSettings(NodeSettingsWO cfg)
RowFilter.saveSettingsTo(NodeSettingsWO)
. This is just a helper function
for RowFilter.saveSettingsTo(NodeSettingsWO)
. Row filters implement this
and do the work usually done in RowFilter.saveSettingsTo(NodeSettingsWO)
.
The passed config is prepared in a way that the factory will be able to
recreate this object from it.
saveSettings
in class RowFilter
cfg
- object to add the current internal settings topublic 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 class RowFilter
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 String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |