public class TopcatCodec2 extends Object implements TopcatCodec
TopcatCodec1, and unlike that, this one stores the algebraic expressions etc for algebraically-defined columns and subsets, as well as the definition of some other RowSubset variants like ones based on other subsets or columns. It can thus preserve state better and also requires less storage.
|Constructor and Description|
|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
public uk.ac.starlink.table.StarTable encode(TopcatModel tcModel)
public 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.
public 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.
Copyright © 2003-2020 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.