edu.nrao.sss.model.project.scheduling
Class SchedTime

java.lang.Object
  extended by edu.nrao.sss.model.project.scheduling.SchedTime
All Implemented Interfaces:
Comparable<SchedTime>

Deprecated. Use LocalSiderealTime, JulianDate, and the other time classes in edu.nrao.sss.measure. Represents an LST day number and hour for the purposes of scheduling.

@Deprecated
public class SchedTime
extends Object
implements Comparable<SchedTime>

Author:
slovelan

Field Summary
static float HOURS_PER_LST_DAY
          Deprecated.  
 
Constructor Summary
SchedTime()
          Deprecated. Constructs an instance of this SchedTime initialized to the current time.
SchedTime(double hours, int day)
          Deprecated. Constructs an instance of this SchedTime initialized to the indicated LST day and hour.
SchedTime(SchedTime copy)
          Deprecated. Constructs an instance of this SchedTime initialized to the same LST day and hour as the argument.
 
Method Summary
 SchedTime add(SchedTime otherTime)
          Deprecated. Returns a SchedTime that is the sum of the argument and this SchedTime.
 SchedTime add(TimeDuration td)
          Deprecated. Returns a SchedTime that is the sum of the argument and this SchedTime.
 int compareTo(SchedTime otherTime)
          Deprecated.  
static long convertHoursToSeconds(double hours)
          Deprecated.  
static double convertSecondsToHours(long seconds)
          Deprecated.  
static double currentLSTTime()
          Deprecated. Returns the current LST time.
 boolean equals(SchedTime other)
          Deprecated.  
static SchedTime fromString(String str)
          Deprecated. Parses a string in the format used by Barry and returns a corresponding schedule time or null if there is no such time.
static SchedTime fromXml(Reader reader)
          Deprecated. Returns the SchedTime constructed from a reader or null if it is not possible to determine the corresponding time.
static SchedTime fromXml(String xmlString)
          Deprecated. Returns a SchedTime from an xml representation or null if it is not possible to parse the xml.
 int getDay()
          Deprecated. Returns the LST day number for the schedule.
 double getHour()
          Deprecated. Returns the hour.
static double getLSTTime(Date theDate)
          Deprecated. Returns the LST time corresponding to the passed in date.
static double getLSTTime(double julianDays)
          Deprecated. Returns the LST time corresponding to the Julian time.
static double getLSTTime(long milliseconds)
          Deprecated. Returns the LST time corresponding to the indicated number of milliseconds.
 int hashCode()
          Deprecated.  
static double modifiedJulianDay(long milliseconds)
          Deprecated. Returns the modified julian day corresponding to the given number of milliseconds.
static double modifiedJulianDayNow()
          Deprecated. Returns the current modified julian day.
 void setDay(int lstDayNumber)
          Deprecated. Sets the LST day number in the schedule.
 void setHour(double hour)
          Deprecated. Sets the hour
 TimeDuration subtract(SchedTime otherTime)
          Deprecated. Returns a TimeDuration that represents the time difference between this SchedTime and the argument.
 String toString()
          Deprecated. Returns a text representation of this schedule entry.
 String toSummaryString()
          Deprecated. Returns a brief word description of this scheduling time.
 String toXml()
          Deprecated. Returns a string containing the xml representation of this schedule time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HOURS_PER_LST_DAY

public static final float HOURS_PER_LST_DAY
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

SchedTime

public SchedTime()
Deprecated. 
Constructs an instance of this SchedTime initialized to the current time.


SchedTime

public SchedTime(double hours,
                 int day)
Deprecated. 
Constructs an instance of this SchedTime initialized to the indicated LST day and hour.


SchedTime

public SchedTime(SchedTime copy)
Deprecated. 
Constructs an instance of this SchedTime initialized to the same LST day and hour as the argument.

Parameters:
copy - a SchedTime representing a scheduling time to copy.
Method Detail

modifiedJulianDay

public static double modifiedJulianDay(long milliseconds)
Deprecated. 
Returns the modified julian day corresponding to the given number of milliseconds.

Parameters:
milliseconds - a time quantity.
Returns:
the modified julian day number corresponding to the given number of milliseconds.

modifiedJulianDayNow

public static double modifiedJulianDayNow()
Deprecated. 
Returns the current modified julian day.

