nom.tam.fits
Class TableHDU

java.lang.Object
  extended by nom.tam.fits.BasicHDU
      extended by nom.tam.fits.TableHDU
All Implemented Interfaces:
FitsElement
Direct Known Subclasses:
AsciiTableHDU, BinaryTableHDU

public abstract class TableHDU
extends BasicHDU

This class allows FITS binary and ASCII tables to be accessed via a common interface. Bug Fix: 3/28/01 to findColumn.


Field Summary
 
Fields inherited from class nom.tam.fits.BasicHDU
BITPIX_BYTE, BITPIX_DOUBLE, BITPIX_FLOAT, BITPIX_INT, BITPIX_LONG, BITPIX_SHORT, isPrimary, myData, myHeader
 
Method Summary
abstract  int addColumn(java.lang.Object data)
           
 int addRow(java.lang.Object[] newRow)
           
 int findColumn(java.lang.String colName)
           
 java.lang.Object getColumn(int col)
           
 java.lang.Object getColumn(java.lang.String colName)
           
 java.lang.String getColumnFormat(int index)
          Get the FITS type of a column in the table.
 java.lang.String getColumnName(int index)
          Get the name of a column in the table.
 java.lang.Object getElement(int row, int col)
           
 int getNCols()
          Get the number of columns for this table
 int getNRows()
          Get the number of rows for this table
 java.lang.Object[] getRow(int row)
           
 void setColumn(int col, java.lang.Object newCol)
           
 void setColumn(java.lang.String colName, java.lang.Object newCol)
           
 void setColumnName(int index, java.lang.String name, java.lang.String comment)
           
 void setCurrentColumn(int col)
           
 void setElement(int row, int col, java.lang.Object element)
           
 void setRow(int row, java.lang.Object[] newRow)
           
 
Methods inherited from class nom.tam.fits.BasicHDU
addValue, addValue, addValue, addValue, getAuthor, getAxes, getBitPix, getBlankValue, getBScale, getBUnit, getBZero, getCreationDate, getData, getDummyHDU, getEpoch, getEquinox, getFileOffset, getGroupCount, getHeader, getInstrument, getKernel, getMaximumValue, getMinimumValue, getObject, getObservationDate, getObserver, getOrigin, getParameterCount, getReference, getSize, getTelescope, getTrimmedString, info, isHeader, read, readData, rewrite, rewriteable, skipData, skipData, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRow

public java.lang.Object[] getRow(int row)
                          throws FitsException
Throws:
FitsException

getColumn

public java.lang.Object getColumn(java.lang.String colName)
                           throws FitsException
Throws:
FitsException

getColumn

public java.lang.Object getColumn(int col)
                           throws FitsException
Throws:
FitsException

getElement

public java.lang.Object getElement(int row,
                                   int col)
                            throws FitsException
Throws:
FitsException

setRow

public void setRow(int row,
                   java.lang.Object[] newRow)
            throws FitsException
Throws:
FitsException

setColumn

public void setColumn(java.lang.String colName,
                      java.lang.Object newCol)
               throws FitsException
Throws:
FitsException

setColumn

public void setColumn(int col,
                      java.lang.Object newCol)
               throws FitsException
Throws:
FitsException

setElement

public void setElement(int row,
                       int col,
                       java.lang.Object element)
                throws FitsException
Throws:
FitsException

addRow

public int addRow(java.lang.Object[] newRow)
           throws FitsException
Throws:
FitsException

findColumn

public int findColumn(java.lang.String colName)

addColumn

public abstract int addColumn(java.lang.Object data)
                       throws FitsException
Throws:
FitsException

getNCols

public int getNCols()
Get the number of columns for this table

Returns:
The number of columns in the table.

getNRows

public int getNRows()
Get the number of rows for this table

Returns:
The number of rows in the table.

getColumnName

public java.lang.String getColumnName(int index)
Get the name of a column in the table.

Parameters:
index - The 0-based column index.
Returns:
The column name.
Throws:
FitsException - if an invalid index was requested.

setColumnName

public void setColumnName(int index,
                          java.lang.String name,
                          java.lang.String comment)
                   throws FitsException
Throws:
FitsException

getColumnFormat

public java.lang.String getColumnFormat(int index)
                                 throws FitsException
Get the FITS type of a column in the table.

Returns:
The FITS type.
Throws:
FitsException - if an invalid index was requested.

setCurrentColumn

public void setCurrentColumn(int col)