grs.spice
Class ClockConverterBean

java.lang.Object
  |
  +--java.util.Observable
        |
        +--grs.spice.TimeBean
              |
              +--grs.spice.ClockConverterBean
Direct Known Subclasses:
ClockConverterApp

public class ClockConverterBean
extends TimeBean

Performs conversions of time units using SPICE Java Native Interface. To use: set System properties as described in grs.spice.TimeBean. Set the time using the setTime() method, retrieve converted values by calling the appropriate methods.

Version:
$Revision: 1.3 $
Author:
$Author: guym $

Field Summary
static String UNIT_CEB
           
static String UNIT_ET
           
static String UNIT_FINE
           
static String UNIT_LSUN
           
static String UNIT_SCLK
           
static String UNIT_TICKS
           
static String UNIT_UTC
           
static String UNIT_ZONE
           
 
Fields inherited from class grs.spice.TimeBean
localTime, longTime, scId, threePrec, UTC, utcTime
 
Constructor Summary
ClockConverterBean(Connection conn)
          Re-establish the connection if necessary.
 
Method Summary
 void destroy()
          Close database connections
 String getCEB()
          Get the input as CEB value.
 String getCEBFine()
          Get the input as CEB SPLIT value.
 String getET()
          Get the input as Ephemeris Time value.
 String getLSun()
          Get Mars's longitude of the sun in degrees.
 String getSCLK()
          Get the input as SCLK value in seconds.
 String getTicks()
          Get the input as SCLK tick values.
 String getUTC()
          Get the input as UTC value.
 String getZone()
          Get the input as local time value.
 void setTime(String time, String value)
          Set the time and perform conversions.
 
Methods inherited from class grs.spice.TimeBean
getCurrentSCLK
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIT_ZONE

public static final String UNIT_ZONE
See Also:
Constant Field Values

UNIT_UTC

public static final String UNIT_UTC
See Also:
Constant Field Values

UNIT_ET

public static final String UNIT_ET
See Also:
Constant Field Values

UNIT_TICKS

public static final String UNIT_TICKS
See Also:
Constant Field Values

UNIT_SCLK

public static final String UNIT_SCLK
See Also:
Constant Field Values

UNIT_CEB

public static final String UNIT_CEB
See Also:
Constant Field Values

UNIT_FINE

public static final String UNIT_FINE
See Also:
Constant Field Values

UNIT_LSUN

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

ClockConverterBean

public ClockConverterBean(Connection conn)
                   throws SQLException
Re-establish the connection if necessary.

Throws:
SpiceException - if the spice kernels cannot be loaded
SQLException - if cannot connect to the oracle server
Method Detail

setTime

public void setTime(String time,
                    String value)
             throws ParseException,
                    NumberFormatException,
                    SQLException,
                    SpiceException
Set the time and perform conversions.

Parameters:
time - one of the named String constants above
value - should be decimal or utc string form like "z yyyy MMM dd HH:mm:ss.SSS"
ParseException
NumberFormatException
SQLException
SpiceException

getUTC

public String getUTC()
Get the input as UTC value.

Returns:
The input converted to UTC

getET

public String getET()
Get the input as Ephemeris Time value.

Returns:
The input converted to E.T.

getTicks

public String getTicks()
Get the input as SCLK tick values.

Returns:
The input converted to SCLK ticks.

getSCLK

public String getSCLK()
Get the input as SCLK value in seconds.

Returns:
The input converted to SCLK seconds.

getZone

public String getZone()
Get the input as local time value.

Returns:
The input converted to the local time zone.

getCEB

public String getCEB()
Get the input as CEB value.

Returns:
The input converted to CEB time.

getCEBFine

public String getCEBFine()
Get the input as CEB SPLIT value.

Returns:
The input converted to CEB SPLIT time.

getLSun

public String getLSun()
Get Mars's longitude of the sun in degrees.

Returns:
degrees

destroy

public void destroy()
Close database connections



2001 Mars Odyssey Gamma Ray Spectrometer Team