Class TableMeta

java.lang.Object
uk.ac.starlink.vo.TableMeta

public class TableMeta extends Object
Represents table metadata from a TableSet document. The scalar members are intended to be set by classes in this package near construction time. The columns and foreignKeys members may or may not be populated, depending on the source of the instance; check the documentation for the relevant factory class.
Since:
21 Jan 2011
Author:
Mark Taylor
See Also:
  • Constructor Details

    • TableMeta

      protected TableMeta()
      Constructor.
  • Method Details

    • getType

      public String getType()
      Returns this table's type. TAP 1.0 TAP_SCHEMA.tables says this should be one of "table" or "view"; VODataService allows "output", "base_table", "view" or other values.
      Returns:
      table type label
    • getName

      public String getName()
      Returns this table's name. This is a string suitable for unadorned insertion into an ADQL query, so syntactically it must match ADQL's <table_name> production. It should not be quoted, or have a schema name prepended, or be otherwise adjusted, for use in an ADQL query.
      Returns:
      name suitable for use in ADQL
    • getTitle

      public String getTitle()
      Returns this table's human-readable title. Note, this is supplied by VODataService, but not by TAP_SCHEMA.
      Returns:
      human-readable title
    • getDescription

      public String getDescription()
      Returns this table's description.
      Returns:
      text description
    • getNrows

      public String getNrows()
      Returns the (approximate?) row count declared for this table.
      Returns:
      string indicating row count; may or may not be strictly numeric
    • getUtype

      public String getUtype()
      Returns this table's Utype.
      Returns:
      utype string
    • getExtras

      public Map<String,Object> getExtras()
      Returns a map of additional non-standard metadata items for this table.
      Returns:
      extras map
    • getColumns

      public ColumnMeta[] getColumns()
      Returns a list of the columns contained in this table. If the result is null, nothing is known about the columns, and the list may need to be explicitly set.
      Returns:
      columns contained in this table, or null
    • setColumns

      public void setColumns(ColumnMeta[] columns)
      Sets the columns contained in this table.
      Parameters:
      columns - column list
    • getForeignKeys

      public ForeignMeta[] getForeignKeys()
      Returns a list of the foreign keys associated with this table. If the result is null, nothing is known about the foreign keys, and the list may need to be explicitly set.
      Returns:
      foreign keys associated with this table, or null
    • setForeignKeys

      public void setForeignKeys(ForeignMeta[] foreignKeys)
      Sets the foreign keys associated with this table.
      Parameters:
      foreignKeys - foreign key list
    • toString

      public String toString()
      Returns this table's name.
      Overrides:
      toString in class Object
      Returns:
      name