# Interface TableLoader

public interface TableLoader
Interface defining an object which can load tables.

Since:
  13 Sept 2010
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final ValueInfo`
`SOURCE_INFO`
Table parameter key which may be used to provide information about the source of a loaded table.

## Method Summary

Modifier and Type
Method
Description
`String`
`getLabel()`
Returns a short textual label describing what is being loaded.
`TableSequence`
`loadTables(StarTableFactory tfact)`
Loads one or more tables.

## Field Details

### SOURCE_INFO

static final ValueInfo SOURCE_INFO
Table parameter key which may be used to provide information about the source of a loaded table. This is a string-type info with the name "LOAD_SOURCE". If present it should be used in preference to the result of `getLabel()` to label the table for users.

## Method Details

### getLabel

String getLabel()
Returns a short textual label describing what is being loaded. This may be presented to a waiting user.

Returns:
  load label

### loadTables

TableSequence loadTables(StarTableFactory tfact) throws IOException
Loads one or more tables. If this loader wishes to label the tables in the returned sequence to describe their source, it may set a table parameter with the `SOURCE_INFO` key, for instance:

       table.setParameter(new DescribedValue(TableLoader.SOURCE_INFO,
                                             "Foo protocol query #1"))

This is optional; for instance if a table name is set that may provide sufficient description.

This method may be time-consuming, and should not be called on the event dispatch thread.

Parameters:
  `tfact` - table factory
Returns:
  loaded tables
Throws:
  `IOException`