public abstract class AbstractPrimaryDataService extends Object implements PrimaryDataService
Modifier and Type | Field and Description |
---|---|
static ChannelGroup |
AUSTRIA
The TV-Browser channel group 'austria'.
|
static ChannelGroup |
DIGITAL
The TV-Browser channel group 'digital'.
|
static ChannelGroup |
LOCAL
The TV-Browser channel group 'local'.
|
static ChannelGroup |
MAIN
The TV-Browser channel group 'main'.
|
static ChannelGroup |
OTHERS
The TV-Browser channel group 'others'.
|
static ChannelGroup |
RADIO
The TV-Browser channel group 'radio'.
|
Constructor and Description |
---|
AbstractPrimaryDataService() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
execute(String dir)
Gets the raw TV data and writes it to a directory
|
boolean |
execute(String dir,
PrintStream err)
Gets the raw TV data and writes it to a directory
|
static int |
findNumber(String s)
Searches a number in a String and returns it.
|
static int |
getCurrentWeekOfYear(int beginOfWeek)
Gets the number of the current week of the year (german: Kalenderwoche).
|
static int |
getWeekOfYear(Calendar cal,
int beginOfWeek)
Gets the number of the current week of the year (german: Kalenderwoche).
|
void |
logException(Exception exc)
Logs an exception.
|
void |
logMessage(String msg)
Logs an message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReadBytesCount
public static final ChannelGroup MAIN
If you are a third party developer please use your own channel groups.
public static final ChannelGroup LOCAL
If you are a third party developer please use your own channel groups.
public static final ChannelGroup OTHERS
If you are a third party developer please use your own channel groups.
public static final ChannelGroup DIGITAL
If you are a third party developer please use your own channel groups.
public static final ChannelGroup RADIO
If you are a third party developer please use your own channel groups.
public static final ChannelGroup AUSTRIA
If you are a third party developer please use your own channel groups.
public final boolean execute(String dir, PrintStream err)
execute
in interface PrimaryDataService
dir
- The directory to write the raw TV data to.err
- The stream to print error messages to.protected abstract void execute(String dir)
dir
- The directory to write the raw TV data to.public final void logException(Exception exc)
exc
- The exception to log.logMessage(String)
public final void logMessage(String msg)
logException(Exception)
.msg
- logException(Exception)
public static int getCurrentWeekOfYear(int beginOfWeek)
beginOfWeek
- The first day of the week. Usually either
Calendar.MONDAY
or Calendar.SUNDAY
.public static int getWeekOfYear(Calendar cal, int beginOfWeek)
cal
- The Calendar object to use.beginOfWeek
- The first day of the week. Usually either
Calendar.MONDAY
or Calendar.SUNDAY
.public static int findNumber(String s)
Warning: Since the return is a int, "12.54" will return 12, not 12.54
s
- The String to search for a number.TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)