uk.ac.starlink.hapi

## Class HapiVersion

- java.lang.Object
- - uk.ac.starlink.hapi.HapiVersion

-     public class HapiVersion
      extends java.lang.Object

  Characterises the version of the HAPI protocol in use.
  Since:
    11 Jan 2024

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static HapiVersion` | `ASSUMED` Version suitable for use if no version information is available.
    `static HapiVersion` | `V20` Version 2.0.
    `static HapiVersion` | `V30` Version 3.0.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static HapiVersion` | `fromText(java.lang.String name)` Returns an effective version instance for a version specification string.
    `java.lang.String` | `getDatasetRequestParam()` Returns the name for the dataset specification request parameter.
    `java.lang.String` | `getName()` Return the version string for this version.
    `static HapiVersion[]` | `getStandardVersions()` Returns standard supported versions.
    `java.lang.String` | `getStartRequestParam()` Returns the name for the start time request parameter.
    `java.lang.String` | `getStopRequestParam()` Returns the name for the stop time request parameter.

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

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

- - ### Field Detail

    - #### ASSUMED

          public static final HapiVersion ASSUMED

      Version suitable for use if no version information is available.

    - #### V20

          public static final HapiVersion V20

      Version 2.0.

    - #### V30

          public static final HapiVersion V30

      Version 3.0.

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Return the version string for this version.
      Returns:
        version string

    - #### getDatasetRequestParam

          public java.lang.String getDatasetRequestParam()

      Returns the name for the dataset specification request parameter.
      Returns:
        dataset request parameter name

    - #### getStartRequestParam

          public java.lang.String getStartRequestParam()

      Returns the name for the start time request parameter.
      Returns:
        start time parameter name

    - #### getStopRequestParam

          public java.lang.String getStopRequestParam()

      Returns the name for the stop time request parameter.
      Returns:
        stop time parameter name

    - #### fromText

          public static HapiVersion fromText(java.lang.String name)

      Returns an effective version instance for a version specification string. The supplied string is expected to be of the form 2.x or 3.x, but anything including null is accepted.
      Parameters:
        `name` - version identifier
      Returns:
        version instance, not null

    - #### getStandardVersions

          public static HapiVersion[] getStandardVersions()

      Returns standard supported versions.
      Returns:
        new array of standard versions