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 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiServiceColumnCalculator
public MultiServiceColumnCalculator()
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 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 the
spec
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 interface ColumnCalculator<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:
IOException
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.