TV-Browser 2.7.5 API

util.program
Class ProgramUtilities

java.lang.Object
  extended by util.program.ProgramUtilities

public class ProgramUtilities
extends Object

Provides utilities for program stuff.

Author:
René Mach

Constructor Summary
ProgramUtilities()
           
 
Method Summary
static String[] getActorNames(Program program)
          extract the actor names from the actor field
static Comparator<Program> getProgramComparator()
          comparator to sort programs by date, time and position in channel list
static String getTimeZoneCorrectedProgramId(String progID)
          Gets the time zone corrected program id of the given program id.
static boolean isNotInTimeRange(int timeFrom, int timeTo, Program p)
          A helper method to get if a program is not in a time range.
static boolean isOnAir(Program p)
          Helper method to check if a program runs.
static ArrayList<String>[] splitActors(Program program)
          get the actors and roles of a program
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramUtilities

public ProgramUtilities()
Method Detail

isOnAir

public static boolean isOnAir(Program p)
Helper method to check if a program runs.

Parameters:
p - The program to check.
Returns:
True if the program runs.

getProgramComparator

public static Comparator<Program> getProgramComparator()
comparator to sort programs by date, time and position in channel list


isNotInTimeRange

public static boolean isNotInTimeRange(int timeFrom,
                                       int timeTo,
                                       Program p)
A helper method to get if a program is not in a time range.

Parameters:
timeFrom - The beginning of the time range to check
timeTo - The ending of the time range
p - The program to check
Returns:
If the program is not in the given time range.
Since:
2.2.2

splitActors

public static ArrayList<String>[] splitActors(Program program)
get the actors and roles of a program

Parameters:
program - the program containing the actors
Returns:
array of 2 lists, where one contains roles and the other actors
Since:
2.6

getActorNames

public static String[] getActorNames(Program program)
extract the actor names from the actor field

Parameters:
program - the program to work on
Returns:
list of real actor names or null (if it can not be decided)
Since:
2.6

getTimeZoneCorrectedProgramId

public static String getTimeZoneCorrectedProgramId(String progID)
Gets the time zone corrected program id of the given program id. If the current time zone is the same like the time zone of the given id the given id will be returned.

Parameters:
progID - The id to get the time zone corrected for.
Returns:
The time zone corrected program id.
Since:
2.7

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)