uk.ac.starlink.table

## Class TestTableScheme

- java.lang.Object
- - uk.ac.starlink.table.TestTableScheme

- All Implemented Interfaces:
    Documented, TableScheme

      public class TestTableScheme
      extends java.lang.Object
      implements TableScheme, Documented

  TableScheme implementation for test data.
  Since:
    26 Apr 2021

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestTableScheme()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StarTable` | `createTable(java.lang.String spec)` 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.
    `java.lang.String` | `getXmlDescription()` Returns user-directed documentation in XML format.
    `static java.lang.String` | `valUnicode(int ix)` Gives a string value including characters from obscure corners of the Unicode map including BMP and non-BMP code points, and characters with 1, 2, 3 and 4-byte UTF-8 representations.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### TestTableScheme

          public TestTableScheme()

  - ### Method Detail

    - #### getSchemeName

          public java.lang.String getSchemeName()

      Description copied from interface: `TableScheme`
      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.
      Specified by:
        `getSchemeName` in interface `TableScheme`
      Returns:
        scheme name

    - #### getSchemeUsage

          public java.lang.String getSchemeUsage()

      Description copied from interface: `TableScheme`
      Returns a short, plain-text usage string. This should just represent the legal syntax for the specification string.
      Specified by:
        `getSchemeUsage` in interface `TableScheme`
      Returns:
        usage syntax

    - #### getExampleSpecification

          public java.lang.String getExampleSpecification()

      Description copied from interface: `TableScheme`
      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.
      Specified by:
        `getExampleSpecification` in interface `TableScheme`
      Returns:
        scheme-specific specification (scheme name part not included), or null

    - #### getXmlDescription

          public java.lang.String getXmlDescription()

      Description copied from interface: `Documented`
      Returns user-directed documentation in XML format.

      The output should be a sequence of one or more <P> elements, using XHTML-like XML. Since rendering may be done in a number of contexts however, use of the full range of XHTML elements is discouraged. Where possible, the content should stick to simple markup such as the elements P, A, UL, OL, LI, DL, DT, DD EM, STRONG, I, B, CODE, TT, PRE.

      Specified by:
        `getXmlDescription` in interface `Documented`
      Returns:
        XML description of this object

    - #### createTable

          public StarTable createTable(java.lang.String spec)
                                throws TableFormatException

      Description copied from interface: `TableScheme`
      Turns a scheme-specific specification into a table. In case of any error, an exception should be thrown.
      Specified by:
        `createTable` in interface `TableScheme`
      Parameters:
        `spec` - 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)

    - #### valUnicode

          public static java.lang.String valUnicode(int ix)

      Gives a string value including characters from obscure corners of the Unicode map including BMP and non-BMP code points, and characters with 1, 2, 3 and 4-byte UTF-8 representations.

      Unicode crib sheet: Most code points apart from emoji are in the Basic Multilingual Plane (BMP). Here is what you need to know.

      BMP code points:
        - have values in the range U+0000..U+FFFF
        - cover almost all modern languages including common CJK (Chinese, Japanese and Korean) characters
        - are stored in a single Java `char`
        - have a UTF-8 representation of 1, 2 or 3 bytes
        - have a UTF-16 representation of 1 code unit
      Non-BMP code points:
        - have values in the range U+10000..U+10FFFF
        - are known as supplementary characters
        - include emoji and less-common CJK characters
        - are stored in a pair of Java `char`s
        - have a UTF-8 representation of 4 bytes
        - have a UTF-16 representation of 2 code units
      Parameters:
        `ix` - row index
      Returns:
        string value