net
Class DigitizedSkySurveyImage

java.lang.Object
  extended by util.PropertyContainer
      extended by net.DigitizedSkySurveyImage
All Implemented Interfaces:
Cloneable, Initializable, PropertyBearing

Deprecated. Use DigitizedSkySurvey instead.

public class DigitizedSkySurveyImage
extends PropertyContainer

This class uses a cgi-based interface to the dss server to retrieve a dss image readily to use as a Java-image. The standard retrieval format is on an URL like http://stdatu.stsci.edu/cgi-bin/dss_search?v=poss2ukstu&r=16+00+00&d=-20+00+00&e=J2000&h=15.0&w=15.0&f=gif&s=true&c=none&fov=NONE&v3=. As I know only how to operate this server, the extra-work involved in allowing the user to specify the server KEY_SERVER, the CGI-path KEY_CGIPATH and all the id's for the necessary fields might be extra work, but future development may provide different servers. Note that the user can specify the name of the method that actually transfers a request to the server with the KEY_URLMETHOD key. Actually, it points to getUrlForStsci(java.lang.Double, java.lang.Double, java.lang.Double, java.lang.Double). Additional implementation should adopt a similar naming scheme, i.e. starting with getUrlFor extended with the institute name providing the service. This method must always return an URL and must be declared in this class.

New locations


Nested Class Summary
static class DigitizedSkySurveyImage.Display
          Deprecated. Test the image retrieval.
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private static String DEFCGIPATH
          Deprecated. Default print writer to use for the syslog.
private static String DEFIDDEC
          Deprecated. Default print writer to use for the syslog.
private static String DEFIDEPOCH
          Deprecated. Default print writer to use for the syslog.
private static String DEFIDFORMAT
          Deprecated. Default print writer to use for the syslog.
private static String DEFIDHEIGHT
          Deprecated. Default print writer to use for the syslog.
private static String DEFIDRA
          Deprecated. Default print writer to use for the syslog.
private static String DEFIDSOURCE
          Deprecated. Default print writer to use for the syslog.
private static String DEFIDWIDTH
          Deprecated. Default print writer to use for the syslog.
private static String DEFPROTOCOL
          Deprecated. Default print writer to use for the syslog.
private static String DEFSERVER
          Deprecated. Default print writer to use for the syslog.
private static String DEFURLMETHOD
          Deprecated. Default print writer to use for the syslog.
private static Toolkit imageload
          Deprecated. The ttolkit for downloading URL's to images.
static String KEY_CGIPATH
          Deprecated. The cgi-path after the server name.
static String KEY_IDDEC
          Deprecated. The string used to identify the declination of the image.
static String KEY_IDEPOCH
          Deprecated. The string used to identify the epoch of the position.
static String KEY_IDFORMAT
          Deprecated. The string used to identify the image format.
static String KEY_IDHEIGHT
          Deprecated. The string used to identify the height of the image.
static String KEY_IDRA
          Deprecated. The string used to identify the right ascension of the image.
static String KEY_IDSOURCE
          Deprecated. The string used to identify the plate source.
static String KEY_IDWIDTH
          Deprecated. The string used to identify the width of the image.
static String KEY_PROTOCOL
          Deprecated. The protocol type for downloading.
static String KEY_SERVER
          Deprecated. The server name hosting the digitized sky survey archive.
static String KEY_URLMETHOD
          Deprecated. This method is called to retrieve an URL for image download.
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
DigitizedSkySurveyImage(Map prop)
          Deprecated. Constructs a new dss-image retrieval object.
 
Method Summary
private  URL getDownloadUrl(double ra, double dec, double width, double height)
          Deprecated. Returns the URL from which the image can be retrieved.
 Image getImage(double ra, double dec, double width, double height)
          Deprecated. Takes the center of an image, its width and height and retrieves it from a dss server.
 Image getImageAndWait(Component forme, double ra, double dec, double width, double height)
          Deprecated. Takes the center of an image, its width and height and retrieves it from a dss server.
private static String getMinSec(double degree)
          Deprecated. Converts the fractional part of the argument into minutes and seconds.
 URL getUrlForStsci(Double ra, Double dec, Double width, Double height)
          Deprecated. This method prepares an url according to the CGI-requirements of the STScI dss-server.
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, init, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_PROTOCOL

public static final String KEY_PROTOCOL
Deprecated. 
The protocol type for downloading.

See Also:
Constant Field Values

KEY_SERVER

public static final String KEY_SERVER
Deprecated. 
The server name hosting the digitized sky survey archive.

See Also:
Constant Field Values

KEY_CGIPATH

public static final String KEY_CGIPATH
Deprecated. 
The cgi-path after the server name.

See Also:
Constant Field Values

KEY_IDSOURCE

public static final String KEY_IDSOURCE
Deprecated. 
The string used to identify the plate source.

See Also:
Constant Field Values

KEY_IDRA

