Package uk.ac.starlink.ttools.calc
Class MultiServiceColumnCalculator<S>
- java.lang.Object
-
- uk.ac.starlink.ttools.calc.MultiServiceColumnCalculator<S>
-
- All Implemented Interfaces:
ColumnCalculator<S>
- Direct Known Subclasses:
SchlegelCalculator
public abstract class MultiServiceColumnCalculator<S> extends java.lang.Object implements ColumnCalculator<S>
ColumnCalculator implementation which works by invoking a service for each row. In this case the calculation can be done row by row, but if the service is slow use of the ColumnCalculator interface can allow multiplexing for performance.- Since:
- 14 Oct 2011
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description MultiServiceColumnCalculator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
calculateColumns(S spec, uk.ac.starlink.table.StarTable tupleTable, uk.ac.starlink.table.TableSink sink)
Performs the calculation.abstract ServiceOperation
createServiceOperation(S spec)
Defines the service operation to be invoked for each row.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.ac.starlink.ttools.calc.ColumnCalculator
getTupleInfos
-
-
-
-
Method Detail
-
createServiceOperation
public abstract ServiceOperation createServiceOperation(S spec)
Defines the service operation to be invoked for each row.- Parameters:
spec
- specification object for the calculation
-
calculateColumns
public void calculateColumns(S spec, uk.ac.starlink.table.StarTable tupleTable, uk.ac.starlink.table.TableSink sink) throws java.io.IOException
Description copied from interface:ColumnCalculator
Performs the calculation. Rows are written to the output sink based on the input table and configuration contained in thespec
object. The output table must have the same number of rows as the input table, and will not normally contain any of the same columns.- Specified by:
calculateColumns
in interfaceColumnCalculator<S>
- Parameters:
spec
- specification object providing additional instructions about the calculation to be performedtupleTable
- input table, with one column for each tuple elementsink
- sink to which the output table is written- Throws:
java.io.IOException
-
-