Package uk.ac.starlink.table
Class ClassTableScheme
java.lang.Object
uk.ac.starlink.table.ClassTableScheme
- All Implemented Interfaces:
Documented
,TableScheme
TableScheme implementation that allows to use any TableScheme
implementation on the classpath.
Usage is for example:
class:uk.ac.starlink.table.LoopTableScheme:10
- Since:
- 22 Jul 2020
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTable
(String spec) Turns a scheme-specific specification into a table.Returns a scheme-specific specification string suitable for use in examples.Returns "class";Returns a short, plain-text usage string.Returns user-directed documentation in XML format.
-
Constructor Details
-
ClassTableScheme
public ClassTableScheme()
-
-
Method Details
-
getSchemeName
Returns "class";- Specified by:
getSchemeName
in interfaceTableScheme
- Returns:
- scheme name
-
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 interfaceTableScheme
- Returns:
- usage syntax
-
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 interfaceTableScheme
- Returns:
- scheme-specific specification (scheme name part not included), or null
-
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 interfaceDocumented
- Returns:
- XML description of this object
-
createTable
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 interfaceTableScheme
- 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)IOException
- if there is some other error in creating the table
-