org.eso.fits
Class FitsTable

java.lang.Object
  extended by org.eso.fits.FitsData
      extended by org.eso.fits.FitsTable

public class FitsTable
extends FitsData

FitsTable class represents a FITS table extension in either ASCII or BINARY table format. It is a collection of FitsColumn object giving acess to the table data.


Field Summary
 
Fields inherited from class org.eso.fits.FitsData
bitpix, changeData, dataArray, dataFile, dataOffset, isRAFile, naxis, noGroup, noParm, size, type
 
Constructor Summary
FitsTable(FitsHeader header, java.io.DataInput file, boolean sflag)
          Constructor for FitsTable class given a FITS table extension header with associated data unit as a file.
 
Method Summary
 void addColumn(FitsColumn column)
          Add column to table.
 FitsColumn getColumn(int index)
          Get column with a given index in the table.
 FitsColumn getColumn(java.lang.String label)
          Get column with a given label.
 FitsHeader getHeader()
          Create and return a minimum FITS header for data Matrix.
 int getNoColumns()
          Retrieve number of columns in current table.
 int getNoRows()
          Get total number of rows defined for the table (see NAXIS2).
 void insertColumnAt(FitsColumn column, int index)
          Insert column in table at specified position.
 void removeColumnAt(int index)
          Remove column from table.
 
Methods inherited from class org.eso.fits.FitsData
closeFile, getNaxis, getNoAxes, getType, writeFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitsTable

public FitsTable(FitsHeader header,
                 java.io.DataInput file,
                 boolean sflag)
          throws FitsException
Constructor for FitsTable class given a FITS table extension header with associated data unit as a file.

Parameters:
header - FitsHeader object with the table extension header
file - RandomAccess file positioned at the start of the associated data unit
sflag - Flag for storing data matrix internally
Throws:
FitsException
Method Detail

getHeader

public FitsHeader getHeader()
Create and return a minimum FITS header for data Matrix.

Overrides:
getHeader in class FitsData

addColumn

public void addColumn(FitsColumn column)
Add column to table.

Parameters:
column - FitsColumn to be appended to the table

insertColumnAt

public void insertColumnAt(FitsColumn column,
                           int index)
Insert column in table at specified position.

Parameters:
column - FitsColumn to be inserted into the table
index - position where to insert column

removeColumnAt

public void removeColumnAt(int index)
Remove column from table.

Parameters:
index - position of column to be removed

getColumn

public FitsColumn getColumn(int index)
Get column with a given index in the table.

Parameters:
index - position of column in table

getColumn

public FitsColumn getColumn(java.lang.String label)
Get column with a given label. The first column found with the label is returned. If none is found a NULL is returned.

Parameters:
label - string with column label

getNoColumns

public int getNoColumns()
Retrieve number of columns in current table.


getNoRows

public int getNoRows()
Get total number of rows defined for the table (see NAXIS2).