Interface TapMetaReader

  • All Known Implementing Classes:
    TableSetTapMetaReader, TapSchemaTapMetaReader, VizierTapMetaReader, Vosi11TapMetaReader

    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 Detail

      • readSchemas

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

        May be slow.

        Returns:
        schema metadata array
        Throws:
        java.io.IOException
      • readTables

        TableMeta[] readTables​(SchemaMeta schema)
                        throws java.io.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:
        java.io.IOException
      • readColumns

        ColumnMeta[] readColumns​(TableMeta table)
                          throws java.io.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:
        java.io.IOException
      • readForeignKeys

        ForeignMeta[] readForeignKeys​(TableMeta table)
                               throws java.io.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:
        java.io.IOException
      • getSource

        java.lang.String getSource()
        Returns a textual indication of where the metadata is coming from, typically a URL.
        Returns:
        address of metadata
      • getMeans

        java.lang.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