uk.ac.starlink.vo
Interface TapMetaReader

All Known Implementing Classes:
TableSetTapMetaReader, TapSchemaTapMetaReader

public interface TapMetaReader

Object which can acquire table metadata about a TAP service. The 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
 String getSource()
          Returns a textual indication of where the metadata is coming from.
 ColumnMeta[] readColumns(TableMeta table)
          Acquires metadata about columns in a given table from a TAP service.
 ForeignMeta[] readForeignKeys(TableMeta table)
          Acquires metadata about foreign keys in a given table from a TAP service.
 SchemaMeta[] readSchemas()
          Acquires metadata about schemas in a TAP service.
 TableMeta[] readTables(SchemaMeta schema)
          Acquires metadata about tables in a given schema from a TAP service.
 

Method Detail

readSchemas

SchemaMeta[] readSchemas()
                         throws IOException
Acquires metadata about schemas in a TAP service.

May be slow.

Returns:
schema metadata array
Throws:
IOException

readTables

TableMeta[] readTables(SchemaMeta schema)
                       throws IOException
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

ColumnMeta[] readColumns(TableMeta table)
                         throws IOException
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

ForeignMeta[] readForeignKeys(TableMeta table)
                              throws IOException
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. Intended for presentation to the user.

Returns:
short description of metadata source


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.