Class ObsTapStage

  • All Implemented Interfaces:
    Stage

    public class ObsTapStage
    extends java.lang.Object
    implements Stage
    Validation stage for testing ObsCore data model metadata and content.
    Since:
    24 Nov 2011
    Author:
    Mark Taylor
    See Also:
    IVOA Observation Data Model
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns a short one-line description of this stage.
      static java.lang.String nameKey​(java.lang.String name)
      Normalises a column name to produce a value suitable for use as a Map key.
      void run​(Reporter reporter, uk.ac.starlink.vo.TapService tapService)
      Performs the validation checks for this stage.
      static java.util.Map<java.lang.String,​uk.ac.starlink.vo.ColumnMeta> toMap​(uk.ac.starlink.vo.ColumnMeta[] cols)
      Converts an array of ColumnMeta objects into a name->value map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObsTapStage

        public ObsTapStage​(TapRunner tapRunner,
                           CapabilityHolder capHolder,
                           MetadataHolder metaHolder)
        Constructor.
        Parameters:
        tapRunner - runs TAP queries
        capHolder - provides capability metadata at runtime
        metaHolder - provides table metadata at runtime
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Stage
        Returns a short one-line description of this stage.
        Specified by:
        getDescription in interface Stage
        Returns:
        description in imperative mood
      • run

        public void run​(Reporter reporter,
                        uk.ac.starlink.vo.TapService tapService)
        Description copied from interface: Stage
        Performs the validation checks for this stage.
        Specified by:
        run in interface Stage
        Parameters:
        reporter - destination for validation messages
        tapService - TAP service description
      • toMap

        public static java.util.Map<java.lang.String,​uk.ac.starlink.vo.ColumnMeta> toMap​(uk.ac.starlink.vo.ColumnMeta[] cols)
        Converts an array of ColumnMeta objects into a name->value map. The nameKey(java.lang.String) method is used to normalise the column name.
        Parameters:
        cols - column metadata list
        Returns:
        map of normalised column name to column metadata object
      • nameKey

        public static java.lang.String nameKey​(java.lang.String name)
        Normalises a column name to produce a value suitable for use as a Map key.
        Parameters:
        name - column name
        Returns:
        map-friendly value identifying name