de.unikassel.android.sdcframework.data
Class WeeklySchedule

Package class diagram package WeeklySchedule
java.lang.Object
  extended by de.unikassel.android.sdcframework.data.WeeklySchedule
All Implemented Interfaces:
SerializableData

public class WeeklySchedule
extends Object
implements SerializableData

A weekly runtime schedule for the service.


Field Summary
private  WeekdaySchedule[] schedule
          The schedule.
 
Constructor Summary
WeeklySchedule()
          Constructor
WeeklySchedule(WeekdaySchedule[] schedule)
          Constructor
 
Method Summary
 boolean equals(Object o)
           
 WeekdaySchedule[] getSchedule()
          Getter for the schedule.
 WeekdaySchedule getScheduleForWeekday(Weekday day)
          Getter for the schedule.
 boolean isValid()
          Test method for a valid schedule.
 int size()
          Does return the size of the schedule as total count of schedule entries.
 String toString()
           
 String toXML()
          Serialization from the type to it's XML representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

schedule

private final WeekdaySchedule[] schedule
The schedule.

Constructor Detail

WeeklySchedule

public WeeklySchedule()
Constructor


WeeklySchedule

public WeeklySchedule(WeekdaySchedule[] schedule)
Constructor

Parameters:
schedule -
Method Detail

getSchedule

public WeekdaySchedule[] getSchedule()
Getter for the schedule.

Returns:
the schedule

getScheduleForWeekday

public WeekdaySchedule getScheduleForWeekday(Weekday day)
Getter for the schedule.

Parameters:
day - the weekday
Returns:
the schedule

toXML

public String toXML()
             throws Exception
Description copied from interface: SerializableData
Serialization from the type to it's XML representation

Specified by:
toXML in interface SerializableData
Returns:
the XML representation of the type if successful, null otherwise
Throws:
Exception - if the schema for the object is not valid

toString

public final String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

size

public int size()
Does return the size of the schedule as total count of schedule entries.

Returns:
the count of schedule entries

isValid

public boolean isValid()
Test method for a valid schedule.

Returns:
true if valid, false otherwise.