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_columnNameprotected String_identifierSpaceprotected String_schemaSpaceprotected String_serviceprotected 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)StringgetColumnName()StringgetDescription()A short human-readable description of what this operation does.StringgetIdentifierSpace()protected ColumnModelgetNewColumnModel(Grid state, ChangeContext context)Returns the column model after the change is applied to the given grid.protected ReconConfiggetNewReconConfig(ColumnMetadata column)RowInRecordMappergetPositiveRowMapper(Grid state, ChangeContext context)Returns the row mapper applied to the rows matched by the filter.StringgetSchemaSpace()StringgetService()booleangetShareNewTopics()protected static RowInRecordMapperrowMapperNoSharing(int columnIndex, ReconConfig reconConfig, long historyEntryId)protected static RowInRecordMapperrowMapperWithSharing(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:OperationA short human-readable description of what this operation does.
-
getNewColumnModel
protected 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
-
getNewReconConfig
protected ReconConfig getNewReconConfig(ColumnMetadata column)
-
getPositiveRowMapper
public 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
-
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)
-
-