Package org.openrefine.browsing.filters
Class ExpressionEqualRowFilter
- java.lang.Object
-
- org.openrefine.model.RowInRecordFilter
-
- org.openrefine.browsing.filters.ExpressionEqualRowFilter
-
- All Implemented Interfaces:
Serializable
,RecordFilter
,RowFilter
public class ExpressionEqualRowFilter extends RowInRecordFilter
Judge if a row matches by evaluating a given expression on the row, based on a particular column, and checking the result. It's a match if the result is any one of a given list of values, or if the result is blank or error and we want blank or error values.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
_cellIndex
protected String
_columnName
protected RowEvaluable
_evaluable
protected boolean
_invert
protected Set<String>
_matches
protected boolean
_selectBlank
protected boolean
_selectError
-
Fields inherited from class org.openrefine.model.RowInRecordFilter
ANY_ROW_IN_RECORD
-
Fields inherited from interface org.openrefine.model.RecordFilter
ANY_RECORD
-
-
Constructor Summary
Constructors Constructor Description ExpressionEqualRowFilter(RowEvaluable evaluable, String columnName, int cellIndex, Set<String> matches, boolean selectBlank, boolean selectError, boolean invert)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
filterRow(long rowIndex, Row row, Record record)
Determines if a row matches the filter.boolean
internalFilterRow(long rowIndex, Row row, Record record)
protected boolean
testValue(Object v)
-
Methods inherited from class org.openrefine.model.RowInRecordFilter
filterRecord, filterRow, fromRowFilter
-
-
-
-
Field Detail
-
_evaluable
protected final RowEvaluable _evaluable
-
_columnName
protected final String _columnName
-
_cellIndex
protected final int _cellIndex
-
_selectBlank
protected final boolean _selectBlank
-
_selectError
protected final boolean _selectError
-
_invert
protected final boolean _invert
-
-
Constructor Detail
-
ExpressionEqualRowFilter
public ExpressionEqualRowFilter(RowEvaluable evaluable, String columnName, int cellIndex, Set<String> matches, boolean selectBlank, boolean selectError, boolean invert)
-
-
Method Detail
-
filterRow
public boolean filterRow(long rowIndex, Row row, Record record)
Description copied from class:RowInRecordFilter
Determines if a row matches the filter.- Specified by:
filterRow
in classRowInRecordFilter
- Parameters:
rowIndex
- the global index of the row (from the entire grid)row
- the row itselfrecord
- the enclosing record- Returns:
- true if the row matches the filter
-
testValue
protected boolean testValue(Object v)
-
-