Package org.openrefine.operations.cell
Class MassEditOperation
- java.lang.Object
-
- org.openrefine.operations.EngineDependentOperation
-
- org.openrefine.operations.RowMapOperation
-
- org.openrefine.operations.ExpressionBasedOperation
-
- org.openrefine.operations.cell.MassEditOperation
-
- All Implemented Interfaces:
Operation
public class MassEditOperation extends ExpressionBasedOperation
Edits values in a column, by replacing some values by others. The source value can be generated by an expression.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMassEditOperation.Edit-
Nested classes/interfaces inherited from class org.openrefine.operations.ExpressionBasedOperation
ExpressionBasedOperation.NegativeRowMapper, ExpressionBasedOperation.PositiveRowMapper
-
Nested classes/interfaces inherited from class org.openrefine.operations.RowMapOperation
RowMapOperation.GridMap
-
-
Field Summary
Fields Modifier and Type Field Description protected List<MassEditOperation.Edit>_editsprotected Map<String,Serializable>fromTo-
Fields inherited from class org.openrefine.operations.ExpressionBasedOperation
_baseColumnName, _changeDataId, _eval, _expression, _forceEagerEvaluation, _onError, _repeatCount
-
Fields inherited from class org.openrefine.operations.EngineDependentOperation
_engineConfig
-
-
Constructor Summary
Constructors Constructor Description MassEditOperation(EngineConfig engineConfig, String columnName, String expression, List<MassEditOperation.Edit> edits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RowInRecordChangeDataJoinerchangeDataJoiner(Grid grid, ChangeContext context)Returns the joiner used to insert the result of the evaluation of the expression into a row or record.StringgetColumnName()protected DagSlicegetDagSlice()StringgetDescription()A short human-readable description of what this operation does.List<MassEditOperation.Edit>getEdits()StringgetExpression()-
Methods inherited from class org.openrefine.operations.ExpressionBasedOperation
apply, evaluatingChangeDataProducer, getChangeDataProducer, getEvaluable, getGridMap, getNewColumnModel, getNewOverlayModels, postTransform
-
Methods inherited from class org.openrefine.operations.RowMapOperation
getNegativeRowMapper, getNewColumnModel, getNewOverlayModels, getPositiveRowMapper, postTransform
-
Methods inherited from class org.openrefine.operations.EngineDependentOperation
getEngine, getEngineConfig
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openrefine.operations.Operation
getOperationId, isReproducible
-
-
-
-
Field Detail
-
_edits
protected final List<MassEditOperation.Edit> _edits
-
fromTo
protected Map<String,Serializable> fromTo
-
-
Constructor Detail
-
MassEditOperation
public MassEditOperation(EngineConfig engineConfig, String columnName, String expression, List<MassEditOperation.Edit> edits)
-
-
Method Detail
-
getExpression
public String getExpression()
-
getEdits
public List<MassEditOperation.Edit> getEdits()
-
getColumnName
public String getColumnName()
-
getDescription
public String getDescription()
Description copied from interface:OperationA short human-readable description of what this operation does.
-
changeDataJoiner
protected RowInRecordChangeDataJoiner changeDataJoiner(Grid grid, ChangeContext context) throws OperationException
Description copied from class:ExpressionBasedOperationReturns the joiner used to insert the result of the evaluation of the expression into a row or record. Depending on whether the expression is local or not (seeEvaluable.isLocal()), this will either be used to build a row / record mapper to apply the change lazily on the grid, or the results of the evaluation will be stored in aChangeDataobject which will then be joined by this joiner.- Specified by:
changeDataJoinerin classExpressionBasedOperation- Parameters:
grid- the initial state of the grid- Throws:
OperationException
-
getDagSlice
protected DagSlice getDagSlice()
-
-