Package uk.ac.starlink.vo

## Class CadcTapMetaReader

- java.lang.Object
- - uk.ac.starlink.vo.CadcTapMetaReader

- All Implemented Interfaces:
    `TapMetaReader`

      public class CadcTapMetaReader
      extends java.lang.Object
      implements TapMetaReader

  TapMetaReader implementation that works with the proposed VOSI-1.1 two-stage /tables endpoint proposed by Pat Dowler (grid list, 4 May 2015) and implemented at CADC. Schemas may be retrieved with or without table lists, and tables or schemas may be retrieved individually (by name) or collectively.
  Since:
    15 May 2015
  Author:
    Mark Taylor

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `CadcTapMetaReader.Config` | Defines what parts of the tableset tree are acquired at what types of read query on this object.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CadcTapMetaReader​(java.net.URL tablesetUrl)` | Constructs a default instance.
    `CadcTapMetaReader​(java.net.URL tablesetUrl, CadcTapMetaReader.Config config, uk.ac.starlink.util.ContentCoding coding)` | Constructs an instance with a configurable metadata object population policy.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getMeans​()` | Returns a textual indication of the method or protocol this reader uses to acquire TAP metadata.
    `java.lang.String` | `getSource​()` | 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CadcTapMetaReader

          public CadcTapMetaReader​(java.net.URL tablesetUrl)

      Constructs a default instance.
      Parameters:
        `tablesetUrl` - URL for CADC-like tableset service

    - #### CadcTapMetaReader

          public CadcTapMetaReader​(java.net.URL tablesetUrl,
                                   CadcTapMetaReader.Config config,
                                   uk.ac.starlink.util.ContentCoding coding)

      Constructs an instance with a configurable metadata object population policy.
      Parameters:
        `tablesetUrl` - URL for CADC-like tableset service
        `config` - population configuration
        `coding` - configures HTTP content-coding

  - ### Method Detail

    - #### readSchemas

          public SchemaMeta[] readSchemas​()
                                   throws java.io.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:
        `java.io.IOException`

    - #### readTables

          public TableMeta[] readTables​(SchemaMeta schema)
                                 throws java.io.IOException

      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:
        `java.io.IOException`

    - #### readColumns

          public ColumnMeta[] readColumns​(TableMeta table)
                                   throws java.io.IOException

      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:
        `java.io.IOException`

    - #### readForeignKeys

          public ForeignMeta[] readForeignKeys​(TableMeta table)
                                        throws java.io.IOException

      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:
        `java.io.IOException`

    - #### getSource

          public java.lang.String getSource​()

      Description copied from interface: `TapMetaReader`
      Returns a textual indication of where the metadata is coming from, typically a URL.
      Specified by:
        `getSource` in interface `TapMetaReader`
      Returns:
        address of metadata

    - #### getMeans

          public java.lang.String 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 interface `TapMetaReader`
      Returns:
        short description of metadata acquisition method

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