Package uk.ac.starlink.votable
Class ColFitsPlusTableWriter
- java.lang.Object
-
- uk.ac.starlink.table.StreamStarTableWriter
-
- uk.ac.starlink.fits.AbstractFitsTableWriter
-
- uk.ac.starlink.votable.VOTableFitsTableWriter
-
- uk.ac.starlink.votable.ColFitsPlusTableWriter
-
- All Implemented Interfaces:
uk.ac.starlink.table.Documented,uk.ac.starlink.table.formats.DocumentedIOHandler,uk.ac.starlink.table.MultiStarTableWriter,uk.ac.starlink.table.StarTableWriter
public class ColFitsPlusTableWriter extends VOTableFitsTableWriter implements uk.ac.starlink.table.formats.DocumentedIOHandler
Handles writing of aStarTablein a column-oriented FITS binary table format. The table data is stored in a BINTABLE extension which has a single row; each cell in this row contains the data for an entire column of the represented table. The primary HDU is a byte array containing a VOTable representation of the table metadata, as forFitsPlusTableWriter.This rather specialised format may provide good performance for certain operations on very large, especially very wide, tables. Although it is FITS and can therefore be used in principle for data interchange, in practice most non-STIL processors are unlikely to be able to do much useful with it.
- Since:
- 21 Jun 2006
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description ColFitsPlusTableWriter()Default constructor.ColFitsPlusTableWriter(java.lang.String name, uk.ac.starlink.fits.WideFits wide)Deprecated.allows some configuration options but not others; use no-arg constructor and configuration methods instead
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected uk.ac.starlink.fits.FitsTableSerializercreateSerializer(uk.ac.starlink.table.StarTable table)protected voidcustomisePrimaryHeader(nom.tam.fits.Header hdr)Hook for adding custom entries to the FITS header which is written to the primary HDU.booleandocIncludesExample()java.lang.String[]getExtensions()java.lang.StringgetXmlDescription()protected booleanisMagic(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.booleanlooksLikeFile(java.lang.String location)-
Methods inherited from class uk.ac.starlink.votable.VOTableFitsTableWriter
isMagic, setAllowSignedByte, setVotableVersion, writeStarTables
-
Methods inherited from class uk.ac.starlink.fits.AbstractFitsTableWriter
addMetadata, getAllowSignedByte, getAllowZeroLengthString, getConfig, getCurrentDate, getFormatName, getMimeType, getPadCharacter, getWide, getWriteDate, setAllowZeroLengthString, setFormatName, setPadCharacter, setWide, setWriteDate, writePrimaryHDU, writeStarTable, writeStarTables, writeTableHDU
-
Methods inherited from class uk.ac.starlink.table.StreamStarTableWriter
writeStarTable, writeStarTable
-
-
-
-
Constructor Detail
-
ColFitsPlusTableWriter
public ColFitsPlusTableWriter()
Default constructor.
-
ColFitsPlusTableWriter
@Deprecated public ColFitsPlusTableWriter(java.lang.String name, uk.ac.starlink.fits.WideFits wide)Deprecated.allows some configuration options but not others; use no-arg constructor and configuration methods insteadDeprecated custom constructor.
-
-
Method Detail
-
getExtensions
public java.lang.String[] getExtensions()
- Specified by:
getExtensionsin interfaceuk.ac.starlink.table.formats.DocumentedIOHandler
-
looksLikeFile
public boolean looksLikeFile(java.lang.String location)
- Specified by:
looksLikeFilein interfaceuk.ac.starlink.table.StarTableWriter
-
docIncludesExample
public boolean docIncludesExample()
- Specified by:
docIncludesExamplein interfaceuk.ac.starlink.table.formats.DocumentedIOHandler
-
getXmlDescription
public java.lang.String getXmlDescription()
- Specified by:
getXmlDescriptionin interfaceuk.ac.starlink.table.Documented
-
customisePrimaryHeader
protected void customisePrimaryHeader(nom.tam.fits.Header hdr) throws nom.tam.fits.HeaderCardExceptionDescription copied from class:VOTableFitsTableWriterHook for adding custom entries to the FITS header which is written to the primary HDU. This is called just after the required cards (SIMPLE, BITPIX, NAXIS, NAXIS1 ) are added and just before the EXTEND card.- Specified by:
customisePrimaryHeaderin classVOTableFitsTableWriter- Parameters:
hdr- header- Throws:
nom.tam.fits.HeaderCardException
-
isMagic
protected boolean isMagic(int icard, java.lang.String key, java.lang.String value)Description copied from class:VOTableFitsTableWriterTests a header card to see if it looks like part of the magic number for the format written by this handler. TheVOTableFitsTableWriterimplementation 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 inVOTableFitsTableWriter.customisePrimaryHeader(nom.tam.fits.Header)).- Overrides:
isMagicin classVOTableFitsTableWriter- Parameters:
icard- 0-based card indexkey- card namevalue- card value- Returns:
- true iff the presented card is one that could have been written by this writer
-
createSerializer
protected uk.ac.starlink.fits.FitsTableSerializer createSerializer(uk.ac.starlink.table.StarTable table) throws java.io.IOException- Specified by:
createSerializerin classuk.ac.starlink.fits.AbstractFitsTableWriter- Throws:
java.io.IOException
-
-