uk.ac.starlink.table

## Interface TableScheme

- All Known Implementing Classes:
    ClassTableScheme, JDBCTableScheme, LoopTableScheme, TestTableScheme

      public interface TableScheme

  Defines a way to specify a StarTable given a textual specification. This is intended mainly for tables that are not derived from an input stream.
  Since:
    17 Jul 2020

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `StarTable` | `createTable(java.lang.String specification)` Turns a scheme-specific specification into a table.
    `java.lang.String` | `getExampleSpecification()` Returns a scheme-specific specification string suitable for use in examples.
    `java.lang.String` | `getSchemeName()` Returns the name of this scheme.
    `java.lang.String` | `getSchemeUsage()` Returns a short, plain-text usage string.

- - ### Method Detail

    - #### getSchemeName

          java.lang.String getSchemeName()

      Returns the name of this scheme. This string must be alphanumeric and should be short. It will be used between the colons in a table specification.
      Returns:
        scheme name

    - #### getSchemeUsage

          java.lang.String getSchemeUsage()

      Returns a short, plain-text usage string. This should just represent the legal syntax for the specification string.
      Returns:
        usage syntax

    - #### createTable

          StarTable createTable(java.lang.String specification)
                         throws java.io.IOException

      Turns a scheme-specific specification into a table. In case of any error, an exception should be thrown.
      Parameters:
        `specification` - scheme-specific table specification (scheme name part is not included)
      Returns:
        created table, not null
      Throws:
        `TableFormatException` - if the format of the specification is syntactically incorrect (will typically provoke an error containing the schemeUsage string)
        `java.io.IOException` - if there is some other error in creating the table

    - #### getExampleSpecification

          java.lang.String getExampleSpecification()

      Returns a scheme-specific specification string suitable for use in examples. It should return a table short enough to appear in textual documentation. If no suitable example is available, null may be returned.
      Returns:
        scheme-specific specification (scheme name part not included), or null