tvbrowser.core

## Class TvDataBase

- java.lang.Object
- - tvbrowser.core.TvDataBase

-     public class TvDataBase
      extends java.lang.Object

  Author:
    Til Schneider, www.murfman.de

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_DATA_LIFESPAN`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTvDataListener(TvDataBaseListener listener)`
    `void` | `checkTvDataInventory(int lifespan)`
    `void` | `close(boolean log)`
    `boolean` | `dataAvailable(Date date)` Returns true, if TV data is available on disk for the given date.
    `void` | `deleteExpiredFiles(int lifespan, boolean informPlugins)` Deletes expired tvdata files older then lifespan days.
    `ChannelDayProgram` | `getDayProgram(Date date, Channel channel)`
    `protected static java.lang.String` | `getDayProgramKey(Date date, Channel channel)`
    `static TvDataBase` | `getInstance()`
    `Date` | `getMaxSupportedDate()` the maximum date any part of TV-Browser needs to be able to handle
    `void` | `handleTvBrowserStartFinished()` Handles the pending plugin information if it is to do after TV-Browser start is finished.
    `boolean` | `isDayProgramAvailable(Date date, Channel channel)`
    `void` | `reCalculateTvData(Channel channel, Date date)` Checks all TV-Data for missing length.
    `void` | `removeTvDataListener(TvDataBaseListener listener)`
    `(package private) void` | `sendNewProgramsToTvDataListener()`
    `void` | `setDayProgram(MutableChannelDayProgram prog)`
    `void` | `setDayProgramWasChangedByPlugin(Date date, Channel channel)`
    `void` | `unsubscribeChannels(Channel[] channels)`
    `protected void` | `updateTvDataBase()` Updates the TV data base.

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

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

- - ### Field Detail

    - #### DEFAULT_DATA_LIFESPAN

          public static final int DEFAULT_DATA_LIFESPAN

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getInstance

          public static TvDataBase getInstance()

    - #### updateTvDataBase

          protected void updateTvDataBase()

      Updates the TV data base.
      Since:
        2.2.2/2.5.1

    - #### checkTvDataInventory

          public void checkTvDataInventory(int lifespan)

    - #### handleTvBrowserStartFinished

          public void handleTvBrowserStartFinished()

      Handles the pending plugin information if it is to do after TV-Browser start is finished.

      Since:
        2.7.2

    - #### close

          public void close(boolean log)

    - #### addTvDataListener

          public void addTvDataListener(TvDataBaseListener listener)

    - #### removeTvDataListener

          public void removeTvDataListener(TvDataBaseListener listener)

    - #### getDayProgram

          public ChannelDayProgram getDayProgram(Date date,
                                        Channel channel)

    - #### setDayProgramWasChangedByPlugin

          public void setDayProgramWasChangedByPlugin(Date date,
                                             Channel channel)

    - #### reCalculateTvData

          public void reCalculateTvData(Channel channel,
                               Date date)

      Checks all TV-Data for missing length.
      Parameters:
        `days` - The number of days to recalculate
        `progressMonitor` - display status of the recalculation

    - #### setDayProgram

          public void setDayProgram(MutableChannelDayProgram prog)

    - #### getDayProgramKey

          protected static java.lang.String getDayProgramKey(Date date,
                                          Channel channel)

    - #### isDayProgramAvailable

          public boolean isDayProgramAvailable(Date date,
                                      Channel channel)

    - #### deleteExpiredFiles

          public void deleteExpiredFiles(int lifespan,
                                boolean informPlugins)

      Deletes expired tvdata files older then lifespan days.
      Parameters:
        `lifespan` - The number of days to delete from the past
        `informPlugins` - If the plugins should be informed about the deleting.

    - #### dataAvailable

          public boolean dataAvailable(Date date)

      Returns true, if TV data is available on disk for the given date.
      Parameters:
        `date` - The date to check.
      Returns:
        if the data is available.

    - #### unsubscribeChannels

          public void unsubscribeChannels(Channel[] channels)

    - #### getMaxSupportedDate

          public Date getMaxSupportedDate()

      the maximum date any part of TV-Browser needs to be able to handle
      Returns:
        today plus 4 weeks

    - #### sendNewProgramsToTvDataListener

          void sendNewProgramsToTvDataListener()

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