Package uk.ac.starlink.vo
Class TableSetTapMetaReader
- java.lang.Object
-
- uk.ac.starlink.vo.TableSetTapMetaReader
-
- All Implemented Interfaces:
TapMetaReader
public class TableSetTapMetaReader extends java.lang.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 otherread*methods never need be called, and will throw UnsupportedOperationExceptions.- Since:
- 18 Mar 2015
- Author:
- Mark Taylor
- See Also:
- VODataService
-
-
Constructor Summary
Constructors Constructor Description TableSetTapMetaReader(java.net.URL tablesetUrl, MetaNameFixer fixer, uk.ac.starlink.util.ContentCoding coding)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMeans()Returns a textual indication of the method or protocol this reader uses to acquire TAP metadata.java.lang.StringgetSource()Returns a textual indication of where the metadata is coming from, typically a URL.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.
-
-
-
Constructor Detail
-
TableSetTapMetaReader
public TableSetTapMetaReader(java.net.URL tablesetUrl, MetaNameFixer fixer, uk.ac.starlink.util.ContentCoding coding)Constructor.- Parameters:
tablesetUrl- URL of some document containing VOSITables<schema>elementsfixer- object that fixes up syntactically incorrect table/column names; if null no fixing is done; has no effect for compliant VODataService documentscoding- configures HTTP compression
-
-
Method Detail
-
readSchemas
public SchemaMeta[] readSchemas() throws java.io.IOException
Description copied from interface:TapMetaReaderAcquires metadata about schemas in a TAP service.May be slow.
- Specified by:
readSchemasin interfaceTapMetaReader- Returns:
- schema metadata array
- Throws:
java.io.IOException
-
readTables
public TableMeta[] readTables(SchemaMeta schema)
Description copied from interface:TapMetaReaderAcquires metadata about tables in a given schema from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Specified by:
readTablesin interfaceTapMetaReader- Parameters:
schema- schema containing tables; not altered by call- Returns:
- table metadata array
- Throws:
java.lang.UnsupportedOperationException- always
-
readColumns
public ColumnMeta[] readColumns(TableMeta table)
Description copied from interface:TapMetaReaderAcquires metadata about columns in a given table from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Specified by:
readColumnsin interfaceTapMetaReader- Parameters:
table- table containing columns; not altered by call- Returns:
- column metadata array
- Throws:
java.lang.UnsupportedOperationException- always
-
readForeignKeys
public ForeignMeta[] readForeignKeys(TableMeta table)
Description copied from interface:TapMetaReaderAcquires metadata about foreign keys in a given table from a TAP service.May be slow. May throw UnsupportedOperationException if not needed.
- Specified by:
readForeignKeysin interfaceTapMetaReader- Parameters:
table- table containing columns; not altered by call- Returns:
- foreign key metadata array
- Throws:
java.lang.UnsupportedOperationException- always
-
getSource
public java.lang.String getSource()
Description copied from interface:TapMetaReaderReturns a textual indication of where the metadata is coming from, typically a URL.- Specified by:
getSourcein interfaceTapMetaReader- Returns:
- address of metadata
-
getMeans
public java.lang.String getMeans()
Description copied from interface:TapMetaReaderReturns a textual indication of the method or protocol this reader uses to acquire TAP metadata.- Specified by:
getMeansin interfaceTapMetaReader- Returns:
- short description of metadata acquisition method
-
-