Package org.openrefine.model
Interface RowFlatMapper
-
- All Superinterfaces:
Serializable
public interface RowFlatMapper extends Serializable
A function applied to a row, returning a list of new rows to replace it. Implementations should be stateless. If a state is required, useRowScanMapper
. If multiple rows or no rows can be returned, useRowFlatMapper
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Row>
call(long rowId, Row row)
static RowFlatMapper
conditionalMapper(RowFilter filter, RowFlatMapper positive, RowFlatMapper negative)
Returns a flat mapper which applies one of the two mappers provided depending on the outcome of the filter.
-
-
-
Method Detail
-
conditionalMapper
static RowFlatMapper conditionalMapper(RowFilter filter, RowFlatMapper positive, RowFlatMapper negative)
Returns a flat mapper which applies one of the two mappers provided depending on the outcome of the filter. If the filter evaluates to true, the positive mapper is evaluated, otherwise the negative one is used.- Parameters:
filter
- the filter to use for the disjunctionpositive
- what to do if the filter evaluates to truenegative
- what to do otherwise- Returns:
- the conditional mapper
-
-