Package uk.ac.starlink.topcat.activate

## Class HipsSurvey

- java.lang.Object
- - uk.ac.starlink.topcat.activate.HipsSurvey

-     public class HipsSurvey
      extends java.lang.Object

  This class characterises a HiPS survey corresponding to an existing service, and provides static methods for acquiring a list of such services.
  See Also:
    HiPS 1.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `HipsSurvey.ObsRegime` | Known obs_regime values.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `MOC_SERVER` |
    `static java.lang.String` | `MOC_SERVER2` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `HipsSurvey​(java.util.Map<java.lang.String,​java.lang.String> map)` | Constructs a HipsSurvey object based on a map representing (some or all of) the HiPS properties.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getClientCategory()` | Value of client_category property.
    `java.lang.String` | `getClientSortKey()` | Value of client_sort_key property.
    `java.lang.String` | `getCreatorDid()` | Value of creator_did property.
    `java.lang.String` | `getHipsFrame()` | Value of the hips_frame property.
    `static Downloader<HipsSurvey[]>` | `getImageHipsListDownloader()` | Returns a downloader for a list of all the HiPS image surveys.
    `double` | `getMocSkyFraction()` | Value of the moc_sky_fraction property as a double.
    `java.lang.String` | `getObsRegime()` | Value of obs_regime property.
    `HipsSurvey.ObsRegime` | `getObsRegimeCategory()` | Returns an ObsRegime enum entry describing the obs_regime of this survey.
    `java.lang.String` | `getObsTitle()` | Value of obs_title property.
    `java.lang.String[]` | `getPath()` | Returns a hierarchical form of this survey's identifier.
    `java.lang.String` | `getShortName()` | Returns an abbreviated name for this hips survey.
    `java.util.Set<java.lang.String>` | `getTileFormats()` | Value of the hips_tile_formats property as a set of words.
    `boolean` | `hasFits()` | Indicates whether this survey has FITS data.
    `boolean` | `isSky()` | Indicates whether this survey apparently contains sky data.
    `static HipsSurvey[]` | `readSurveys​(java.lang.String mocServerUrl, java.util.Map<java.lang.String,​java.lang.String> extraParams, uk.ac.starlink.util.ContentCoding coding)` | Reads a list of HiPS surveys for which hips2fits works from a MocServer.
    `java.lang.String` | `toString()` |

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

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

- - ### Field Detail

    - #### MOC_SERVER

          public static final java.lang.String MOC_SERVER

      See Also:
        Constant Field Values

    - #### MOC_SERVER2

          public static final java.lang.String MOC_SERVER2

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HipsSurvey

          public HipsSurvey​(java.util.Map<java.lang.String,​java.lang.String> map)

      Constructs a HipsSurvey object based on a map representing (some or all of) the HiPS properties. These properties are defined in the HiPS 1.0 standard.
      Parameters:
        `map` - HiPS properties as a map

  - ### Method Detail

    - #### getCreatorDid

          public java.lang.String getCreatorDid()

      Value of creator_did property.
      Returns:
        creator_did

    - #### getObsTitle

          public java.lang.String getObsTitle()

      Value of obs_title property.
      Returns:
        obs_title

    - #### getObsRegime

          public java.lang.String getObsRegime()

      Value of obs_regime property.
      Returns:
        obs_regime

    - #### getClientCategory

          public java.lang.String getClientCategory()

      Value of client_category property.
      Returns:
        client_category

    - #### getClientSortKey

          public java.lang.String getClientSortKey()

      Value of client_sort_key property.
      Returns:
        client_sort_key

    - #### getTileFormats

          public java.util.Set<java.lang.String> getTileFormats()

      Value of the hips_tile_formats property as a set of words.
      Returns:
        hips_tile_formats as a set

    - #### getHipsFrame

          public java.lang.String getHipsFrame()

      Value of the hips_frame property.
      Returns:
        hips_frame

    - #### getMocSkyFraction

          public double getMocSkyFraction()

      Value of the moc_sky_fraction property as a double.
      Returns:
        moc_sky_fraction in range 0..1, or NaN if not known

    - #### hasFits

          public boolean hasFits()

      Indicates whether this survey has FITS data.
      Returns:
        true iff `getTileFormats().contains("fits")`

    - #### isSky

          public boolean isSky()

      Indicates whether this survey apparently contains sky data. If not, it probably represents some kind of solar system object.
      Returns:
        true iff getHipsFrame() looks like a sky frame

    - #### getObsRegimeCategory

          public HipsSurvey.ObsRegime getObsRegimeCategory()

      Returns an ObsRegime enum entry describing the obs_regime of this survey. If none of the known obs_regimes has been named, null is returned.
      Returns:
        known observation regime, or null

    - #### getPath

          public java.lang.String[] getPath()

      Returns a hierarchical form of this survey's identifier. This is somewhat ad-hoc, but it is intended to form the basis for a hierarchical representation of a list of HiPS surveys. The first element of the path is the root, more specific items later on in the list.
      Returns:
        hierarchical representation of HiPS identifier

    - #### getShortName

          public java.lang.String getShortName()

      Returns an abbreviated name for this hips survey. This is usually a shortened form of the creator_did that should be somewhat human readable and should also be recognisable by services.
      Returns:
        service name

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getImageHipsListDownloader

          public static Downloader<HipsSurvey[]> getImageHipsListDownloader()

      Returns a downloader for a list of all the HiPS image surveys. The downloader is not started by this method.
      Returns:
        downloader for all surveys suitable for hips2fits

    - #### readSurveys

          public static HipsSurvey[] readSurveys​(java.lang.String mocServerUrl,
                                                 java.util.Map<java.lang.String,​java.lang.String> extraParams,
                                                 uk.ac.starlink.util.ContentCoding coding)
                                          throws java.io.IOException

      Reads a list of HiPS surveys for which hips2fits works from a MocServer. The MocServer interface does not appear to be documented anywhere, but I believe it's used internally by Aladin, so is hopefully reasonably stable. One day this should be replaced by registry queries, but the registry content is not sufficiently complete at time of writing.
      Parameters:
        `mocServerUrl` - base URL of MocServer
        `extraParams` - name->value map giving custom query parameters
        `coding` - content-coding
      Returns:
        survey list
      Throws:
        `java.io.IOException`