Interface TapMetaReader
- All Known Implementing Classes:
TableSetTapMetaReader
,TapSchemaTapMetaReader
,VizierTapMetaReader
,Vosi11TapMetaReader
read*
methods in this interface are in general
time-consuming and should not be invoked on the event dispatch thread.
This class deals with reading metadata from some external source, not with caching or managing the results, which should be done as required by clients of this class.
The only mandatory read method here is the top-level
readSchemas()
. This will supply all known schemas,
but each schema may or may not have its tables filled in;
those tables may or may not have their columns and foreign keys
filled in. If the schemas do not have their tables filled in
(schemaMeta.getTables()!=null
), then readTables
methods can be called to read the table metadata for each schema
as required; that table metadata may then be cached in the schema object
for later use. If the tables are filled in to start with, then
readTables
may throw an UnsupportedOperationException.
The same applies to filled in columns/foreign keys for table objects.
- Since:
- 18 Mar 2015
- Author:
- Mark Taylor
-
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.
-
Method Details
-
readSchemas
Acquires metadata about schemas in a TAP service.May be slow.
- Returns:
- schema metadata array
- Throws:
IOException
-
readTables
Acquires metadata about tables in a given schema from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Parameters:
schema
- schema containing tables; not altered by call- Returns:
- table metadata array
- Throws:
IOException
-
readColumns
Acquires metadata about columns in a given table from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Parameters:
table
- table containing columns; not altered by call- Returns:
- column metadata array
- Throws:
IOException
-
readForeignKeys
Acquires metadata about foreign keys in a given table from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Parameters:
table
- table containing columns; not altered by call- Returns:
- foreign key metadata array
- Throws:
IOException
-
getSource
String getSource()Returns a textual indication of where the metadata is coming from, typically a URL.- Returns:
- address of metadata
-
getMeans
String getMeans()Returns a textual indication of the method or protocol this reader uses to acquire TAP metadata.- Returns:
- short description of metadata acquisition method
-