org.gnu6.six
Class schedule

java.lang.Object
  |
  +--org.gnu6.six.schedule

public class schedule
extends java.lang.Object

This class handles the part of an mlist that contains the schedule, e.g.,

 
   <schedule>
       <TimeZone zone="PST" > 
           <everyday>
                    <time start="4:0:0 AM" end="7:15:0 PM" >
           </everyday>
            <day date="09/17/2002">
                    <time start="5:0:0 PM" end="7:15:0 PM" >
            </day>
              <holidays>
                 <Monday>
              </holidays>
      </schedule>
 


Field Summary
static java.lang.String country
           
static java.lang.String DATE
           
static java.lang.String DAY
           
static java.lang.String EVERYDAY
           
static java.lang.String FILE
           
static java.lang.String HOLIDAYS
           
 boolean isFridayHoliday
           
 boolean isMondayHoliday
           
 boolean isSaturdayHoliday
           
 boolean isSundayHoliday
           
 boolean isThursdayHoliday
           
 boolean isTuesdayHoliday
           
 boolean isWednesdayHoliday
           
static java.lang.String language
           
 java.lang.String Location
           
static java.lang.String LOG
           
 java.lang.String LogFile
           
 java.lang.String LogStatus
           
static java.lang.String MLIST
           
static java.lang.String SCHEDULE
           
static java.lang.String STATUS
           
static java.lang.String TIME
           
static java.lang.String TIME_END
           
static java.lang.String TIME_START
           
 java.lang.String TimeZone
           
static java.lang.String TIMEZONE
           
 
Constructor Summary
schedule(java.lang.String mlistLocation)
          Creates an insatnce of class schedule corresponding to the schedule defined in the specified mlist.
 
Method Summary
 java.util.Vector getDaySchedule(java.util.Date myDay)
          getDaySchedule returns Vector of Time-elements with start and end time values.
 java.util.Vector getHolidays()
          getHolidays returns Vector of Date elements for holidays.
 java.lang.String getLogFile()
          Returns the log-file defined in mlist with the given schedule.
 java.lang.String getLogStatus()
           
 java.util.Hashtable getSpecialDays()
          Returns a hashtable of special days.
 java.util.Vector getTimeList()
          Returns a vector which entries are Time classes.
 boolean isScheduleMissing()
          Returns true if the schedule is not defined in mlist.
 java.util.Vector sortTime(java.util.Vector tm)
          Sorts a vector whose entries are Time classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isMondayHoliday

public boolean isMondayHoliday

isTuesdayHoliday

public boolean isTuesdayHoliday

isWednesdayHoliday

public boolean isWednesdayHoliday

isThursdayHoliday

public boolean isThursdayHoliday

isFridayHoliday

public boolean isFridayHoliday

isSaturdayHoliday

public boolean isSaturdayHoliday

isSundayHoliday

public boolean isSundayHoliday

TimeZone

public java.lang.String TimeZone

Location

public java.lang.String Location

LogFile

public java.lang.String LogFile

LogStatus

public java.lang.String LogStatus

language

public static final java.lang.String language
See Also:
Constant Field Values

country

public static final java.lang.String country
See Also:
Constant Field Values

SCHEDULE

public static final java.lang.String SCHEDULE
See Also:
Constant Field Values

MLIST

public static final java.lang.String MLIST
See Also:
Constant Field Values

EVERYDAY

public static final java.lang.String EVERYDAY
See Also:
Constant Field Values

TIMEZONE

public static final java.lang.String TIMEZONE
See Also:
Constant Field Values

TIME

public static final java.lang.String TIME
See Also:
Constant Field Values

TIME_START

public static final java.lang.String TIME_START
See Also:
Constant Field Values

TIME_END

public static final java.lang.String TIME_END
See Also:
Constant Field Values

DAY

public static final java.lang.String DAY
See Also:
Constant Field Values

DATE

public static final java.lang.String DATE
See Also:
Constant Field Values

HOLIDAYS

public static final java.lang.String HOLIDAYS
See Also:
Constant Field Values

LOG

public static final java.lang.String LOG
See Also:
Constant Field Values

FILE

public static final java.lang.String FILE
See Also:
Constant Field Values

STATUS

public static final java.lang.String STATUS
See Also:
Constant Field Values
Constructor Detail

schedule

public schedule(java.lang.String mlistLocation)
Creates an insatnce of class schedule corresponding to the schedule defined in the specified mlist.

Method Detail

isScheduleMissing

public boolean isScheduleMissing()
Returns true if the schedule is not defined in mlist.

Returns:
true if the schedule is not defined

getTimeList

public java.util.Vector getTimeList()
Returns a vector which entries are Time classes.

Returns:
a vector of Time classes
See Also:
Time.Time(String,String,String)

getSpecialDays

public java.util.Hashtable getSpecialDays()
Returns a hashtable of special days.

Returns:
a hashtable that has days with specific schedules

getHolidays

public java.util.Vector getHolidays()
getHolidays returns Vector of Date elements for holidays.

Returns:
a vector of Date elements for holidays defined in a schedule.

getDaySchedule

public java.util.Vector getDaySchedule(java.util.Date myDay)
getDaySchedule returns Vector of Time-elements with start and end time values.

Returns:
a vector of Time classes that define start and end time values
See Also:
Time.Time(String,String,String)

sortTime

public java.util.Vector sortTime(java.util.Vector tm)
Sorts a vector whose entries are Time classes. It combines overlapping time intervals in one.

Parameters:
tm - a vector of Time entries
Returns:
an ordered vector of Time entries. The earliest time goes first etc.
See Also:
Time.Time(String,String,String)

getLogFile

public java.lang.String getLogFile()
Returns the log-file defined in mlist with the given schedule.

Returns:
a location of a log-file. If there is no log-file defined, then it returns "six.log"

getLogStatus

public java.lang.String getLogStatus()