Package org.openrefine.operations.column
Class ColumnMoveOperation
- java.lang.Object
-
- org.openrefine.operations.EngineDependentOperation
-
- org.openrefine.operations.RowMapOperation
-
- org.openrefine.operations.column.ColumnMoveOperation
-
- All Implemented Interfaces:
Operation
public class ColumnMoveOperation 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
_columnName
protected int
_index
-
Fields inherited from class org.openrefine.operations.EngineDependentOperation
_engineConfig
-
-
Constructor Summary
Constructors Constructor Description ColumnMoveOperation(String columnName, int index)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getColumnName()
String
getDescription()
A short human-readable description of what this operation does.EngineConfig
getEngineConfig()
int
getIndex()
ColumnModel
getNewColumnModel(Grid grid, ChangeContext context)
Returns the column model after the change is applied to the given grid.RowInRecordMapper
getPositiveRowMapper(Grid state, ChangeContext context)
Returns the row mapper applied to the rows matched by the filter.protected static RowInRecordMapper
mapper(int fromIndex, int toIndex, int keyColumnIndex)
-
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
-
-
-
-
Field Detail
-
_columnName
protected final String _columnName
-
_index
protected final int _index
-
-
Constructor Detail
-
ColumnMoveOperation
public ColumnMoveOperation(String columnName, int index)
-
-
Method Detail
-
getColumnName
public String getColumnName()
-
getIndex
public int getIndex()
-
getDescription
public String getDescription()
Description copied from interface:Operation
A short human-readable description of what this operation does.
-
getNewColumnModel
public ColumnModel getNewColumnModel(Grid grid, ChangeContext context) throws OperationException
Description copied from class:RowMapOperation
Returns the column model after the change is applied to the given grid. By default, returns the same column model.- Overrides:
getNewColumnModel
in classRowMapOperation
- Parameters:
grid
- the grid to which the change should be applied- Returns:
- the column model of the new grid
- Throws:
OperationException
-
getPositiveRowMapper
public RowInRecordMapper getPositiveRowMapper(Grid state, ChangeContext context) throws OperationException
Description copied from class:RowMapOperation
Returns the row mapper applied to the rows matched by the filter.- Overrides:
getPositiveRowMapper
in classRowMapOperation
- Parameters:
state
- the initial state of the grid- Throws:
OperationException
-
mapper
protected static RowInRecordMapper mapper(int fromIndex, int toIndex, int keyColumnIndex)
-
getEngineConfig
public EngineConfig getEngineConfig()
- Overrides:
getEngineConfig
in classEngineDependentOperation
-
-