public class UnifiedFitsTableWriter extends FitsTableWriter implements DocumentedIOHandler
BeanConfig
Modifier and Type | Class and Description |
---|---|
static class |
UnifiedFitsTableWriter.Col
Subclass with default configuration but colfits set true.
|
FitsTableWriter.PrimaryType, FitsTableWriter.VarArrayMode
Modifier and Type | Field and Description |
---|---|
static FitsTableWriter.PrimaryType |
BASIC_PRIMARY_TYPE
Primary HDU type containing a minimal primary HDU.
|
static FitsTableWriter.PrimaryType |
NONE_PRIMARY_TYPE
Primary HDU type that does not write a primary HDU.
|
static FitsTableWriter.PrimaryType |
VOTABLE_PRIMARY_TYPE
Primary HDU type containing full metadata for the output table
in VOTable format.
|
Constructor and Description |
---|
UnifiedFitsTableWriter()
No-arg constructor.
|
Modifier and Type | Method and Description |
---|---|
static FitsTableWriter.PrimaryType |
createVOTablePrimaryType(VOTableVersion vers)
Returns a PrimaryType that writes a FITS-plus-style VOTable primary HDU,
with a specified version of the VOTable standard.
|
boolean |
docIncludesExample()
Indicates whether the serialization of some (short) example table
should be added to the user documentation for this handler.
|
java.lang.String[] |
getExtensions()
Returns the list of filename extensions recognised by this handler.
|
java.lang.String |
getXmlDescription()
Returns user-directed documentation in XML format.
|
boolean |
looksLikeFile(java.lang.String location)
Returns true if
location ends with something like ".fit"
or ".fits" or ".fts". |
void |
setColfits(boolean colfits)
Sets whether table data should be written in column-oriented form.
|
void |
setPrimaryType(FitsTableWriter.PrimaryType primaryType)
Sets the type of Primary HDU that will precede the extension HDU(s)
corresponding to the table(s) being written.
|
void |
setVarArray(FitsTableWriter.VarArrayMode varArray)
Configures how variable-length array values will be stored.
|
static FitsTableWriter.PrimaryType |
toPrimaryTypeInstance(java.lang.String txt)
Decodes a string as a PrimaryType.
|
createSerializer, getAllowSignedByte, getPrimaryType, getStoragePolicy, getVarArray, isColfits, setStoragePolicy, writeStarTables
getAllowZeroLengthString, getConfig, getCurrentDate, getFormatName, getMetadataCards, getMimeType, getPadCharacter, getWide, getWriteDate, setAllowSignedByte, setAllowZeroLengthString, setFormatName, setPadCharacter, setWide, setWriteDate, writePrimaryHDU, writeStarTable, writeStarTables, writeTableHDU
writeStarTable, writeStarTable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
matchesExtension, readText, toLink
writeStarTable
public static final FitsTableWriter.PrimaryType VOTABLE_PRIMARY_TYPE
public static final FitsTableWriter.PrimaryType BASIC_PRIMARY_TYPE
public static final FitsTableWriter.PrimaryType NONE_PRIMARY_TYPE
public java.lang.String[] getExtensions()
DocumentedIOHandler
getExtensions
in interface DocumentedIOHandler
public boolean looksLikeFile(java.lang.String location)
FitsTableWriter
location
ends with something like ".fit"
or ".fits" or ".fts".looksLikeFile
in interface StarTableWriter
looksLikeFile
in class FitsTableWriter
location
- filenamepublic boolean docIncludesExample()
DocumentedIOHandler
Documented.getXmlDescription()
method already includes some example output, should return false.docIncludesExample
in interface DocumentedIOHandler
public java.lang.String getXmlDescription()
Documented
The output should be a sequence of one or more <P> elements, using XHTML-like XML. Since rendering may be done in a number of contexts however, use of the full range of XHTML elements is discouraged. Where possible, the content should stick to simple markup such as the elements P, A, UL, OL, LI, DL, DT, DD EM, STRONG, I, B, CODE, TT, PRE.
getXmlDescription
in interface Documented
@ConfigMethod(property="primary", usage="basic|votable[n.n]|none", example="basic", sequence=110, doc="<p>Determines what is written into the Primary HDU.\nThe Primary HDU (PHDU) of a FITS file cannot contain a table;\nthe following options are available.\n<dl>\n<dt><code>basic</code></dt>\n<dd><p>A minimal PHDU is written with no interesting content\n </p></dd><dt><code>votable[n.n]</code></dt>\n<dd><p>The PHDU contains the full table metadata as the text\n of a VOTable document, along with headers to indicate\n that this has been done.\n This corresponds to the \"<strong>fits-plus</strong>\"\n format.\n The \"<code>[n.n]</code>\" part\n is optional, but if included\n (e.g. \"<code>votable1.5</code>\")\n indicates the version of the VOTable format to use.\n </p></dd>\n<dt><code>none</code></dt>\n<dd><p>No PHDU is written.\n The output is therefore not a legal FITS file,\n but it can be appended to an existing FITS file that\n already has a PHDU and perhaps other extension HDUs.\n </p></dd>\n</dl>\n</p>") public void setPrimaryType(FitsTableWriter.PrimaryType primaryType)
FitsTableWriter
setPrimaryType
in class FitsTableWriter
primaryType
- type of primary HDU@ConfigMethod(property="col", sequence=120, doc="<p>If true, writes data in column-oriented format.\nIn this case, the output is a single-row table in which\neach cell is an array value holding the data\nfor an entire column.\nAll the arrays in the row have the same length,\nwhich is the row count of the table being represented.\nThis corresponds to the \"<strong>colfits</strong>\" format.\n</p>") public void setColfits(boolean colfits)
FitsTableWriter
nrow
elements.setColfits
in class FitsTableWriter
colfits
- true for column-oriented, false for row-oriented@ConfigMethod(property="var", sequence=130, example="true", doc="<p>Determines how variable-length array-valued columns\nwill be stored.\n<code>True</code> stores variable-length array values\nafter the main part of the table in the heap,\nwhile <code>false</code> stores all arrays as fixed-length\n(with a length equal to that of the longest array\nin the column) in the body of the table.The options <code>P</code> or <code>Q</code> can be used\nto force 32-bit or 64-bit pointers for indexing into the heap,\nbut it\'s not usually necessary since a suitable choice\nis otherwise made from the data.\n</p>") public void setVarArray(FitsTableWriter.VarArrayMode varArray)
FitsTableWriter
setVarArray
in class FitsTableWriter
varArray
- variable-length array storage modepublic static FitsTableWriter.PrimaryType createVOTablePrimaryType(VOTableVersion vers)
vers
- VOTable versionpublic static FitsTableWriter.PrimaryType toPrimaryTypeInstance(java.lang.String txt)
This public static method is used by BeanConfig.
txt
- string representation of a PrimaryType