Class ColumnMeta

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

public class ColumnMeta extends Object
Represents column metadata from a TableSet document.
Since:
21 Jan 2011
Author:
Mark Taylor
See Also:
  • Constructor Details

    • ColumnMeta

      protected ColumnMeta()
      Constructor.
  • Method Details

    • getName

      public String getName()
      Returns this column's name. This is a string suitable for unadorned insertion into an ADQL query, so syntactically it must match ADQL's <column_name>, hence <identifier> production (a <regular_identifier> without quotes or a <delimited_identifer> including quotes). It should not be quoted or otherwise adjusted for use in an ADQL query.
      Returns:
      name suitable for use in ADQL
    • getDescription

      public String getDescription()
      Returns this column's description.
      Returns:
      text description
    • getUnit

      public String getUnit()
      Returns this column's unit string.
      Returns:
      unit
    • getUcd

      public String getUcd()
      Returns a UCD associated with this column.
      Returns:
      ucd
    • getUtype

      public String getUtype()
      Returns a Utype associated with this column.
      Returns:
      utype
    • getDataType

      public String getDataType()
      Returns the datatype for this column. This may be an ADQL data type (TAP 1.0 sec 2.5) or a vs:TAPType or vs:VOTableType (VODataService 1.1 sec 3.5.3).
      Returns:
      datatype
    • getArraysize

      public String getArraysize()
      Array size, normally in the form of a VOTable arraysize attribute.
      Returns:
      arraysize string
    • getXtype

      public String getXtype()
      Extended type, normally as for a VOTable xtype attribute.
      Returns:
      xtype
    • getFlags

      public String[] getFlags()
      Returns a list of strings corresponding to flags that are set on this column. This list is in principle open (according to VODataService) but VODataService mentions the values "indexed", "primary", "nullable", while TAP_SCHEMA.columns defines "principal", "indexed" and "std".
      Returns:
      array of flag strings set
    • isIndexed

      public boolean isIndexed()
      Indicates whether this column is declared indexed. Available from both TAP_SCHEMA and VODataService metadata.
      Returns:
      true iff one of the flag values is "indexed"
    • isPrimary

      public boolean isPrimary()
      Indicates whether this column is declared primary. Only available from VODataService metadata.
      Returns:
      true iff one of the flag values is "primary"
    • isNullable

      public boolean isNullable()
      Indicates whether this column is declared nullable. Only available from VODataService metadata.
      Returns:
      true iff one of the flag values is "nullable"
    • isPrincipal

      public boolean isPrincipal()
      Indicates whether this column is declared principal. Only available from TAP_SCHEMA metadata.
      Returns:
      true iff one of the flag values is "principal"
    • isStd

      public boolean isStd()
      Indicates whether this column is declared standard. Only available from TAP_SCHEMA metadata.
      Returns:
      true iff one of the flag values is "std"
    • getExtras

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

      public boolean hasFlag(String flagTxt)
      Convenience function to find out if a given flag value is present.
      Parameters:
      flagTxt - flag value to query
      Returns:
      true iff one of the flag values is equal to flagTxt
    • toString

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