uk.ac.starlink.ttools.cone
Class MocServiceCoverage

java.lang.Object
  extended by uk.ac.starlink.ttools.cone.MocCoverage
      extended by uk.ac.starlink.ttools.cone.MocServiceCoverage
All Implemented Interfaces:
Coverage

public class MocServiceCoverage
extends MocCoverage

Coverage implementation which acquires state by querying the MOC service operated by CDS. This can take a Cone Search URL as an argument to identify the target service. The lon and lat are ICRS RA and Declination respectively for the footprints returned by this object.

Note: MOCs are cached indefinitely per service, beware that this constitutes a potential memory leak. Some smarter caching scheme may be introduced if this causes problems.

Since:
16 Dec 2011
Author:
Mark Taylor

Nested Class Summary
 
Nested classes/interfaces inherited from interface uk.ac.starlink.ttools.cone.Coverage
Coverage.Amount
 
Field Summary
static String MOC_SERVICE_URL
           
 
Constructor Summary
MocServiceCoverage(URL serviceUrl)
          Constructor.
 
Method Summary
protected  cds.moc.HealpixMoc createMoc()
          Constructs the MOC which will define this object's coverage.
static cds.moc.HealpixImpl getDefaultHealpixImpl()
          Returns the HEALPix implementation used for MOC service queries.
static int getServiceNside()
          Returns the HEALPix Nside value used when MOCs are requested.
static void main(String[] args)
           
static void setDefaultHealpixImpl(cds.moc.HealpixImpl hpi)
          Sets the HEALPix implementation used for MOC service queries.
static void setServiceNside(int nside)
          Sets the HEALPix Nside value used when MOCs are requested.
 
Methods inherited from class uk.ac.starlink.ttools.cone.MocCoverage
discOverlaps, getAmount, getMoc, initCoverage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOC_SERVICE_URL

public static final String MOC_SERVICE_URL
See Also:
Constant Field Values
Constructor Detail

MocServiceCoverage

public MocServiceCoverage(URL serviceUrl)
Constructor.

Parameters:
serviceUrl - cone search service URL as recognised by CDS MOC service
Method Detail

createMoc

protected cds.moc.HealpixMoc createMoc()
                                throws IOException
Description copied from class: MocCoverage
Constructs the MOC which will define this object's coverage. This method, which may be time-consuming, will be called a maximum of once by the MocCoverage.initCoverage() method of MocCoverage, and should not be called by anyone else.

Specified by:
createMoc in class MocCoverage
Returns:
new MOC defining footprint
Throws:
IOException

getServiceNside

public static int getServiceNside()
Returns the HEALPix Nside value used when MOCs are requested.

Returns:
nside (a power of 2)

setServiceNside

public static void setServiceNside(int nside)
Sets the HEALPix Nside value used when MOCs are requested.

Parameters:
nside - nside (a power of 2)

getDefaultHealpixImpl

public static cds.moc.HealpixImpl getDefaultHealpixImpl()
Returns the HEALPix implementation used for MOC service queries.

Returns:
indexing implementation

setDefaultHealpixImpl

public static void setDefaultHealpixImpl(cds.moc.HealpixImpl hpi)
Sets the HEALPix implementation used for MOC service queries.

Parameters:
hpi - indexing implementation

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException


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