public interface TopcatCodec
Note this means that the "serialization" done here is not free-form, all the required metadata and data has to be encoded in a form that can be captured by the StarTable data model (basically, columns and parameters with associated metadata). Additionally, to be useful, it needs to store this information in a way that can be later serialized by at least one of the available STIL I/O handlers. Formats based on the VOTable format are generally capable enough for this, though note that ColumnInfo "auxiliary" metadata items will probably be lost during VOTable serialization, so probably can't be used when implementing this interface.
|Modifier and Type||Method and Description|
Turns a TopcatModel into a StarTable, ready for serialization.
Indicates whether a given table is a candidate for this codec's
uk.ac.starlink.table.StarTable encode(TopcatModel tcModel)
boolean isEncoded(uk.ac.starlink.table.StarTable table)
decodemethod. It should in general return true for a table that has been returned from this object's
encodemethod (possibly following a table write/read cycle) and false for other tables.
table- data+metadata table
TopcatModel decode(uk.ac.starlink.table.StarTable table, String location, ControlWindow controlWindow)
encodemethod, and for which the
isEncodedmethod returns true, and turns it into a TopcatModel. If decoding fails, null is returned.
If used with a ControlWindow that users may be interacting with,
this method should be called from the AWT event dispatch thread.
This method may (for instance during testing) be called with
a null value for the
but the resulting TopcatModel may not be suitable for all kinds
of user interactions.
table- encoded table
location- table location string
controlWindow- control window, or null if necessary
Copyright © 2003-2019 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.