public class FitsPlusTableWriter extends VOTableFitsTableWriter
FitsTableWriter however, the
primary extension is not left contentless, instead it gets the
text of a DATA-less VOTable written into it. This VOTable describes
the metadata of the table, as if the DATA element contained a FITS
element referencing the first extension HDU of the file.
Tables stored in this format have all the rich metadata associated
with VOTables, and benefit from the compactness of FITS tables,
without the considerable disdvantage of being split into two files.
The header cards in the primary HDU look like this:
SIMPLE = T / Standard FITS format
BITPIX = 8 / Character data
NAXIS = 1 / Text string
NAXIS1 = nnnn / Number of characters
VOTMETA = T / Table metadata in VOTABLE format
EXTEND = T / There are standard extensions
the VOTMETA card in particular marking that this HDU contains VOTable
metadata.| Constructor and Description |
|---|
FitsPlusTableWriter()
Default constructor.
|
FitsPlusTableWriter(java.lang.String name,
uk.ac.starlink.fits.WideFits wide)
Custom constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected uk.ac.starlink.fits.FitsTableSerializer |
createSerializer(StarTable table)
Provides a suitable serializer for a given table.
|
protected void |
customisePrimaryHeader(nom.tam.fits.Header hdr)
Hook for adding custom entries to the FITS header which is written
to the primary HDU.
|
static StarTableWriter[] |
getStarTableWriters()
Returns a list of FITS-plus table writers with variant values of
attributes.
|
protected boolean |
isMagic(int icard,
java.lang.String key,
java.lang.String value)
Tests a header card to see if it looks like part of the magic number
for the format written by this handler.
|
boolean |
looksLikeFile(java.lang.String location)
Returns true if location ends with something like ".fit"
or ".fits".
|
isMagic, setVotableVersion, writeStarTablesaddMetadata, getCurrentDate, getFormatName, getMimeType, setFormatName, writePrimaryHDU, writeStarTable, writeStarTables, writeTableHDUwriteStarTableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteStarTablepublic FitsPlusTableWriter()
public FitsPlusTableWriter(java.lang.String name,
uk.ac.starlink.fits.WideFits wide)
name - writer namewide - convention for representing over-wide tables;
null to avoid this conventionpublic boolean looksLikeFile(java.lang.String location)
location - filenameprotected void customisePrimaryHeader(nom.tam.fits.Header hdr)
throws nom.tam.fits.HeaderCardException
VOTableFitsTableWritercustomisePrimaryHeader in class VOTableFitsTableWriterhdr - headernom.tam.fits.HeaderCardExceptionprotected boolean isMagic(int icard,
java.lang.String key,
java.lang.String value)
VOTableFitsTableWriterVOTableFitsTableWriter implementation tests that
the first four cards read:
SIMPLE = T
BITPIX = 8
NAXIS = 1
NAXIS1 = ???
Subclasses may override this to add tests for later cards
(as written in VOTableFitsTableWriter.customisePrimaryHeader(nom.tam.fits.Header)).isMagic in class VOTableFitsTableWritericard - 0-based card indexkey - card namevalue - card valueprotected uk.ac.starlink.fits.FitsTableSerializer createSerializer(StarTable table) throws java.io.IOException
uk.ac.starlink.fits.AbstractFitsTableWritercreateSerializer in class uk.ac.starlink.fits.AbstractFitsTableWritertable - table to serializejava.io.IOException - if the table can't be writtenpublic static StarTableWriter[] getStarTableWriters()