TV-Browser 3.3.3 API

devplugin
Interface Program

All Known Implementing Classes:
MutableProgram, OnDemandProgram

public interface Program

This interface provides a view of the program object in the host-application.

Author:
Martin Oberhauser

Field Summary
static byte DEFAULT_PROGRAM_IMPORTANCE
           
static int HIGHER_MEDIUM_MARK_PRIORITY
           
static byte HIGHER_MEDIUM_PROGRAM_IMPORTANCE
           
static int INFO_AUDIO_DESCRIPTION
          Audio description is available for people with limited vision.
static int INFO_AUDIO_DOLBY_DIGITAL_5_1
          dolby digital 5.1 audio
static int INFO_AUDIO_DOLBY_SURROUND
          dolby surround audio
static int INFO_AUDIO_MONO
          single channel audio
static int INFO_AUDIO_STEREO
          double channel audio
static int INFO_AUDIO_TWO_CHANNEL_TONE
          Audio channels with different languages are available.
static int INFO_CATEGORIE_ARTS
          This program is arts, theater, music
static int INFO_CATEGORIE_CHILDRENS
          This program is especially suitable for children
static int INFO_CATEGORIE_DOCUMENTARY
          This program is a documentary or a feature
static int INFO_CATEGORIE_MAGAZINE_INFOTAINMENT
          This program is a magazine or infotainment
static int INFO_CATEGORIE_MOVIE
          This program is a movie.
static int INFO_CATEGORIE_NEWS
          This program is News
static int INFO_CATEGORIE_OTHERS
          This program does not fit in any of the other categories
static int INFO_CATEGORIE_SERIES
          This program is a series.
static int INFO_CATEGORIE_SHOW
          This program is Show
static int INFO_CATEGORIE_SPORTS
          This program is sports
static int INFO_LIVE
          Program is live.
static int INFO_NEW
          This program has not been on air before.
static int INFO_ORIGINAL_WITH_SUBTITLE
          Original with subtitle.
static int INFO_SIGN_LANGUAGE
          This program has sign language
static int INFO_SUBTITLE_FOR_AURALLY_HANDICAPPED
          A subtitle for aurally handicapped.
static int INFO_VISION_16_TO_9
          video aspect ratio 16:9 (widescreen)
static int INFO_VISION_4_TO_3
          video aspect ratio 4:3
static int INFO_VISION_BLACK_AND_WHITE
          black and white, no color
static int INFO_VISION_HD
          video high definition quality
static int IS_VALID_STATE
           
static int LOWER_MEDIUM_MARK_PRIORITY
           
static byte LOWER_MEDIUM_PROGRAM_IMPORTANCE
           
static java.lang.String MARK_PRIORITY
          The key for the value of an action, to put the mark priority in
static int MAX_MARK_PRIORITY
           
static byte MAX_PROGRAM_IMPORTANCE
           
static int MEDIUM_MARK_PRIORITY
           
static byte MEDIUM_PROGRAM_IMPORTANCE
           
static int MIN_MARK_PRIORITY
           
static byte MIN_PROGRAM_IMPORTANCE
           
static int NO_MARK_PRIORITY
           
static int WAS_DELETED_STATE
           
static int WAS_UPDATED_STATE
           
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener listener)
          Adds a ChangeListener to the program.
 byte[] getBinaryField(ProgramFieldType type)
          Gets the value of a binary field from the program.
 Channel getChannel()
           
 Date getDate()
          get the date when the program starts.
 java.lang.String getDateString()
          get the date of this program as nicely formatted string
 java.lang.String getDescription()
          Gets the description of the program
 java.lang.String getEndTimeString()
          get the end time of this program as nicely formatted string
 int getFieldCount()
          Gets the number of fields this program has.
 java.util.Iterator<ProgramFieldType> getFieldIterator()
          Gets an iterator over the types of all fields this program has.
 int getHours()
          Gets the hour-component of the start time of the program.
 java.lang.String getID()
          Gets the ID of this program.
 int getInfo()
           
 int getIntField(ProgramFieldType type)
          Gets the value of a int field from the program.
 java.lang.String getIntFieldAsString(ProgramFieldType type)
          Gets the value of a int field as String.
 int getLength()
          Gets the length of this program in minutes.
 Marker[] getMarkerArr()
          Gets all Markers that have marked this program.
 int getMarkPriority()
          Gets the priority of the marking of this program.
 int getMinutes()
          Gets the minute-component of the start time of the program.
 int getProgramState()
          Returns the state of this program.
 java.lang.String getShortInfo()
           
 int getStartTime()
          Gets the the start time of the program in minutes after midnight.
 java.lang.String getTextField(ProgramFieldType type)
          Gets the value of a text field from the program.
 int getTimeField(ProgramFieldType type)
          Gets the value of a time field from the program.
 java.lang.String getTimeFieldAsString(ProgramFieldType type)
          Gets the value of a time field as String of the pattern "h:mm".
 java.lang.String getTimeString()
          get the start time of this program as nicely formatted string
 java.lang.String getTitle()
           
 java.lang.String getUniqueID()
          Gets the unique ID of this program.
 boolean hasFieldValue(ProgramFieldType type)
          checks if the given field has a non-null value. use this method if you don't need the value of the field, but only the knowledge about existence
 boolean isExpired()
          Gets whether this program is expired.
 boolean isOnAir()
          Gets whether this program is marked as "on air".
 void mark(Marker plugin)
          Marks the program for a plugin.
 void mark(Plugin javaPlugin)
          Marks the program for a Java plugin.
 void removeChangeListener(javax.swing.event.ChangeListener listener)
          Removes a ChangeListener from the program.
 void unmark(Marker plugin)
          Removes the marks from the program for a plugin.
 void unmark(Plugin javaPlugin)
          Removes the marks from the program for a Java plugin.
 void validateMarking()
          Informs the ChangeListeners for repainting if a Plugin uses more than one Icon for the Program.
 

