uk.ac.starlink.ttools.filter
Interface ColumnSupplement

All Known Implementing Classes:
CalculatorColumnSupplement, JELColumnSupplement, PermutedColumnSupplement, UnitColumnSupplement

public interface ColumnSupplement

Defines additional column metadata and data for supplementing the existing columns in a StarTable. The data will typically be acquired by reference to a host table, for instance calculating cell values in the additional columns on the basis of values for columns in the host table. The columns are assumed to have the same row count as the host table.

Since:
2 Apr 2012
Author:
Mark Taylor

Method Summary
 SupplementSequence createSequence(RowSequence rseq)
          Returns a new iterator over the values in the columns defined by this object.
 Object getCell(long irow, int icol)
          Random access read of a cell defined by this object.
 int getColumnCount()
          Returns the number of columns defined by this object.
 ColumnInfo getColumnInfo(int icol)
          Returns the column metadata object for a given column.
 Object[] getRow(long irow)
          Random access read of a row defined by this object.
 

Method Detail

getColumnCount

int getColumnCount()
Returns the number of columns defined by this object.

Returns:
number of columns

getColumnInfo

ColumnInfo getColumnInfo(int icol)
Returns the column metadata object for a given column.

Parameters:
icol - column index within this object
Returns:
column metadata for the icol'th column defined by this object

getCell

Object getCell(long irow,
               int icol)
               throws IOException
Random access read of a cell defined by this object.

Parameters:
irow - row index
icol - column index
Returns:
cell content
Throws:
IOException

getRow

Object[] getRow(long irow)
                throws IOException
Random access read of a row defined by this object.

Parameters:
irow - row index
Returns:
array of cell contents for all the cells in this row
Throws:
IOException

createSequence

SupplementSequence createSequence(RowSequence rseq)
                                  throws IOException
Returns a new iterator over the values in the columns defined by this object. The supplied row sequence must be from an appropriate host table; if not, behaviour is undefined.

Parameters:
rseq - row sequence providing data from the host table
Returns:
iterator over row data from supplementary columns
Throws:
IOException


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