# Interface ServiceOperation

public interface ServiceOperation
Defines an operation which turns an input tuple into an output tuple. Suitable for use with `MultiServiceColumnCalculator`.

Since:
  14 Oct 2011
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`Object[]`
`calculateRow(Object[] tuple)`
Calculates the output tuple for a given input tuple.
`uk.ac.starlink.table.StarTable`
`getResultMetadata()`
Returns the metadata-only table describing the rows which will be returned by this operation.

## Method Details

### getResultMetadata

uk.ac.starlink.table.StarTable getResultMetadata()
Returns the metadata-only table describing the rows which will be returned by this operation. Used for passing to `TableSink.acceptMetadata(StarTable)`. Its data must not be read.

Returns:
  data-less table

### calculateRow

Object[] calculateRow(Object[] tuple) throws IOException
Calculates the output tuple for a given input tuple.

Parameters:
  `tuple` - input tuple
Returns:
  output tuple, corresponding to this object's declared metadata
Throws:
  `IOException`