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_cellIndexprotected String_columnNameprotected RowEvaluable_evaluableprotected boolean_invertprotected Set<String>_matchesprotected boolean_selectBlankprotected 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 booleanfilterRow(long rowIndex, Row row, Record record)Determines if a row matches the filter.booleaninternalFilterRow(long rowIndex, Row row, Record record)protected booleantestValue(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:RowInRecordFilterDetermines if a row matches the filter.- Specified by:
filterRowin 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)
-
-