Package uk.ac.starlink.vo

## Class ColumnMeta

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

-     public class ColumnMeta
      extends java.lang.Object

  Represents column metadata from a TableSet document.
  Since:
    21 Jan 2011
  Author:
    Mark Taylor
  See Also:
    IVOA VODataService Recommendation

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `ColumnMeta​()` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getDataType​()` | Returns the datatype for this column.
    `java.lang.String` | `getDescription​()` | Returns this column's description.
    `java.util.Map<java.lang.String,java.lang.Object>` | `getExtras​()` | Returns a map of additional non-standard metadata items for this column.
    `java.lang.String[]` | `getFlags​()` | Returns a list of strings corresponding to flags that are set on this column.
    `java.lang.String` | `getName​()` | Returns this column's name.
    `java.lang.String` | `getUcd​()` | Returns a UCD associated with this column.
    `java.lang.String` | `getUnit​()` | Returns this column's unit string.
    `java.lang.String` | `getUtype​()` | Returns a Utype associated with this column.
    `boolean` | `hasFlag​(java.lang.String flagTxt)` | Convenience function to find out if a given flag value is present.
    `boolean` | `isIndexed​()` | Indicates whether this column is declared indexed.
    `boolean` | `isNullable​()` | Indicates whether this column is declared nullable.
    `boolean` | `isPrimary​()` | Indicates whether this column is declared primary.
    `java.lang.String` | `toString​()` | Returns this column's name.

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

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

- - ### Constructor Detail

    - #### ColumnMeta

          protected ColumnMeta​()

      Constructor.

  - ### Method Detail

    - #### getName

          public java.lang.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 java.lang.String getDescription​()

      Returns this column's description.
      Returns:
        text description

    - #### getUnit

          public java.lang.String getUnit​()

      Returns this column's unit string.
      Returns:
        unit

    - #### getUcd

          public java.lang.String getUcd​()

      Returns a UCD associated with this column.
      Returns:
        ucd

    - #### getUtype

          public java.lang.String getUtype​()

      Returns a Utype associated with this column.
      Returns:
        utype

    - #### getDataType

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

    - #### getFlags

          public java.lang.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.
      Returns:
        true iff one of the flag values is "indexed"

    - #### isPrimary

          public boolean isPrimary​()

      Indicates whether this column is declared primary.
      Returns:
        true iff one of the flag values is "primary"

    - #### isNullable

          public boolean isNullable​()

      Indicates whether this column is declared nullable.
      Returns:
        true iff one of the flag values is "nullable"

    - #### getExtras

          public java.util.Map<java.lang.String,java.lang.Object> getExtras​()

      Returns a map of additional non-standard metadata items for this column.
      Returns:
        extras map

    - #### hasFlag

          public boolean hasFlag​(java.lang.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 java.lang.String toString​()

      Returns this column's name.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        name

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