Package org.openrefine.operations.column
Class ColumnRenameOperation
- java.lang.Object
-
- org.openrefine.operations.EngineDependentOperation
-
- org.openrefine.operations.RowMapOperation
-
- org.openrefine.operations.column.ColumnRenameOperation
-
- All Implemented Interfaces:
Operation
public class ColumnRenameOperation extends RowMapOperation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openrefine.operations.RowMapOperation
RowMapOperation.GridMap
-
-
Field Summary
Fields Modifier and Type Field Description protected String_newColumnNameprotected String_oldColumnName-
Fields inherited from class org.openrefine.operations.EngineDependentOperation
_engineConfig
-
-
Constructor Summary
Constructors Constructor Description ColumnRenameOperation(String oldColumnName, String newColumnName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()A short human-readable description of what this operation does.EngineConfiggetEngineConfig()ColumnModelgetNewColumnModel(Grid state, ChangeContext context)Returns the column model after the change is applied to the given grid.StringgetNewColumnName()StringgetOldColumnName()protected RowInRecordMappergetPositiveRowMapper(Grid state, ChangeContext context)Returns the row mapper applied to the rows matched by the filter.-
Methods inherited from class org.openrefine.operations.RowMapOperation
apply, getGridMap, getNegativeRowMapper, getNewOverlayModels, postTransform
-
Methods inherited from class org.openrefine.operations.EngineDependentOperation
getEngine
-
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
-
-
-
-
Method Detail
-
getOldColumnName
public String getOldColumnName()
-
getNewColumnName
public String getNewColumnName()
-
getDescription
public String getDescription()
Description copied from interface:OperationA short human-readable description of what this operation does.
-
getNewColumnModel
public ColumnModel getNewColumnModel(Grid state, ChangeContext context) throws OperationException
Description copied from class:RowMapOperationReturns the column model after the change is applied to the given grid. By default, returns the same column model.- Overrides:
getNewColumnModelin classRowMapOperation- Parameters:
state- the grid to which the change should be applied- Returns:
- the column model of the new grid
- Throws:
OperationException
-
getPositiveRowMapper
protected RowInRecordMapper getPositiveRowMapper(Grid state, ChangeContext context) throws OperationException
Description copied from class:RowMapOperationReturns the row mapper applied to the rows matched by the filter.- Overrides:
getPositiveRowMapperin classRowMapOperation- Parameters:
state- the initial state of the grid- Throws:
OperationException
-
getEngineConfig
public EngineConfig getEngineConfig()
- Overrides:
getEngineConfigin classEngineDependentOperation
-
-