edu.nrao.sss.model.project.scan
Enum ScanTimeType

java.lang.Object
  extended by java.lang.Enum<ScanTimeType>
      extended by edu.nrao.sss.model.project.scan.ScanTimeType
All Implemented Interfaces:
Serializable, Comparable<ScanTimeType>

public enum ScanTimeType
extends Enum<ScanTimeType>

An enumeration of the different kinds of time associated with a Scan. An observer may specify either a duration or a point in time for a scan. If duration is chosen, the observer may then choose either a total duration or the amount of time to spend on-source. If time is chosen, the observer may then choose either a start or stop time. For both durations and times a choice must also be made between expressing time in sidereal unit or standard units.

Version Info:

$Revision: 2142 $
$Date: 2009-03-30 13:29:56 -0600 (Mon, 30 Mar 2009) $
$Author: btruitt $

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

Enum Constant Summary
DURATION_SIDEREAL
          The total amount of time spent on a scan, in sidereal units.
DURATION_UT
          The total amount of time spent on a scan, in SI units.
ON_SOURCE_SIDEREAL
          The amount of time spent observing a source, in sidereal units.
ON_SOURCE_UT
          The amount of time spent observing a source, in SI units.
START_LST
          The local sidereal time at which a scan begins.
START_UT
          The date and time at which a scan begins.
STOP_LST
          The local sidereal time at which a scan concludes.
STOP_UT
          The date and time at which a scan concludes.
 
Method Summary
static ScanTimeType fromString(String text)
          Returns the scan time type represented by text.
static ScanTimeType getDefault()
          Returns the time type to use as a default.
 boolean isDuration()
          Returns true if this time type is a duration (as opposed to a point in time).
 boolean isOnSourceDuration()
          Returns true if this time type is a time-on-source duration.
 boolean isPointInTime()
          Returns true if this time type is a point in time (as opposed to a duration).
 boolean isSiderealTime()
          Returns true if this time type is expressed in sidereal units.
 boolean isStartTime()
          Returns true if this time type is a start time.
 boolean isStopTime()
          Returns true if this time type is a stop time.
 boolean isTotalDuration()
          Returns true if this time type is a total duration.
 boolean isUniversalTime()
          Returns true if this time type is expressed in SI units.
static List<ScanTimeType> siderealSubset()
          Returns the elements of this enumeration that are based on sidereal time.
 String toString()
          Returns a text representation of this enumeration constant.
static List<ScanTimeType> utSubset()
          Returns the elements of this enumeration that are based on universal time.
static ScanTimeType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ScanTimeType[] 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

ON_SOURCE_SIDEREAL

public static final ScanTimeType ON_SOURCE_SIDEREAL
The amount of time spent observing a source, in sidereal units.


DURATION_SIDEREAL

public static final ScanTimeType DURATION_SIDEREAL
The total amount of time spent on a scan, in sidereal units. This time includes both time spent on the source and time spent moving the telescope from one source to another and time spent configuring the hardware.


START_LST

public static final ScanTimeType START_LST
The local sidereal time at which a scan begins.


STOP_LST

public static final ScanTimeType STOP_LST
The local sidereal time at which a scan concludes.


ON_SOURCE_UT

public static final ScanTimeType ON_SOURCE_UT
The amount of time spent observing a source, in SI units.


DURATION_UT

public static final ScanTimeType DURATION_UT
The total amount of time spent on a scan, in SI units. This time includes both time spent on the source and time spent moving the telescope from one source to another and time spent configuring the hardware.


START_UT

public static final ScanTimeType START_UT
The date and time at which a scan begins.

The date/time is expressed in conventional units. Though the "UT" suffix may seem to imply that the Greenwich time zone be used, that is not the case. Any time zone may be used; the time merely needs to be in SI units, not sidereal units.


STOP_UT

public static final ScanTimeType STOP_UT
The date and time at which a scan concludes.

The date/time is expressed in conventional units. Though the "UT" suffix may seem to imply that the Greenwich time zone be used, that is not the case. Any time zone may be used; the time merely needs to be in SI units, not sidereal units.

Method Detail

values

public static ScanTimeType[] 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 (ScanTimeType c : ScanTimeType.values())
    System.out.println(c);

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

valueOf

public static ScanTimeType 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

getDefault

public static ScanTimeType getDefault()
Returns the time type to use as a default.

Returns:
a default scan time type.

isDuration

public boolean isDuration()
Returns true if this time type is a duration (as opposed to a point in time).

Returns:
true if this time type is a duration.

isPointInTime

public boolean isPointInTime()
Returns true if this time type is a point in time (as opposed to a duration).

Returns:
true if this time type is a point in time.

isOnSourceDuration

public boolean isOnSourceDuration()
Returns true if this time type is a time-on-source duration.

Returns:
true if this time type is a time-on-source duration.

isTotalDuration

public boolean isTotalDuration()
Returns true if this time type is a total duration.

Returns:
true if this time type is a total duration.

isStartTime

public boolean isStartTime()
Returns true if this time type is a start time.

Returns:
true if this time type is a start time.

isStopTime

public boolean isStopTime()
Returns true if this time type is a stop time.

Returns:
true if this time type is a stop time.

isUniversalTime

public boolean isUniversalTime()
Returns true if this time type is expressed in SI units.

Returns:
true if this time type is expressed in SI units.

isSiderealTime

public boolean isSiderealTime()
Returns true if this time type is expressed in sidereal units.

Returns:
true if this time type is expressed in sidereal units.

toString

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

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

fromString

public static ScanTimeType fromString(String text)
Returns the scan time type represented by text.

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

Parameters:
text - a text representation of a scan time type.
Returns:
the scan time type represented by text.

siderealSubset

public static List<ScanTimeType> siderealSubset()
Returns the elements of this enumeration that are based on sidereal time. The returned list is not referenced by this class and may therefore be safely manipulated by clients.

Returns:
the elements of this enumeration that are based on sidereal time.

utSubset

public static List<ScanTimeType> utSubset()
Returns the elements of this enumeration that are based on universal time. The returned list is not referenced by this class and may therefore be safely manipulated by clients.

Returns:
the elements of this enumeration that are based on universal time.


Copyright © 2009. All Rights Reserved.