Field Detail

INFO_VISION_BLACK_AND_WHITE

static final int INFO_VISION_BLACK_AND_WHITE
black and white, no color

See Also:
Constant Field Values

INFO_VISION_4_TO_3

static final int INFO_VISION_4_TO_3
video aspect ratio 4:3

See Also:
Constant Field Values

INFO_VISION_16_TO_9

static final int INFO_VISION_16_TO_9
video aspect ratio 16:9 (widescreen)

See Also:
Constant Field Values

INFO_AUDIO_MONO

static final int INFO_AUDIO_MONO
single channel audio

See Also:
Constant Field Values

INFO_AUDIO_STEREO

static final int INFO_AUDIO_STEREO
double channel audio

See Also:
Constant Field Values

INFO_AUDIO_DOLBY_SURROUND

static final int INFO_AUDIO_DOLBY_SURROUND
dolby surround audio

See Also:
Constant Field Values

INFO_AUDIO_DOLBY_DIGITAL_5_1

static final int INFO_AUDIO_DOLBY_DIGITAL_5_1
dolby digital 5.1 audio

See Also:
Constant Field Values

INFO_AUDIO_TWO_CHANNEL_TONE

static final int INFO_AUDIO_TWO_CHANNEL_TONE
Audio channels with different languages are available.

See Also:
Constant Field Values

INFO_SUBTITLE_FOR_AURALLY_HANDICAPPED

static final int INFO_SUBTITLE_FOR_AURALLY_HANDICAPPED
A subtitle for aurally handicapped. The subtitle is in the same language as the audio.

See Also:
INFO_ORIGINAL_WITH_SUBTITLE, Constant Field Values

INFO_LIVE

static final int INFO_LIVE
Program is live.

See Also:
Constant Field Values

INFO_ORIGINAL_WITH_SUBTITLE

static final int INFO_ORIGINAL_WITH_SUBTITLE
Original with subtitle. The subtitle is in another language than the audio.

See Also:
INFO_SUBTITLE_FOR_AURALLY_HANDICAPPED, Constant Field Values

INFO_CATEGORIE_MOVIE

static final int INFO_CATEGORIE_MOVIE
This program is a movie.

Since:
2.6/2.2.4
See Also:
Constant Field Values

INFO_CATEGORIE_SERIES

static final int INFO_CATEGORIE_SERIES
This program is a series.

Since:
2.6/2.2.4
See Also:
Constant Field Values

INFO_NEW

static final int INFO_NEW
This program has not been on air before.

Since:
2.6/2.2.4
See Also:
Constant Field Values

INFO_AUDIO_DESCRIPTION

static final int INFO_AUDIO_DESCRIPTION
Audio description is available for people with limited vision.

Since:
2.6/2.2.4
See Also:
Constant Field Values

INFO_CATEGORIE_NEWS

static final int INFO_CATEGORIE_NEWS
This program is News

Since:
2.6/2.2.4
See Also:
Constant Field Values

INFO_CATEGORIE_SHOW

static final int INFO_CATEGORIE_SHOW
This program is Show

Since:
2.6/2.2.4
See Also:
Constant Field Values

INFO_CATEGORIE_MAGAZINE_INFOTAINMENT

