Package org.openrefine.model.changes
Class RowInRecordChangeDataProducer<T>
- java.lang.Object
-
- org.openrefine.model.changes.RowInRecordChangeDataProducer<T>
-
- All Implemented Interfaces:
Serializable,RecordChangeDataProducer<List<T>>,RowChangeDataProducer<T>
- Direct Known Subclasses:
ColumnAdditionByFetchingURLsOperation.URLFetchingChangeProducer,ReconOperation.ReconChangeDataProducer
public abstract class RowInRecordChangeDataProducer<T> extends Object implements RecordChangeDataProducer<List<T>>, RowChangeDataProducer<T>
LikeRowChangeDataProducerexcept that the enclosingRecordis also available. This defines aRecordChangeDataProducerwhich maps each row accordingly. When used as aRowChangeDataProducer, the record argument is set to null. This class is useful when performing a row-wise operation in records mode, as the enclosing record must be available in the expression language.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RowInRecordChangeDataProducer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tcall(long rowId, Row row)Compute the change data on a given row.List<T>call(Record record)Compute the change data on a given record.abstract Tcall(Record record, long rowId, Row row)Maps a row, in the context of a record.intgetBatchSize()The size of batches this producer would like to be called on.intgetMaxConcurrency()The maximum number of concurrent calls to this change data producer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openrefine.model.changes.RecordChangeDataProducer
callRecordBatch
-
Methods inherited from interface org.openrefine.model.changes.RowChangeDataProducer
callRowBatch
-
-
-
-
Method Detail
-
call
public abstract T call(Record record, long rowId, Row row)
Maps a row, in the context of a record.- Parameters:
record- the record enclosing the row to maprowId- the global index of the row in the entire gridrow- the row itself
-
call
public T call(long rowId, Row row)
Description copied from interface:RowChangeDataProducerCompute the change data on a given row.- Specified by:
callin interfaceRowChangeDataProducer<T>
-
call
public List<T> call(Record record)
Description copied from interface:RecordChangeDataProducerCompute the change data on a given record.- Specified by:
callin interfaceRecordChangeDataProducer<T>
-
getBatchSize
public int getBatchSize()
The size of batches this producer would like to be called on. Smaller batches can be submitted (for instance at the end of a partition). Defaults to 1.- Specified by:
getBatchSizein interfaceRecordChangeDataProducer<T>- Specified by:
getBatchSizein interfaceRowChangeDataProducer<T>
-
getMaxConcurrency
public int getMaxConcurrency()
Description copied from interface:RecordChangeDataProducerThe maximum number of concurrent calls to this change data producer. If 0, there is no limit to the concurrency.- Specified by:
getMaxConcurrencyin interfaceRecordChangeDataProducer<T>- Specified by:
getMaxConcurrencyin interfaceRowChangeDataProducer<T>
-
-