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
Author:
Mark Taylor
  • Method Details

    • getSchemeName

      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

      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(String specification) throws 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)
      IOException - if there is some other error in creating the table
    • getExampleSpecification

      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