static final int INFO_CATEGORIE_MAGAZINE_INFOTAINMENT
This program is a magazine or infotainment

Since:
2.6/2.2.4
See Also:
Constant Field Values

INFO_VISION_HD

static final int INFO_VISION_HD
video high definition quality

Since:
2.7
See Also:
Constant Field Values

INFO_CATEGORIE_DOCUMENTARY

static final int INFO_CATEGORIE_DOCUMENTARY
This program is a documentary or a feature

Since:
2.7
See Also:
Constant Field Values

INFO_CATEGORIE_ARTS

static final int INFO_CATEGORIE_ARTS
This program is arts, theater, music

Since:
2.7
See Also:
Constant Field Values

INFO_CATEGORIE_SPORTS

static final int INFO_CATEGORIE_SPORTS
This program is sports

Since:
2.7
See Also:
Constant Field Values

INFO_CATEGORIE_CHILDRENS

static final int INFO_CATEGORIE_CHILDRENS
This program is especially suitable for children

Since:
2.7
See Also:
Constant Field Values

INFO_CATEGORIE_OTHERS

static final int INFO_CATEGORIE_OTHERS
This program does not fit in any of the other categories

Since:
2.7
See Also:
Constant Field Values

INFO_SIGN_LANGUAGE

static final int INFO_SIGN_LANGUAGE
This program has sign language

Since:
2.7
See Also:
Constant Field Values

IS_VALID_STATE

static final int IS_VALID_STATE
See Also:
Constant Field Values

WAS_UPDATED_STATE

static final int WAS_UPDATED_STATE
See Also:
Constant Field Values

WAS_DELETED_STATE

static final int WAS_DELETED_STATE
See Also:
Constant Field Values

NO_MARK_PRIORITY

static final int NO_MARK_PRIORITY
See Also:
Constant Field Values

MIN_MARK_PRIORITY

static final int MIN_MARK_PRIORITY
See Also:
Constant Field Values

LOWER_MEDIUM_MARK_PRIORITY

static final int LOWER_MEDIUM_MARK_PRIORITY
See Also:
Constant Field Values

MEDIUM_MARK_PRIORITY

static final int MEDIUM_MARK_PRIORITY
See Also:
Constant Field Values

HIGHER_MEDIUM_MARK_PRIORITY

static final int HIGHER_MEDIUM_MARK_PRIORITY
See Also:
Constant Field Values

MAX_MARK_PRIORITY

static final int MAX_MARK_PRIORITY
See Also:
Constant Field Values

DEFAULT_PROGRAM_IMPORTANCE

static final byte DEFAULT_PROGRAM_IMPORTANCE
See Also:
Constant Field Values

MIN_PROGRAM_IMPORTANCE

static final byte MIN_PROGRAM_IMPORTANCE
See Also:
Constant Field Values

LOWER_MEDIUM_PROGRAM_IMPORTANCE

static final byte LOWER_MEDIUM_PROGRAM_IMPORTANCE
See Also:
Constant Field Values

MEDIUM_PROGRAM_IMPORTANCE

static final byte MEDIUM_PROGRAM_IMPORTANCE
See Also:
Constant Field Values

HIGHER_MEDIUM_PROGRAM_IMPORTANCE

static final byte HIGHER_MEDIUM_PROGRAM_IMPORTANCE
See Also:
Constant Field Values

MAX_PROGRAM_IMPORTANCE

static final byte MAX_PROGRAM_IMPORTANCE
See Also:
Constant Field Values

MARK_PRIORITY

static final java.lang.String MARK_PRIORITY
The key for the value of an action, to put the mark priority in

Since:
2.6
See Also:
Constant Field Values
Method Detail

addChangeListener

void addChangeListener(javax.swing.event.ChangeListener listener)
Adds a ChangeListener to the program.

Parameters:
listener - the ChangeListener to add
See Also:
removeChangeListener(javax.swing.event.ChangeListener)

removeChangeListener

void removeChangeListener(javax.swing.event.ChangeListener listener)
Removes a ChangeListener from the program.

Parameters:
listener - the ChangeListener to remove
See Also:
addChangeListener(javax.swing.event.ChangeListener)

getID

java.lang.String getID()
Gets the ID of this program. This ID is unique for a certain date. This value becomes invalid when changing the application time zone.

Returns:
The ID of this program.

getUniqueID

java.lang.String getUniqueID()
Gets the unique ID of this program. In contrast to getID() this method returns an ID, which is unique for all programs. This value becomes invalid when changing the application time zone.

Returns:
An unique ID of this program.

getTitle

java.lang.String getTitle()

getShortInfo

java.lang.String getShortInfo()

getDescription

