Package org.openrefine.operations.recon
Class ReconUseValuesAsIdentifiersOperation
- java.lang.Object
-
- org.openrefine.operations.EngineDependentOperation
-
- org.openrefine.operations.RowMapOperation
-
- org.openrefine.operations.recon.ReconUseValuesAsIdentifiersOperation
-
- All Implemented Interfaces:
Operation
public class ReconUseValuesAsIdentifiersOperation extends RowMapOperation
When a column contains bare identifiers or URLs, this can be used to mark them as reconciled to some reconciliation service. This is done without any communication with the service, so identifiers are not checked.- Author:
- Antonin Delpeuch
-
-
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 String
identifierSpace
protected StandardReconConfig
reconConfig
protected String
schemaSpace
protected String
service
-
Fields inherited from class org.openrefine.operations.EngineDependentOperation
_engineConfig
-
-
Constructor Summary
Constructors Constructor Description ReconUseValuesAsIdentifiersOperation(EngineConfig engineConfig, String columnName, String service, String identifierSpace, String schemaSpace)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
A short human-readable description of what this operation does.protected ColumnModel
getNewColumnModel(Grid newState, 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
rowMapper(int columnIndex, long historyEntryId, ReconConfig reconConfig, String identifierSpace)
-
Methods inherited from class org.openrefine.operations.RowMapOperation
apply, getGridMap, getNegativeRowMapper, getNewOverlayModels, 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
-
columnName
protected String columnName
-
identifierSpace
protected String identifierSpace
-
schemaSpace
protected String schemaSpace
-
service
protected String service
-
reconConfig
protected StandardReconConfig reconConfig
-
-
Constructor Detail
-
ReconUseValuesAsIdentifiersOperation
public ReconUseValuesAsIdentifiersOperation(EngineConfig engineConfig, String columnName, String service, String identifierSpace, String schemaSpace)
-
-
Method Detail
-
getDescription
public String getDescription()
Description copied from interface:Operation
A short human-readable description of what this operation does.
-
getPositiveRowMapper
public RowInRecordMapper getPositiveRowMapper(Grid state, ChangeContext context) throws MissingColumnException
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:
MissingColumnException
-
rowMapper
protected static RowInRecordMapper rowMapper(int columnIndex, long historyEntryId, ReconConfig reconConfig, String identifierSpace)
-
getNewColumnModel
protected ColumnModel getNewColumnModel(Grid newState, ChangeContext context) throws MissingColumnException
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:
newState
- the grid to which the change should be applied- Returns:
- the column model of the new grid
- Throws:
MissingColumnException
-
-