Package uk.ac.starlink.vo
Class TapSchemaTapMetaReader
java.lang.Object
uk.ac.starlink.vo.TapSchemaTapMetaReader
- All Implemented Interfaces:
TapMetaReader
TapMetaReader implementation that uses TAP queries on the TAP_SCHEMA
schema to acquire table metadata.
- Since:
- 18 Mar 2015
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionTapSchemaTapMetaReader
(TapService service, int maxrec, uk.ac.starlink.util.ContentCoding coding, boolean populateSchemas, boolean populateTables, MetaNameFixer fixer, boolean preloadFkeys) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetMeans()
Returns a textual indication of the method or protocol this reader uses to acquire TAP metadata.Returns a textual indication of where the metadata is coming from, typically a URL.readColumns
(TableMeta table) Acquires metadata about columns in a given table from a TAP service.readForeignKeys
(TableMeta table) Acquires metadata about foreign keys in a given table from a TAP service.Acquires metadata about schemas in a TAP service.readTables
(SchemaMeta schema) Acquires metadata about tables in a given schema from a TAP service.
-
Constructor Details
-
TapSchemaTapMetaReader
public TapSchemaTapMetaReader(TapService service, int maxrec, uk.ac.starlink.util.ContentCoding coding, boolean populateSchemas, boolean populateTables, MetaNameFixer fixer, boolean preloadFkeys) Constructor.- Parameters:
service
- TAP service descriptionmaxrec
- maximum number of records to be requested at oncecoding
- configures HTTP compressionpopulateSchemas
- whether SchemaMeta objects will be filled in with table lists when they are acquiredpopulateTables
- whether TableMeta objects will be filled in with column and foreign key lists when they are acquiredfixer
- object that fixes up syntactically incorrect table/column names; if null no fixing is done; has no effect for compliant TAP_SCHEMA servicespreloadFkeys
- if true, all foreign key info is loaded in one go, if false it's read per-table as required
-
-
Method Details
-
getSource
Description copied from interface:TapMetaReader
Returns a textual indication of where the metadata is coming from, typically a URL.- Specified by:
getSource
in interfaceTapMetaReader
- Returns:
- address of metadata
-
getMeans
Description copied from interface:TapMetaReader
Returns a textual indication of the method or protocol this reader uses to acquire TAP metadata.- Specified by:
getMeans
in interfaceTapMetaReader
- Returns:
- short description of metadata acquisition method
-
readSchemas
Description copied from interface:TapMetaReader
Acquires metadata about schemas in a TAP service.May be slow.
- Specified by:
readSchemas
in interfaceTapMetaReader
- Returns:
- schema metadata array
- Throws:
IOException
-
readTables
Description copied from interface:TapMetaReader
Acquires metadata about tables in a given schema from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Specified by:
readTables
in interfaceTapMetaReader
- Parameters:
schema
- schema containing tables; not altered by call- Returns:
- table metadata array
- Throws:
IOException
-
readColumns
Description copied from interface:TapMetaReader
Acquires metadata about columns in a given table from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Specified by:
readColumns
in interfaceTapMetaReader
- Parameters:
table
- table containing columns; not altered by call- Returns:
- column metadata array
- Throws:
IOException
-
readForeignKeys
Description copied from interface:TapMetaReader
Acquires metadata about foreign keys in a given table from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Specified by:
readForeignKeys
in interfaceTapMetaReader
- Parameters:
table
- table containing columns; not altered by call- Returns:
- foreign key metadata array
- Throws:
IOException
-