tvbrowser.core.data

## Class OnDemandDayProgramFile

- java.lang.Object
- - tvbrowser.core.data.OnDemandDayProgramFile

-     public class OnDemandDayProgramFile
      extends java.lang.Object

  An encapsulated access on a file containing TV data that allows an access of single data fields on demand.
  Author:
    Til Schneider, www.murfman.de

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OnDemandDayProgramFile(java.io.File file, Date date, Channel channel)`
    `OnDemandDayProgramFile(java.io.File file, MutableChannelDayProgram dayProgram)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `calculateTimeLimits()` Calculates the time limits of this file.
    `MutableChannelDayProgram` | `getDayProgram()`
    `boolean` | `isTimeLimitationData()` Gets if this file data file is loaded for data base.
    `void` | `loadDayProgram(boolean update)` Loads the day program for on demand access.
    `(package private) java.lang.Object` | `loadFieldValue(long position, ProgramFieldType type)`
    `void` | `saveDayProgram()` Saves the day program to the on demand data file.
    `void` | `setValid(boolean valid)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OnDemandDayProgramFile

          public OnDemandDayProgramFile(java.io.File file,
                                Date date,
                                Channel channel)

    - #### OnDemandDayProgramFile

          public OnDemandDayProgramFile(java.io.File file,
                                MutableChannelDayProgram dayProgram)

  - ### Method Detail

    - #### setValid

          public void setValid(boolean valid)

    - #### getDayProgram

          public MutableChannelDayProgram getDayProgram()

    - #### loadDayProgram

          public void loadDayProgram(boolean update)
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException

      Loads the day program for on demand access.
      Parameters:
        `update` - `True` if this is called from TV data update, `false` otherwise.
      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`

    - #### saveDayProgram

          public void saveDayProgram()
                              throws java.io.IOException

      Saves the day program to the on demand data file.
      Throws:
        `java.io.IOException`

    - #### loadFieldValue

          java.lang.Object loadFieldValue(long position,
                                        ProgramFieldType type)
                                    throws java.io.IOException,
                                           java.lang.ClassNotFoundException

      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`

    - #### isTimeLimitationData

          public boolean isTimeLimitationData()

      Gets if this file data file is loaded for data base.
      Returns:
        `True` if this data is used in program table, `false` if this data is used for data update.
      Since:
        2.2.4/2.6

    - #### calculateTimeLimits

          public void calculateTimeLimits()

      Calculates the time limits of this file.
      Since:
        2.2.4/2.6

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)