public static final String KEY_IDRA
Deprecated. 
The string used to identify the right ascension of the image.

See Also:
Constant Field Values

KEY_IDDEC

public static final String KEY_IDDEC
Deprecated. 
The string used to identify the declination of the image.

See Also:
Constant Field Values

KEY_IDEPOCH

public static final String KEY_IDEPOCH
Deprecated. 
The string used to identify the epoch of the position.

See Also:
Constant Field Values

KEY_IDHEIGHT

public static final String KEY_IDHEIGHT
Deprecated. 
The string used to identify the height of the image.

See Also:
Constant Field Values

KEY_IDWIDTH

public static final String KEY_IDWIDTH
Deprecated. 
The string used to identify the width of the image.

See Also:
Constant Field Values

KEY_IDFORMAT

public static final String KEY_IDFORMAT
Deprecated. 
The string used to identify the image format.

See Also:
Constant Field Values

KEY_URLMETHOD

public static final String KEY_URLMETHOD
Deprecated. 
This method is called to retrieve an URL for image download.

See Also:
Constant Field Values

DEFPROTOCOL

private static final String DEFPROTOCOL
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFSERVER

private static final String DEFSERVER
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFCGIPATH

private static final String DEFCGIPATH
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFIDSOURCE

private static final String DEFIDSOURCE
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFIDRA

private static final String DEFIDRA
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFIDDEC

private static final String DEFIDDEC
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFIDEPOCH

private static final String DEFIDEPOCH
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFIDHEIGHT

private static final String DEFIDHEIGHT
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFIDWIDTH

private static final String DEFIDWIDTH
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFIDFORMAT

private static final String DEFIDFORMAT
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

DEFURLMETHOD

private static final String DEFURLMETHOD
Deprecated. 
Default print writer to use for the syslog.

See Also:
Constant Field Values

imageload

private static final Toolkit imageload
Deprecated. 
The ttolkit for downloading URL's to images.

Constructor Detail

DigitizedSkySurveyImage

public DigitizedSkySurveyImage(Map prop)
Deprecated. 
Constructs a new dss-image retrieval object. After construction, multiple images can be retrieved using the getImage(double, double, double, double) method.

Method Detail

getImage

public Image getImage(double ra,
                      double dec,
                      double width,
                      double height)
Deprecated. 
Takes the center of an image, its width and height and retrieves it from a dss server. This method relies on the Toolkit.createImage(URL) method, thus returning fast, but delivering a maybe not fully retrieved image. If you want to wait until the image has been transfered completely, use getImageAndWait(java.awt.Component, double, double, double, double).

Parameters:
ra - Right ascension of the center of the image in degrees.
dec - Declination of the center of the image in degrees.
width - Width of the image in degrees.
height - Height of the image in degrees.
Returns:
A possibly not fully fetched sky image or null.

getImageAndWait

public Image getImageAndWait(Component forme,
                             double ra,
                             double dec,
                             double width,
                             double height)
Deprecated. 
Takes the center of an image, its width and height and retrieves it from a dss server. This method uses a media tracker to wait until the image is fully retrieved. If you do not want to wait until the image has been transfered completely, use getImage(double, double, double, double).

Parameters:
forme - The component that wants to display the image.
ra - Right ascension of the center of the image in degrees.
dec - Declination of the center of the image in degrees.
width - Width of the image in degrees.
height - Height of the image in degrees.
Returns:
A fully fetched sky image or null.

getDownloadUrl

private URL getDownloadUrl(double ra,
                           double dec,
                           double width,
                           double height)
Deprecated. 
Returns the URL from which the image can be retrieved. This method uses the KEY_URLMETHOD property to fork into the appropriate method.

Parameters:
ra - Right ascension of the center of the image in degrees.
dec - Declination of the center of the image in degrees.
width - Width of the image in degrees.
height - Height of the image in degrees.

getMinSec

private static final String getMinSec(double degree)
Deprecated. 
Converts the fractional part of the argument into minutes and seconds. Returns a string ready for a cgi-query.


getUrlForStsci

public URL getUrlForStsci(Double ra,
                          Double dec,
                          Double width,
                          Double height)
Deprecated. 
This method prepares an url according to the CGI-requirements of the STScI dss-server. In particular, an URL is created from a string similar to http://stdatu.stsci.edu/cgi-bin/dss_search?v=poss2ukstu&r=16+00+00& d=-20+00+00&e=J2000&h=15.0&w=15.0&f=gif&s=true&c=none&fov=NONE&v3=. Here, poss2ukstu is the default KEY_IDSOURCE of the image, r is right ascension in hours, minutes and seconds, d the declination in degrees, minutes and seconds separated with '+' that replace ' '. Height and width are in arcminutes. Retrieval format is always 'gif' to allow JAVA to convert the bytes into an image. No compression, field-of-view, or rotation angle is allowed.

The image requested has integer width and height (arcmin).