java.lang.String getDescription()
Gets the description of the program

Returns:
the description or null, if no description is available

getStartTime

int getStartTime()
Gets the the start time of the program in minutes after midnight.

Returns:
the start time.

getHours

int getHours()
Gets the hour-component of the start time of the program. This is local time (i.e. for the current time zone). This value becomes invalid when changing the time zone!

Returns:
the hour-component of the start time.

getMinutes

int getMinutes()
Gets the minute-component of the start time of the program. This is local time (i.e. for the current time zone). This value becomes invalid when changing the time zone!

Returns:
the minute-component of the start time.

getLength

int getLength()
Gets the length of this program in minutes.

Returns:
the length in minutes or -1, if the length is unknown.

getInfo

int getInfo()

getTimeString

java.lang.String getTimeString()
get the start time of this program as nicely formatted string

Returns:
the start time string

getDateString

java.lang.String getDateString()
get the date of this program as nicely formatted string

Returns:
the date string

getEndTimeString

java.lang.String getEndTimeString()
get the end time of this program as nicely formatted string

Returns:
the end time string
Since:
2.5.3

getChannel

Channel getChannel()

getDate

Date getDate()
get the date when the program starts.

Returns:
the date

getBinaryField

byte[] getBinaryField(ProgramFieldType type)
Gets the value of a binary field from the program.

Parameters:
type - The type of the wanted field. Must have a binary format.
Returns:
The value of the field or null, if there is no value for this field.

getTextField

java.lang.String getTextField(ProgramFieldType type)
Gets the value of a text field from the program.

Parameters:
type - The type of the wanted field. Must have a text format.
Returns:
The value of the field or null, if there is no value for this field.

getIntField

int getIntField(ProgramFieldType type)
Gets the value of a int field from the program.

Parameters:
type - The type of the wanted field. Must have a int format.
Returns:
The value of the field or -1, if there is no value for this field.

getIntFieldAsString

java.lang.String getIntFieldAsString(ProgramFieldType type)
Gets the value of a int field as String.

Parameters:
type - The type of the wanted field. Must have a int format.
Returns:
The value of the field as String or null, if there is no value for this field.

getTimeField

int getTimeField(ProgramFieldType type)
Gets the value of a time field from the program.

Parameters:
type - The type of the wanted field. Must have a time format.
Returns:
The value of the field or -1, if there is no value for this field.

getTimeFieldAsString

java.lang.String getTimeFieldAsString(ProgramFieldType type)
Gets the value of a time field as String of the pattern "h:mm".

Parameters:
type - The type of the wanted field. Must have a time format.
Returns:
The value of the field as String or null, if there is no value for this field.

getFieldCount

int getFieldCount()
Gets the number of fields this program has.

Returns:
the number of fields this program has.

getFieldIterator

java.util.Iterator<ProgramFieldType> getFieldIterator()
Gets an iterator over the types of all fields this program has.

Returns:
an iterator over ProgramFieldTypes.

mark

void mark(Plugin javaPlugin)
Marks the program for a Java plugin.

Parameters:
javaPlugin - The plugin to mark the program for.

unmark

void unmark(Plugin javaPlugin)
Removes the marks from the program for a Java plugin.

If the program wasn't marked for the plugin, nothing happens.

Parameters:
javaPlugin - The plugin to remove the mark for.

mark

void mark(Marker plugin)
Marks the program for a plugin.

Parameters:
plugin - The plugin to mark the program for.

unmark

void unmark(Marker plugin)
Removes the marks from the program for a plugin.

If the program wasn't marked for the plugin, nothing happens.

Parameters:
plugin - The plugin to remove the mark for.

isOnAir

boolean isOnAir()
Gets whether this program is marked as "on air".


getMarkerArr

Marker[] getMarkerArr()
Gets all Markers that have marked this program.


isExpired

boolean isExpired()
Gets whether this program is expired.


getProgramState

int getProgramState()
Returns the state of this program.

Returns:
The program state.
Since:
2.2

validateMarking

void validateMarking()
Informs the ChangeListeners for repainting if a Plugin uses more than one Icon for the Program.

Since:
2.5
See Also:
Plugin.getMarkIconsForProgram(Program)

getMarkPriority

int getMarkPriority()
Gets the priority of the marking of this program.

Returns:
The mark priority.
Since:
2.5.1

hasFieldValue

boolean hasFieldValue(ProgramFieldType type)
checks if the given field has a non-null value. use this method if you don't need the value of the field, but only the knowledge about existence

Parameters:
type - field type
Returns:
field is set
Since:
3.0

TV-Browser 3.3.3 API

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