Package uk.ac.starlink.topcat.activate

# Class HipsSurvey

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

public class HipsSurvey extends 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 enum`
`HipsSurvey.ObsRegime`
Known obs_regime values.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`MOC_SERVER`
`static final String`
`MOC_SERVER2`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`String`
`getClientCategory()`
Value of client_category property.
`String`
`getClientSortKey()`
Value of client_sort_key property.
`String`
`getCreatorDid()`
Value of creator_did property.
`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.
`String`
`getObsRegime()`
Value of obs_regime property.
`HipsSurvey.ObsRegime`
`getObsRegimeCategory()`
Returns an ObsRegime enum entry describing the obs_regime of this survey.
`String`
`getObsTitle()`
Value of obs_title property.
`String[]`
`getPath()`
Returns a hierarchical form of this survey's identifier.
`String`
`getShortName()`
Returns an abbreviated name for this hips survey.
`Set<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(String mocServerUrl, Map<String,String> extraParams, uk.ac.starlink.util.ContentCoding coding)`
Reads a list of HiPS surveys for which hips2fits works from a MocServer.
`String`
`toString()`

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

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

## Field Details

### MOC_SERVER

public static final String MOC_SERVER

See Also:
  - Constant Field Values

### MOC_SERVER2

public static final String MOC_SERVER2

See Also:
  - Constant Field Values

## Constructor Details

### HipsSurvey

public HipsSurvey(Map<String,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 Details

### getCreatorDid

public String getCreatorDid()
Value of creator_did property.

Returns:
  creator_did

### getObsTitle

public String getObsTitle()
Value of obs_title property.

Returns:
  obs_title

### getObsRegime

public String getObsRegime()
Value of obs_regime property.

Returns:
  obs_regime

### getClientCategory

public String getClientCategory()
Value of client_category property.

Returns:
  client_category

### getClientSortKey

public String getClientSortKey()
Value of client_sort_key property.

Returns:
  client_sort_key

### getTileFormats

public Set<String> getTileFormats()
Value of the hips_tile_formats property as a set of words.

Returns:
  hips_tile_formats as a set

### getHipsFrame

public 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 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 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 String toString()

Overrides:
  `toString` in class `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(String mocServerUrl, Map<String,String> extraParams, uk.ac.starlink.util.ContentCoding coding) throws 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:
  `IOException`