bbc.rd.tvanytime.dvb
Class TVAFragmentManager

java.lang.Object
  extended by bbc.rd.tvanytime.dvb.TVAFragmentManager

public class TVAFragmentManager
extends java.lang.Object

Handles TVA fragments. Parses fragments and updates/adds appropriate parts to the TVAnytime table objects contained in this class.

Version:
1.0
Author:
Tristan Ferne, BBC Research & Development, March 2003

Constructor Summary
TVAFragmentManager()
          Constructor.
 
Method Summary
 void addContentReferencingFragment(java.io.File fragment)
          Adds ContentReferencing fragment.
 void addGroupInformationFragment(java.io.File fragment)
          Adds GroupInformation fragment.
 void addProgramInformationFragment(java.io.File fragment)
          Adds ProgramInformation fragment.
 void addProgramLocationFragment(java.io.File fragment)
          Adds ProgramLocation fragment.
 void addServiceInformationFragment(java.io.File fragment)
          Adds ServiceInformation fragment.
 ContentReferencingTable getContentReferencingTable()
          Get ContentReferencingTable.
 GroupInformationTable getGroupInformationTable()
          Get GroupInformationTable.
 ProgramInformationTable getProgramInformationTable()
          Get ProgramInformationTable.
 ProgramLocationTable getProgramLocationTable()
          Get ProgramLocationTable.
 ServiceInformationTable getServiceInformationTable()
          Get ServiceInformationTable.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TVAFragmentManager

public TVAFragmentManager()
Constructor. Creates tables and parser.

Method Detail

addProgramInformationFragment

public void addProgramInformationFragment(java.io.File fragment)
Adds ProgramInformation fragment. If it includes new ProgramInformation elements then adds them, if it contains updates then it just replaces the old ProgramInformation elements (using CRID to test for equality).

Parameters:
fragment - File containing TVA fragment.

addGroupInformationFragment

public void addGroupInformationFragment(java.io.File fragment)
Adds GroupInformation fragment. If it includes new GroupInformation elements then adds them, if it contains updates then it just replaces the old GroupInformation elements (using CRID to test for equality).

Parameters:
fragment - File containing TVA fragment.

addServiceInformationFragment

public void addServiceInformationFragment(java.io.File fragment)
Adds ServiceInformation fragment. If it includes new ServiceInformation elements then adds them, if it contains updates then it just replaces the old ServiceInformation elements (using CRID to test for equality).

Parameters:
fragment - File containing TVA fragment.

addContentReferencingFragment

public void addContentReferencingFragment(java.io.File fragment)
Adds ContentReferencing fragment. If it includes new Result elements then adds them, if it contains updates then it just replaces the old Result elements (using CRID to test for equality).

Parameters:
fragment - File containing TVA fragment.

addProgramLocationFragment

public void addProgramLocationFragment(java.io.File fragment)
Adds ProgramLocation fragment. TVAFragmentManager has a ProgramLocation table that will include a Schedule object for each service that is discovered while parsing. Assumes that fragment ony contains a single Schedule element for a single service. If a fragment includes new ScheduleEvent elements then it adds them, if it contains updates then it removes any existing ScheduleEvents that are overlapped by the new ScheduleEvent. means that: The new ScheduleEvent's start time is >= an existing event's start time AND start time < the event's end time OR The new ScheduleEvent's end time is > an existing start time AND end time <= existing end time. OR The new ScheduleEvent's start time is < an existing start time AND end time > existing end time. Note that ScheduleEvents within Schedules are not guaranteed to be sorted.

Parameters:
fragment - File containing TVA fragment.

getProgramInformationTable

public ProgramInformationTable getProgramInformationTable()
Get ProgramInformationTable.


getGroupInformationTable

public GroupInformationTable getGroupInformationTable()
Get GroupInformationTable.


getProgramLocationTable

public ProgramLocationTable getProgramLocationTable()
Get ProgramLocationTable.


getServiceInformationTable

public ServiceInformationTable getServiceInformationTable()
Get ServiceInformationTable.


getContentReferencingTable

public ContentReferencingTable getContentReferencingTable()
Get ContentReferencingTable.


main

public static void main(java.lang.String[] args)