uk.ac.starlink.vo
Class TableSetTapMetaReader

java.lang.Object
  extended by uk.ac.starlink.vo.TableSetTapMetaReader
All Implemented Interfaces:
TapMetaReader

public class TableSetTapMetaReader
extends Object
implements TapMetaReader

TapMetaReader implementation that reads data from a vs:TableSet document. This can be found at the /tables endpoint of a TAP service.

All of the available information is read by readSchemas(), so the other read* methods never need be called, and will throw UnsupportedOperationExceptions.

Since:
18 Mar 2015
Author:
Mark Taylor
See Also:
VODataService

Constructor Summary
TableSetTapMetaReader(String tablesetUrl)
          Constructor.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableSetTapMetaReader

public TableSetTapMetaReader(String tablesetUrl)
Constructor.

Parameters:
tablesetUrl - URL of some document containing VOSITables <schema> elements
Method Detail

readSchemas

public SchemaMeta[] readSchemas()
                         throws IOException
Description copied from interface: TapMetaReader
Acquires metadata about schemas in a TAP service.

May be slow.

Specified by:
readSchemas in interface TapMetaReader
Returns:
schema metadata array
Throws:
IOException

readTables

public TableMeta[] readTables(SchemaMeta schema)
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 interface TapMetaReader
Parameters:
schema - schema containing tables; not altered by call
Returns:
table metadata array
Throws:
UnsupportedOperationException

readColumns

public ColumnMeta[] readColumns(TableMeta table)
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 interface TapMetaReader
Parameters:
table - table containing columns; not altered by call
Returns:
column metadata array
Throws:
UnsupportedOperationException

readForeignKeys

public ForeignMeta[] readForeignKeys(TableMeta table)
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 interface TapMetaReader
Parameters:
table - table containing columns; not altered by call
Returns:
foreign key metadata array
Throws:
UnsupportedOperationException

getSource

public String getSource()
Description copied from interface: TapMetaReader
Returns a textual indication of where the metadata is coming from. Intended for presentation to the user.

Specified by:
getSource in interface TapMetaReader
Returns:
short description of metadata source


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