public abstract class VOTableFitsTableWriter
extends uk.ac.starlink.fits.AbstractFitsTableWriter
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.
Tables stored using this (non-standard) mechanism have all the rich
metadata associated with VOTables, and benefit from the compactness
of FITS tables, withouth the considerable disadvantage of being split
into two files.Modifier | Constructor and Description |
---|---|
protected |
VOTableFitsTableWriter(java.lang.String formatName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
customisePrimaryHeader(nom.tam.fits.Header hdr)
Hook for adding custom entries to the FITS header which is written
to the primary HDU.
|
boolean |
isMagic(byte[] buffer)
Determines whether a given byte buffer looks like it contains
the start of a primary header written by this writer.
|
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.
|
void |
setVotableVersion(VOTableVersion votVersion)
Sets the version of the VOTable standard to use for encoding metadata
in the primary HDU.
|
void |
writeStarTables(uk.ac.starlink.table.TableSequence tableSeq,
java.io.OutputStream out) |
addMetadata, createSerializer, getCurrentDate, getFormatName, getMimeType, setFormatName, writePrimaryHDU, writeStarTable, writeStarTables, writeTableHDU
protected VOTableFitsTableWriter(java.lang.String formatName)
formatName
- handler format namepublic void writeStarTables(uk.ac.starlink.table.TableSequence tableSeq, java.io.OutputStream out) throws java.io.IOException
writeStarTables
in interface uk.ac.starlink.table.MultiStarTableWriter
writeStarTables
in class uk.ac.starlink.fits.AbstractFitsTableWriter
java.io.IOException
public void setVotableVersion(VOTableVersion votVersion)
votVersion
- VOTable version to useprotected abstract void customisePrimaryHeader(nom.tam.fits.Header hdr) throws nom.tam.fits.HeaderCardException
hdr
- nom.tam.fits.HeaderCardException
public boolean isMagic(byte[] buffer)
isMagic(int,java.lang.String,java.lang.String)
method.buffer
- start of a filebuffer
looks like it contains a
file written by this handlerprotected boolean isMagic(int icard, java.lang.String key, java.lang.String value)
VOTableFitsTableWriter
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
customisePrimaryHeader(nom.tam.fits.Header)
).icard
- 0-based card indexkey
- card namevalue
- card valueCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.