Package org.openrefine.operations.cell
Class TextTransformOperation
- java.lang.Object
-
- org.openrefine.operations.EngineDependentOperation
-
- org.openrefine.operations.RowMapOperation
-
- org.openrefine.operations.ExpressionBasedOperation
-
- org.openrefine.operations.cell.TextTransformOperation
-
- All Implemented Interfaces:
Operation
public class TextTransformOperation extends ExpressionBasedOperation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TextTransformOperation.Joiner
-
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 boolean
_repeat
-
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 TextTransformOperation(EngineConfig engineConfig, String columnName, String expression, OnError onError, boolean repeat, int repeatCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RowInRecordChangeDataJoiner
changeDataJoiner(Grid grid, ChangeContext context)
Returns the joiner used to insert the result of the evaluation of the expression into a row or record.String
getColumnName()
String
getDescription()
A short human-readable description of what this operation does.String
getExpression()
OnError
getOnError()
int
getRepeatCount()
static String
onErrorToString(OnError onError)
static OnError
stringToOnError(String s)
-
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
-
-
-
-
Constructor Detail
-
TextTransformOperation
public TextTransformOperation(EngineConfig engineConfig, String columnName, String expression, OnError onError, boolean repeat, int repeatCount)
-
-
Method Detail
-
getColumnName
public String getColumnName()
-
getExpression
public String getExpression()
-
getOnError
public OnError getOnError()
-
getRepeatCount
public int getRepeatCount()
-
getDescription
public String getDescription()
Description copied from interface:Operation
A short human-readable description of what this operation does.
-
changeDataJoiner
protected RowInRecordChangeDataJoiner changeDataJoiner(Grid grid, ChangeContext context) throws OperationException
Description copied from class:ExpressionBasedOperation
Returns 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 aChangeData
object which will then be joined by this joiner.- Specified by:
changeDataJoiner
in classExpressionBasedOperation
- Parameters:
grid
- the initial state of the grid- Throws:
OperationException
-
-