edu.nrao.sss.astronomy
Enum CelestialCoordinateSystem

java.lang.Object
  extended by java.lang.Enum<CelestialCoordinateSystem>
      extended by edu.nrao.sss.astronomy.CelestialCoordinateSystem
All Implemented Interfaces:
Serializable, Comparable<CelestialCoordinateSystem>

public enum CelestialCoordinateSystem
extends Enum<CelestialCoordinateSystem>

An enumeration of coordinate systems commonly used in astronomy.

Version Info:

$Revision: 952 $
$Date: 2007-10-05 10:25:17 -0600 (Fri, 05 Oct 2007) $
$Author: dharland $

Since:
2006-07-18
Author:
David M. Harland

Enum Constant Summary
ECLIPTIC
          A spherical system based on the center of the earth and the earth's orbit around the sun.
EQUATORIAL
          A spherical system based on the projection of the earth's equator onto the celestial sphere.
GALACTIC
          A spherical system based on the center of the sun and the central plane of our galaxy.
HORIZONTAL
          A spherical system based on the projection of the observer's horizon onto the celestial sphere.
 
Method Summary
static CelestialCoordinateSystem fromString(String text)
          Returns the celestial coordinate system represented by text.
 String getAbbreviationForLatitude()
          Returns the abbreviation commonly used for the latitude component of this system.
 String getAbbreviationForLongitude()
          Returns the abbreviation commonly used for the longitude component of this system.
static CelestialCoordinateSystem getDefault()
          Returns a default coordinate system.
 String getNameOfLatitude()
          Returns the name commonly used for the latitude component of this system.
 String getNameOfLongitude()
          Returns the name commonly used for the longitude component of this system.
 String latitudeToString(Latitude latitude, int minFracDigits, int maxFracDigits)
          Returns a text representation of latitude that is appropriate for this coordinate system.
 String longitudeToString(Longitude longitude, int minFracDigits, int maxFracDigits)
          Returns a text representation of longitude that is appropriate for this coordinate system.
 String toString()
          Returns a text representation of this enumeration constant.
static CelestialCoordinateSystem valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CelestialCoordinateSystem[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EQUATORIAL

public static final CelestialCoordinateSystem EQUATORIAL
A spherical system based on the projection of the earth's equator onto the celestial sphere.


HORIZONTAL

public static final CelestialCoordinateSystem HORIZONTAL
A spherical system based on the projection of the observer's horizon onto the celestial sphere.


GALACTIC

public static final CelestialCoordinateSystem GALACTIC
A spherical system based on the center of the sun and the central plane of our galaxy.


ECLIPTIC

public static final CelestialCoordinateSystem ECLIPTIC
A spherical system based on the center of the earth and the earth's orbit around the sun.

Method Detail

values

public static CelestialCoordinateSystem[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CelestialCoordinateSystem c : CelestialCoordinateSystem.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CelestialCoordinateSystem valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getNameOfLongitude

public String getNameOfLongitude()
Returns the name commonly used for the longitude component of this system.

Returns:
the name of the longitude component of this system.

getNameOfLatitude

public String getNameOfLatitude()
Returns the name commonly used for the latitude component of this system.

Returns:
the name of the latitude component of this system.

getAbbreviationForLongitude

public String getAbbreviationForLongitude()
Returns the abbreviation commonly used for the longitude component of this system.

Returns:
an abbreviation for the longitude component of this system.

getAbbreviationForLatitude

public String getAbbreviationForLatitude()
Returns the abbreviation commonly used for the latitude component of this system.

Returns:
an abbreviation for the latitude component of this system.

latitudeToString

public String latitudeToString(Latitude latitude,
                               int minFracDigits,
                               int maxFracDigits)
Returns a text representation of latitude that is appropriate for this coordinate system. Note that this might not be the same text returned by latitude.toString().

Parameters:
latitude - the latitude to be represented as text.
minFracDigits - the minimum number of places after the decimal point.
maxFracDigits - the maximum number of places after the decimal point.
Returns:
a text representation of latitude.

longitudeToString

public String longitudeToString(Longitude longitude,
                                int minFracDigits,
                                int maxFracDigits)
Returns a text representation of longitude that is appropriate for this coordinate system. Note that this might not be the same text returned by longitude.toString().

Parameters:
longitude - the longitude to be represented as text.
minFracDigits - the minimum number of places after the decimal point.
maxFracDigits - the maximum number of places after the decimal point.
Returns:
a text representation of longitude.

getDefault

public static CelestialCoordinateSystem getDefault()
Returns a default coordinate system.

Returns:
a default coordinate system.

toString

public String toString()
Returns a text representation of this enumeration constant.

Overrides:
toString in class Enum<CelestialCoordinateSystem>
Returns:
a text representation of this enumeration constant.

fromString

public static CelestialCoordinateSystem fromString(String text)
Returns the celestial coordinate system represented by text.

For details about the transformation, see EnumerationUtility.enumFromString(Class, String).

Parameters:
text - a text representation of a celestial coordinate system.
Returns:
the celestial coordinate system represented by text.


Copyright © 2009. All Rights Reserved.