Package org.openrefine.operations.recon
Class ReconMarkNewTopicsOperation
- java.lang.Object
-
- org.openrefine.operations.EngineDependentOperation
-
- org.openrefine.operations.RowMapOperation
-
- org.openrefine.operations.recon.ReconMarkNewTopicsOperation
-
- All Implemented Interfaces:
Operation
public class ReconMarkNewTopicsOperation extends RowMapOperation
Marks all filtered cells in a given column as reconciled to "new". Similar values can either be matched to the same reconciliation id, or distinct ones.
-
-
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 String
_schemaSpace
protected String
_service
protected boolean
_shareNewTopics
-
Fields inherited from class org.openrefine.operations.EngineDependentOperation
_engineConfig
-
-
Constructor Summary
Constructors Constructor Description ReconMarkNewTopicsOperation(EngineConfig engineConfig, String columnName, boolean shareNewTopics, String service, String identifierSpace, String schemaSpace)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static RowAggregator<com.google.common.collect.ImmutableMap<String,Long>>
aggregator(int columnIndex, RowFilter filter)
String
getColumnName()
String
getDescription()
A short human-readable description of what this operation does.String
getIdentifierSpace()
protected ColumnModel
getNewColumnModel(Grid state, ChangeContext context)
Returns the column model after the change is applied to the given grid.protected ReconConfig
getNewReconConfig(ColumnMetadata column)
RowInRecordMapper
getPositiveRowMapper(Grid state, ChangeContext context)
Returns the row mapper applied to the rows matched by the filter.String
getSchemaSpace()
String
getService()
boolean
getShareNewTopics()
protected static RowInRecordMapper
rowMapperNoSharing(int columnIndex, ReconConfig reconConfig, long historyEntryId)
protected static RowInRecordMapper
rowMapperWithSharing(int columnIndex, ReconConfig reconConfig, long historyEntryId, com.google.common.collect.ImmutableMap<String,Long> valueToId)
-
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
-
-
-
-
Constructor Detail
-
ReconMarkNewTopicsOperation
public ReconMarkNewTopicsOperation(EngineConfig engineConfig, String columnName, boolean shareNewTopics, String service, String identifierSpace, String schemaSpace)
-
-
Method Detail
-
getColumnName
public String getColumnName()
-
getShareNewTopics
public boolean getShareNewTopics()
-
getService
public String getService()
-
getIdentifierSpace
public String getIdentifierSpace()
-
getSchemaSpace
public String getSchemaSpace()
-
getDescription
public String getDescription()
Description copied from interface:Operation
A short human-readable description of what this operation does.
-
getNewColumnModel
protected ColumnModel getNewColumnModel(Grid state, 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:
state
- the grid to which the change should be applied- Returns:
- the column model of the new grid
- Throws:
OperationException
-
getNewReconConfig
protected ReconConfig getNewReconConfig(ColumnMetadata column)
-
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
-
rowMapperWithSharing
protected static RowInRecordMapper rowMapperWithSharing(int columnIndex, ReconConfig reconConfig, long historyEntryId, com.google.common.collect.ImmutableMap<String,Long> valueToId)
-
rowMapperNoSharing
protected static RowInRecordMapper rowMapperNoSharing(int columnIndex, ReconConfig reconConfig, long historyEntryId)
-
aggregator
protected static RowAggregator<com.google.common.collect.ImmutableMap<String,Long>> aggregator(int columnIndex, RowFilter filter)
-
-