Package uk.ac.starlink.table.jdbc
Class JDBCTableScheme
- java.lang.Object
-
- uk.ac.starlink.table.jdbc.JDBCTableScheme
-
- All Implemented Interfaces:
Documented,TableScheme
public class JDBCTableScheme extends java.lang.Object implements TableScheme, Documented
TableScheme for intepreting JDBC-type URLs. The full specification ("jdbc:..." - no leading colon) is a JDBC URL as used by the JDBC system.For historical reasons, the JDBCAuthenticator used by this scheme is managed by an associated StarTableFactory, which must be supplied at construction time.
- Since:
- 20 Jul 2020
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description JDBCTableScheme(StarTableFactory tfact)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StarTablecreateTable(java.lang.String spec)Turns a scheme-specific specification into a table.java.lang.StringgetExampleSpecification()Returns a scheme-specific specification string suitable for use in examples.java.lang.StringgetSchemeName()Returns the name of this scheme.java.lang.StringgetSchemeUsage()Returns a short, plain-text usage string.java.lang.StringgetXmlDescription()Returns user-directed documentation in XML format.
-
-
-
Constructor Detail
-
JDBCTableScheme
public JDBCTableScheme(StarTableFactory tfact)
Constructor.- Parameters:
tfact- table factory
-
-
Method Detail
-
getSchemeName
public java.lang.String getSchemeName()
Description copied from interface:TableSchemeReturns 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:
getSchemeNamein interfaceTableScheme- Returns:
- scheme name
-
getSchemeUsage
public java.lang.String getSchemeUsage()
Description copied from interface:TableSchemeReturns a short, plain-text usage string. This should just represent the legal syntax for the specification string.- Specified by:
getSchemeUsagein interfaceTableScheme- Returns:
- usage syntax
-
getExampleSpecification
public java.lang.String getExampleSpecification()
Description copied from interface:TableSchemeReturns 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:
getExampleSpecificationin interfaceTableScheme- Returns:
- scheme-specific specification (scheme name part not included), or null
-
getXmlDescription
public java.lang.String getXmlDescription()
Description copied from interface:DocumentedReturns 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:
getXmlDescriptionin interfaceDocumented- Returns:
- XML description of this object
-
createTable
public StarTable createTable(java.lang.String spec) throws java.io.IOException
Description copied from interface:TableSchemeTurns a scheme-specific specification into a table. In case of any error, an exception should be thrown.- Specified by:
createTablein 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)java.io.IOException- if there is some other error in creating the table
-
-