# Class MetaCopyStarTable

java.lang.Object
uk.ac.starlink.table.WrapperStarTable
uk.ac.starlink.table.MetaCopyStarTable

All Implemented Interfaces:
  `Closeable, AutoCloseable, StarTable`

public class MetaCopyStarTable extends WrapperStarTable
Wrapper table which makes deep copies of the table metadata, including column metadata and table parameters. Changes can safely be made to the metadata of this table without affecting the base table. Note that the metadata will not track changes in the column count of the base table.

Since:
  23 Jul 2010
Author:
  Mark Taylor

## Field Summary

### Fields inherited from class WrapperStarTable

`baseTable`

## Constructor Summary

Constructors
Constructor
Description
`MetaCopyStarTable(StarTable base)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`ColumnInfo`
`getColumnInfo(int icol)`
Returns the object describing the data in a given column.
`String`
`getName()`
Returns the name of this table, if it has one.
`DescribedValue`
`getParameterByName(String name)`
Returns a parameter (table-wide metadata item) of this table located by its name.
`List<DescribedValue>`
`getParameters()`
Returns a list of table parameters, that is metadata items which pertain to the entire table.
`URL`
`getURL()`
Initially returns `null` to indicate that this table itself is not persistent.
`void`
`setColumnInfo(int icol, ColumnInfo colInfo)`
`void`
`setName(String name)`
Sets the name of this table.
`void`
`setParameter(DescribedValue dval)`
Adds the given DescribedValue to the list of parameter metadata objects associated with this table.
`void`
`setParameters(List<DescribedValue> paramList)`
`void`
`setURL(URL url)`
Sets the URL of this table.

### Methods inherited from class WrapperStarTable

`checkedLongToInt, close, getBaseTable, getCell, getColumnAuxDataInfos, getColumnCount, getRow, getRowAccess, getRowCount, getRowSequence, getRowSplittable, isRandom, toString`

### Methods inherited from class Object

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

## Constructor Details

### MetaCopyStarTable

public MetaCopyStarTable(StarTable base)
Constructor.

Parameters:
  `base` - base table

## Method Details

### getName

public String getName()
Description copied from interface: `StarTable`
Returns the name of this table, if it has one. The meaning of the name is not defined, but it will typically be a short string of text indicating the identity of this table.

Specified by:
  `getName` in interface `StarTable`
Overrides:
  `getName` in class `WrapperStarTable`
Returns:
  a name for this table, or `null` if no suitable one exists

### setName

public void setName(String name)
Description copied from interface: `StarTable`
Sets the name of this table. If called, the supplied `name` should provide the return value for subsequent calls of `StarTable.getName()`.

Specified by:
  `setName` in interface `StarTable`
Overrides:
  `setName` in class `WrapperStarTable`
Parameters:
  `name` - table name

### getURL

public URL getURL()
Description copied from class: `WrapperStarTable`
Initially returns `null` to indicate that this table itself is not persistent.

Specified by:
  `getURL` in interface `StarTable`
Overrides:
  `getURL` in class `WrapperStarTable`
Returns:
  the URL of this table, or `null` if none is known

### setURL

public void setURL(URL url)
Description copied from interface: `StarTable`
Sets the URL of this table. It ought to be possible in principle to reconstruct this table by reading the resource at `url`. If called, the supplied `url` should provide the return value for subsequent calls of `StarTable.getURL()`.

Specified by:
  `setURL` in interface `StarTable`
Overrides:
  `setURL` in class `WrapperStarTable`
Parameters:
  `url` - table URL

### getParameters

public List<DescribedValue> getParameters()
Description copied from interface: `StarTable`
Returns a list of table parameters, that is metadata items which pertain to the entire table.

Specified by:
  `getParameters` in interface `StarTable`
Overrides:
  `getParameters` in class `WrapperStarTable`
Returns:
  a `List` of `DescribedValue` objects constituting table-wide metadata not covered elsewhere in this interface

### setParameters

public void setParameters(List<DescribedValue> paramList)

### getParameterByName

public DescribedValue getParameterByName(String name)
Description copied from interface: `StarTable`
Returns a parameter (table-wide metadata item) of this table located by its name. If more than one parameter with the given name exists, an arbitrary one will be returned. If no parameter with the given name exists, `null` will be returned.

Specified by:
  `getParameterByName` in interface `StarTable`
Overrides:
  `getParameterByName` in class `WrapperStarTable`
Parameters:
  `name` - the name of the table parameter required

### setParameter

public void setParameter(DescribedValue dval)
Description copied from interface: `StarTable`
Adds the given DescribedValue to the list of parameter metadata objects associated with this table. If an item in the parameter list with the same name as the supplied value already exists, it is removed from the list.

Specified by:
  `setParameter` in interface `StarTable`
Overrides:
  `setParameter` in class `WrapperStarTable`
Parameters:
  `dval` - the new parameter datum to add

### getColumnInfo

public ColumnInfo getColumnInfo(int icol)
Description copied from interface: `StarTable`
Returns the object describing the data in a given column.

Specified by:
  `getColumnInfo` in interface `StarTable`
Overrides:
  `getColumnInfo` in class `WrapperStarTable`
Parameters:
  `icol` - the column for which header information is required
Returns:
  a ValueInfo object for column `icol`

### setColumnInfo

public void setColumnInfo(int icol, ColumnInfo colInfo)