# Class TopcatPreparation

java.lang.Object
uk.ac.starlink.topcat.TopcatPreparation

All Implemented Interfaces:
  `uk.ac.starlink.table.TablePreparation`

public class TopcatPreparation extends Object implements uk.ac.starlink.table.TablePreparation
TablePreparation implementation that can store and retrieve information about the serialization format from which each table was loaded.

Since:
  28 Sep 2017
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final uk.ac.starlink.table.ValueInfo`
`FORMAT_INFO`
Metadata key for storing input handler object.

## Constructor Summary

Constructors
Constructor
Description
`TopcatPreparation()`
Constructs an instance with no prior preparation.
`TopcatPreparation(uk.ac.starlink.table.TablePreparation prePrep)`
Constructs an instance that executes a prior preparation before doing its own work.

## Method Summary

Modifier and Type
Method
Description
`static uk.ac.starlink.table.StarTableFactory`
`createFactory()`
Utility method to create a StarTableFactory using this preparation.
`uk.ac.starlink.table.StarTable`
`prepareLoadedTable(uk.ac.starlink.table.StarTable table, uk.ac.starlink.table.TableBuilder builder)`
`static uk.ac.starlink.table.TableBuilder`
`removeFormatParameter(uk.ac.starlink.table.StarTable table)`
Operates on a table that was loaded using this preparation, and pulls out the table input handler that this preparation put there.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### FORMAT_INFO

public static final uk.ac.starlink.table.ValueInfo FORMAT_INFO
Metadata key for storing input handler object.

## Constructor Details

### TopcatPreparation

public TopcatPreparation(uk.ac.starlink.table.TablePreparation prePrep)
Constructs an instance that executes a prior preparation before doing its own work.

Parameters:
  `prePrep` - preparation to chain; exeucuted before this one

### TopcatPreparation

public TopcatPreparation()
Constructs an instance with no prior preparation.

## Method Details

### prepareLoadedTable

public uk.ac.starlink.table.StarTable prepareLoadedTable(uk.ac.starlink.table.StarTable table, uk.ac.starlink.table.TableBuilder builder)

Specified by:
  `prepareLoadedTable` in interface `uk.ac.starlink.table.TablePreparation`

### removeFormatParameter

public static uk.ac.starlink.table.TableBuilder removeFormatParameter(uk.ac.starlink.table.StarTable table)
Operates on a table that was loaded using this preparation, and pulls out the table input handler that this preparation put there. The handler is returned, and the corresponding table parameter is removed from its list, if possible.

### createFactory

public static uk.ac.starlink.table.StarTableFactory createFactory()
Utility method to create a StarTableFactory using this preparation.

Returns:
  new table factory