uk.ac.starlink.ttools.calc
Class MultiServiceColumnCalculator<S>

java.lang.Object
  extended by 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

Constructor Summary
MultiServiceColumnCalculator()
           
 
Method Summary
 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
 

Constructor Detail

MultiServiceColumnCalculator

public MultiServiceColumnCalculator()
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 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 performed
tupleTable - input table, with one column for each tuple element
sink - sink to which the output table is written
Throws:
IOException


Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.