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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object[] calculateRow​(java.lang.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 Detail

      • 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(uk.ac.starlink.table.StarTable). Its data must not be read.
        Returns:
        data-less table
      • calculateRow

        java.lang.Object[] calculateRow​(java.lang.Object[] tuple)
                                 throws java.io.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:
        java.io.IOException