nom.tam.fits
Class AsciiTableHDU

java.lang.Object
  extended by nom.tam.fits.BasicHDU
      extended by nom.tam.fits.TableHDU
          extended by nom.tam.fits.AsciiTableHDU
All Implemented Interfaces:
FitsElement

public class AsciiTableHDU
extends TableHDU

FITS ASCII table header/data unit


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
 
Constructor Summary
AsciiTableHDU(Header h, Data d)
          Create an ascii table header/data unit.
 
Method Summary
 int addColumn(java.lang.Object newCol)
          Add a column
 java.lang.String[] columnKeyStems()
          Return the keyword column stems for an ASCII table.
static Data encapsulate(java.lang.Object o)
          Create a ASCII table data structure from an array of objects representing the columns.
 Data getData()
          Return the FITS data structure associated with this HDU.
 void info()
          Print a little information about the data set.
static boolean isData(java.lang.Object o)
          Check if this data is usable as an ASCII table.
 boolean isHeader()
          Check that this HDU has a valid header.
static boolean isHeader(Header header)
          Check that this is a valid ascii table header.
 boolean isNull(int row, int col)
          See if an element is null
 Data manufactureData()
          Create an empty data structure corresponding to the input header.
static Data manufactureData(Header hdr)
          Create a Data object to correspond to the header description.
static Header manufactureHeader(Data d)
          Create a header to match the input data.
 void readData(ArrayDataInput stream)
          Skip the ASCII table and throw an exception.
 void setNull(int row, int col, boolean flag)
          Mark an entry as null.
 void setNullString(int col, java.lang.String newNull)
          Set the null string for a column
 
Methods inherited from class nom.tam.fits.TableHDU
addRow, deleteColumnsIndexOne, deleteColumnsIndexOne, deleteColumnsIndexZero, deleteColumnsIndexZero, deleteRows, deleteRows, findColumn, getColumn, getColumn, getColumnFormat, getColumnName, getElement, getNCols, getNRows, getRow, setColumn, setColumn, setColumnName, setCurrentColumn, setElement, setRow
 
Methods inherited from class nom.tam.fits.BasicHDU
addValue, addValue, addValue, addValue, getAuthor, getAxes, getBitPix, getBlankValue, getBScale, getBUnit, getBZero, getCreationDate, getDummyHDU, getEpoch, getEquinox, getFileOffset, getGroupCount, getHeader, getInstrument, getKernel, getMaximumValue, getMinimumValue, getObject, getObservationDate, getObserver, getOrigin, getParameterCount, getReference, getSize, getTelescope, getTrimmedString, read, rewrite, rewriteable, skipData, skipData, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsciiTableHDU

public AsciiTableHDU(Header h,
                     Data d)
Create an ascii table header/data unit.

Parameters:
header - the template specifying the ascii table.
data - the FITS data structure containing the table data.
Throws:
FitsException - if there was a problem with the header.
Method Detail

isHeader

public static boolean isHeader(Header header)
Check that this is a valid ascii table header.

Parameters:
header - to validate.
Returns:
true if this is an ascii table header.

isHeader

public boolean isHeader()
Check that this HDU has a valid header.

Returns:
true if this HDU has a valid header.

isData

public static boolean isData(java.lang.Object o)
Check if this data is usable as an ASCII table.


manufactureData

public static Data manufactureData(Header hdr)
                            throws FitsException
Create a Data object to correspond to the header description.

Returns:
An unfilled Data object which can be used to read in the data for this HDU.
Throws:
FitsException - if the Data object could not be created from this HDU's Header

manufactureData

public Data manufactureData()
                     throws FitsException
Create an empty data structure corresponding to the input header.

Returns:
An unfilled Data object which can be used to read in the data for this HDU.
Throws:
FitsException - if the Data object could not be created from this HDU's Header

manufactureHeader

public static Header manufactureHeader(Data d)
                                throws FitsException
Create a header to match the input data.

Throws:
FitsException

encapsulate

public static Data encapsulate(java.lang.Object o)
                        throws FitsException
Create a ASCII table data structure from an array of objects representing the columns.

Throws:
FitsException

readData

public void readData(ArrayDataInput stream)
              throws FitsException
Skip the ASCII table and throw an exception.

Overrides:
readData in class BasicHDU
Parameters:
stream - the stream from which the data is read.
Throws:
FitsException - if the Data object could not be created from this HDU's Header

setNull

public void setNull(int row,
                    int col,
                    boolean flag)
Mark an entry as null.


isNull

public boolean isNull(int row,
                      int col)
See if an element is null


setNullString

public void setNullString(int col,
                          java.lang.String newNull)
Set the null string for a column


addColumn

public int addColumn(java.lang.Object newCol)
              throws FitsException
Add a column

Specified by:
addColumn in class TableHDU
Throws:
FitsException

info

public void info()
Print a little information about the data set.

Specified by:
info in class BasicHDU

getData

public Data getData()
Return the FITS data structure associated with this HDU.

Overrides:
getData in class BasicHDU

columnKeyStems

public java.lang.String[] columnKeyStems()
Return the keyword column stems for an ASCII table.

Specified by:
columnKeyStems in class TableHDU