Returns:
the current modified julian day.

currentLSTTime

public static double currentLSTTime()
Deprecated. 
Returns the current LST time.

Returns:
the current LST time.

getLSTTime

public static double getLSTTime(Date theDate)
Deprecated. 
Returns the LST time corresponding to the passed in date.

Parameters:
theDate - a Date for which an LST time is wanted.
Returns:
the LST time corresponding to the date argument.

getLSTTime

public static double getLSTTime(long milliseconds)
Deprecated. 
Returns the LST time corresponding to the indicated number of milliseconds.

Parameters:
milliseconds - a time represented in milliseconds.
Returns:
the LST time corresponding to the indicated number of milliseconds.

getLSTTime

public static double getLSTTime(double julianDays)
Deprecated. 
Returns the LST time corresponding to the Julian time.

Returns:
the LST time corresponding to the Julian time.

convertHoursToSeconds

public static long convertHoursToSeconds(double hours)
Deprecated. 

convertSecondsToHours

public static double convertSecondsToHours(long seconds)
Deprecated. 

getHour

public double getHour()
Deprecated. 
Returns the hour.

Returns:
the hour.

setHour

public void setHour(double hour)
Deprecated. 
Sets the hour

Parameters:
hour - the hour for this time.

setDay

public void setDay(int lstDayNumber)
Deprecated. 
Sets the LST day number in the schedule.

Parameters:
lstDayNumber - the LST day number for the schedule.

getDay

public int getDay()
Deprecated. 
Returns the LST day number for the schedule.

Returns:
the lstDayNumber for the schedule.

add

public SchedTime add(TimeDuration td)
Deprecated. 
Returns a SchedTime that is the sum of the argument and this SchedTime.

Parameters:
td - a TimeDuration indicating the length of time this schedule time needs to be increased.
Returns:
the sum of this SchedTime and the argument.

add

public SchedTime add(SchedTime otherTime)
Deprecated. 
Returns a SchedTime that is the sum of the argument and this SchedTime.

Parameters:
otherTime - the SchedTime that should be added to this one.
Returns:
the sum of this SchedTime and the argument.

subtract

public TimeDuration subtract(SchedTime otherTime)
Deprecated. 
Returns a TimeDuration that represents the time difference between this SchedTime and the argument.

Parameters:
otherTime - the SchedTime that should be subtracted from this one.
Returns:
the difference of this SchedTime and the argument.
Throws:
IllegalArgumentException - if the parameter is larger than this SchedTime.

equals

public boolean equals(SchedTime other)
Deprecated. 

compareTo

public int compareTo(SchedTime otherTime)
Deprecated. 
Specified by:
compareTo in interface Comparable<SchedTime>

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class Object

toXml

public String toXml()
Deprecated. 
Returns a string containing the xml representation of this schedule time.

Returns:
a String containing the xml representation of this schedule time.

fromXml

public static SchedTime fromXml(Reader reader)
Deprecated. 
Returns the SchedTime constructed from a reader or null if it is not possible to determine the corresponding time.

Parameters:
reader - a Reader containing schedule time information.
Returns:
the corresponding SchedTime.

fromXml

public static SchedTime fromXml(String xmlString)
Deprecated. 
Returns a SchedTime from an xml representation or null if it is not possible to parse the xml.

Parameters:
xmlString - a String containing the xml representation of a SchedTime
Returns:
the SchedTime corresponding to the xml representation.

toString

public String toString()
Deprecated. 
Returns a text representation of this schedule entry. The default form of the text is XML. However, if anything goes wrong during the conversion to XML, an alternate, and much abbreviated, form will be returned.

Overrides:
toString in class Object
Returns:
a text representation of this schedule entry.
See Also:
toSummaryString()

toSummaryString

public String toSummaryString()
Deprecated. 
Returns a brief word description of this scheduling time.

Returns:
a brief word description of this scheduling time.

fromString

public static SchedTime fromString(String str)
Deprecated. 
Parses a string in the format used by Barry and returns a corresponding schedule time or null if there is no such time.

Parameters:
str - a String with the day and hour separated by the word "at".
Returns:
the schedule time corresponding to the string or null if there is no such time.


Copyright © 2009. All Rights Reserved.