bbc.rd.tvanytime.programLocation
Class Schedule

java.lang.Object
  extended by bbc.rd.tvanytime.programLocation.Schedule
All Implemented Interfaces:
java.lang.Cloneable

public class Schedule
extends java.lang.Object
implements java.lang.Cloneable

Schedule: Represents the a Schedule object

Version:
1.0 Modified 26/4/04 T.Ferne: Added start and end times.
Author:
Tim Sargeant, BBC Research & Development, April 2002

Constructor Summary
Schedule()
          Constructor for objects of type Schedule
Schedule(java.lang.String serviceID)
          Constructor for objects of type Schedule with required fields
Schedule(java.lang.String serviceID, java.util.Date startTime, java.util.Date endTime)
          Constructor for objects of type Schedule with required fields
Schedule(java.lang.String serviceID, ScheduleEvent scheduleEvent)
          Constructor for objects of type Schedule with required fields
 
Method Summary
 void addScheduleEvent(ScheduleEvent scheduleEvent)
          Adds an ScheduleEvent object
 java.lang.Object clone()
          Clones itself.
 java.util.Date getEnd()
          Get end date for this schedule.
 int getNumScheduleEvents()
          Get the number of events in this Schedule
 ScheduleEvent getScheduleEvent(int index)
          Gets an Event object
 java.lang.String getServiceID()
          Gets the service ID of this Schedule
 java.util.Date getStart()
          Get start date for this schedule.
 void removeAll()
          Removes all Event objects
 void removeScheduleEvent(ScheduleEvent scheduleEvent)
          Removes a ScheduleEvent object
 void setEnd(java.util.Date endTime)
          Set end date for this schedule.
 void setServiceID(java.lang.String serviceID)
          Sets the ServiceID
 void setStart(java.util.Date startTime)
          Set start date for this schedule.
 java.lang.String toString()
          Returns string representation of this object.
 java.lang.String toString(int indent)
          Returns string representation of this object.
 java.lang.String toXML()
          Returns XML representation of this object.
 java.lang.String toXML(int indent)
          Returns XML representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schedule

public Schedule()
Constructor for objects of type Schedule


Schedule

public Schedule(java.lang.String serviceID,
                ScheduleEvent scheduleEvent)
Constructor for objects of type Schedule with required fields

Parameters:
serviceID - a tva:IDRefType
event - the Event object

Schedule

public Schedule(java.lang.String serviceID)
Constructor for objects of type Schedule with required fields

Parameters:
serviceID - a tva:IDRefType

Schedule

public Schedule(java.lang.String serviceID,
                java.util.Date startTime,
                java.util.Date endTime)
Constructor for objects of type Schedule with required fields

Parameters:
serviceID - a tva:IDRefType
Method Detail

getServiceID

public java.lang.String getServiceID()
Gets the service ID of this Schedule

Returns:
serviceID

getStart

public java.util.Date getStart()
Get start date for this schedule.

Returns:
Start date.

getEnd

public java.util.Date getEnd()
Get end date for this schedule.

Returns:
End date.

getNumScheduleEvents

public int getNumScheduleEvents()
Get the number of events in this Schedule

Returns:
number of event objects

getScheduleEvent

public ScheduleEvent getScheduleEvent(int index)
Gets an Event object

Parameters:
index - the index to the ScheduleEvent object
Returns:
the ScheduleEvent object

addScheduleEvent

public void addScheduleEvent(ScheduleEvent scheduleEvent)
Adds an ScheduleEvent object

Parameters:
event - the ScheduleEvent object

removeScheduleEvent

public void removeScheduleEvent(ScheduleEvent scheduleEvent)
Removes a ScheduleEvent object

Parameters:
scheduleEvent - The ScheduleEvent object to be removed.

setServiceID

public void setServiceID(java.lang.String serviceID)
Sets the ServiceID

Parameters:
serviceID - the service ID of this Schedule object

setStart

public void setStart(java.util.Date startTime)
Set start date for this schedule.

Parameters:
startTime - Start date.

setEnd

public void setEnd(java.util.Date endTime)
Set end date for this schedule.

Parameters:
endTime - End date.

removeAll

public void removeAll()
Removes all Event objects


toXML

public java.lang.String toXML()
Returns XML representation of this object.

Returns:
XML representation of this object.

toXML

public java.lang.String toXML(int indent)
Returns XML representation of this object.

Parameters:
indent - number of tabs to put before the string.
Returns:
XML representation of this object.

toString

public java.lang.String toString()
Returns string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
string representation of this object.

toString

public java.lang.String toString(int indent)
Returns string representation of this object.

Parameters:
indent - number of tabs to put before the string.
Returns:
string representation of this object.

clone

public java.lang.Object clone()
Clones itself.

Overrides:
clone in class java.lang.Object
Returns:
A copy of itself.