|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnom.tam.fits.BasicHDU
nom.tam.fits.TableHDU
public abstract class TableHDU
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)
Add a column to the table. |
int |
addRow(java.lang.Object[] newRow)
Add a row to the end of the table. |
abstract java.lang.String[] |
columnKeyStems()
Get the stems of the keywords that are associated with table columns. |
void |
deleteColumnsIndexOne(int column,
int len)
Delete a set of columns from a table. |
void |
deleteColumnsIndexOne(int column,
int len,
java.lang.String[] fields)
Delete a set of columns from a table. |
void |
deleteColumnsIndexZero(int column,
int len)
Delete a set of columns from a table. |
void |
deleteColumnsIndexZero(int column,
int len,
java.lang.String[] fields)
Delete a set of columns from a table. |
void |
deleteRows(int row)
Remove all rows from the table starting at some specific index from the table. |
void |
deleteRows(int firstRow,
int nRow)
Remove a number of adjacent rows from the table. |
int |
findColumn(java.lang.String colName)
Find the 0-based column index corresponding to a particular column name. |
java.lang.Object |
getColumn(int col)
Get a specific column from the table using 0-based column indexing. |
java.lang.Object |
getColumn(java.lang.String colName)
Get a specific column of the table where the column name is specified using the TTYPEn keywords in the header. |
java.lang.String |
getColumnFormat(int index)
Get the FITS type of a column in the table. |
java.lang.String |
getColumnMeta(int index,
java.lang.String type)
Convenience method for getting column data. |
java.lang.String |
getColumnName(int index)
Get the name of a column in the table. |
java.lang.Object[] |
getColumns()
Get all of the columns of the table. |
java.lang.Object |
getElement(int row,
int col)
Get a specific element of the table using 0-based indices. |
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)
Get a specific row of the table |
void |
setColumn(int col,
java.lang.Object newCol)
Update a column within a table. |
void |
setColumn(java.lang.String colName,
java.lang.Object newCol)
Update a column within a table. |
void |
setColumnMeta(int index,
java.lang.String key,
boolean value,
java.lang.String comment,
boolean after)
|
void |
setColumnMeta(int index,
java.lang.String key,
double value,
java.lang.String comment,
boolean after)
|
void |
setColumnMeta(int index,
java.lang.String key,
long value,
java.lang.String comment,
boolean after)
|
void |
setColumnMeta(int index,
java.lang.String key,
java.lang.String value,
java.lang.String comment)
|
void |
setColumnMeta(int index,
java.lang.String key,
java.lang.String value,
java.lang.String comment,
boolean after)
Specify column metadata for a given column in a way that allows all of the column metadata for a given column to be organized together. |
void |
setColumnName(int index,
java.lang.String name,
java.lang.String comment)
|
void |
setCurrentColumn(int col)
Set the cursor in the header to point after the metadata for the specified column |
void |
setCurrentColumn(int col,
boolean after)
Set the cursor in the header to point either before the TFORM value or after the column metadat |
void |
setElement(int row,
int col,
java.lang.Object element)
Update a single element within the table. |
void |
setRow(int row,
java.lang.Object[] newRow)
Update a row within a table. |
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, reset, 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 |
---|
public java.lang.Object[] getRow(int row) throws FitsException
FitsException
public java.lang.Object getColumn(java.lang.String colName) throws FitsException
colName
- The name of the column to be extracted.
FitsException
public java.lang.Object getColumn(int col) throws FitsException
FitsException
public java.lang.Object[] getColumns() throws FitsException
FitsException
public java.lang.Object getElement(int row, int col) throws FitsException
FitsException
public void setRow(int row, java.lang.Object[] newRow) throws FitsException
FitsException
public void setColumn(java.lang.String colName, java.lang.Object newCol) throws FitsException
FitsException
public void setColumn(int col, java.lang.Object newCol) throws FitsException
FitsException
public void setElement(int row, int col, java.lang.Object element) throws FitsException
FitsException
public int addRow(java.lang.Object[] newRow) throws FitsException
FitsException
public int findColumn(java.lang.String colName)
public abstract int addColumn(java.lang.Object data) throws FitsException
FitsException
public int getNCols()
public int getNRows()
public java.lang.String getColumnName(int index)
index
- The 0-based column index.
FitsException
- if an invalid index was requested.public void setColumnName(int index, java.lang.String name, java.lang.String comment) throws FitsException
FitsException
public void setColumnMeta(int index, java.lang.String key, java.lang.String value, java.lang.String comment, boolean after) throws FitsException
index
- The 0-based index of the columnkey
- The column key. I.e., the keyword will be key+(index+1)value
- The value to be placed in the header.comment
- The comment for the headerafter
- Should the header card be after the current column metadata block
(true), or immediately before the TFORM card (false).
FitsException
public java.lang.String getColumnMeta(int index, java.lang.String type)
public void setColumnMeta(int index, java.lang.String key, java.lang.String value, java.lang.String comment) throws FitsException
FitsException
public void setColumnMeta(int index, java.lang.String key, long value, java.lang.String comment, boolean after) throws FitsException
FitsException
public void setColumnMeta(int index, java.lang.String key, double value, java.lang.String comment, boolean after) throws FitsException
FitsException
public void setColumnMeta(int index, java.lang.String key, boolean value, java.lang.String comment, boolean after) throws FitsException
FitsException
public java.lang.String getColumnFormat(int index) throws FitsException
index
- The 0-based index of the column.
FitsException
- if an invalid index was requested.public void setCurrentColumn(int col)
col
- The 0-based index of the columnpublic void setCurrentColumn(int col, boolean after)
col
- The 0-based index of the columnafter
- True if the cursor should be placed after the existing column
metadata or false if the cursor is to be placed before the TFORM value.
If no corresponding TFORM is found, the cursoe will be placed at the end of
current header.public void deleteRows(int row) throws FitsException
row
- the (0-based) index of the first row to be deleted.
FitsExcpetion
- if an error occurs.
FitsException
public void deleteRows(int firstRow, int nRow) throws FitsException
firstRow
- the (0-based) index of the first row to be deleted.
This is zero-based indexing: 0<=firstrow< number of rows.nRow
- the total number of rows to be deleted.
FitsException
- If an error occurs in the deletion.public void deleteColumnsIndexOne(int column, int len) throws FitsException
FitsException
public void deleteColumnsIndexZero(int column, int len) throws FitsException
FitsException
public void deleteColumnsIndexOne(int column, int len, java.lang.String[] fields) throws FitsException
column
- The one-indexed start column.len
- The number of columns to delete.fields
- Stems for the header fields to be removed
for the table.
FitsException
public void deleteColumnsIndexZero(int column, int len, java.lang.String[] fields) throws FitsException
column
- The zero-indexed start column.len
- The number of columns to delete.fields
- Stems for the header fields to be removed
for the table.
FitsException
public abstract java.lang.String[] columnKeyStems()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |