public class Channel extends Object implements Comparable<Channel>
Modifier and Type | Field and Description |
---|---|
static int |
CATEGORY_CINEMA
The identifier for a channel that is in the category cinema
|
static int |
CATEGORY_DIGITAL
The identifier for a channel that is in the category digital
|
static int |
CATEGORY_EVENTS
The identifier for a channel that is in the category events
|
static int |
CATEGORY_NONE
The identifier for a channel that fits in no other category
|
static int |
CATEGORY_PAY_TV
The identifier for a channel that is in the category pay TV
|
static int |
CATEGORY_PAYED_DATA_TV
The identifier for a channel that is in the category payed data TV
|
static int |
CATEGORY_RADIO
The identifier for a channel that is in the category radio
|
static int |
CATEGORY_SPECIAL_MUSIC
The identifier for a channel that is in the category music
|
static int |
CATEGORY_SPECIAL_NEWS
The identifier for a channel that is in the category news
|
static int |
CATEGORY_SPECIAL_OTHER
The identifier for a channel that is in the category other
|
static int |
CATEGORY_SPECIAL_SPORT
The identifier for a channel that is in the category sport
|
static int |
CATEGORY_TV
The identifier for a channel that is in the category TV
|
Constructor and Description |
---|
Channel(String id)
Creates an instance of this class.
|
Channel(String id,
String country)
Creates an instance of this class.
|
Channel(TvDataService dataService,
String name)
Deprecated.
|
Channel(TvDataService dataService,
String name,
String id)
Deprecated.
|
Channel(TvDataService dataService,
String name,
String id,
TimeZone timeZone)
Deprecated.
|
Channel(TvDataService dataService,
String name,
String id,
TimeZone timeZone,
String country)
Deprecated.
|
Channel(TvDataService dataService,
String name,
String id,
TimeZone timeZone,
String country,
String copyrightNotice)
Creates an instance of this class.
|
Channel(TvDataService dataService,
String name,
String id,
TimeZone timeZone,
String country,
String copyrightNotice,
String webpage)
Creates an instance of this class.
|
Channel(TvDataService dataService,
String name,
String id,
TimeZone timeZone,
String country,
String copyrightNotice,
String webpage,
ChannelGroup group)
Creates an instance of this class.
|
Channel(TvDataService dataService,
String name,
String id,
TimeZone timeZone,
String country,
String copyrightNotice,
String webpage,
ChannelGroup group,
Icon icon)
Creates an instance of this class.
|
Channel(TvDataService dataService,
String name,
String id,
TimeZone timeZone,
String country,
String copyrightNotice,
String webpage,
ChannelGroup group,
Icon icon,
int categories)
Creates an instance of this class.
|
Channel(TvDataService dataService,
String name,
String id,
TimeZone timeZone,
String country,
String copyrightNotice,
String webpage,
ChannelGroup group,
Icon icon,
int categories,
String unescapedName)
Creates an instance of this class.
|
Channel(TvDataService dataService,
String name,
TimeZone timeZone)
Deprecated.
|
Channel(TvDataService dataService,
String name,
TimeZone timeZone,
String country)
Deprecated.
|
Channel(TvDataService dataService,
String name,
TimeZone timeZone,
String country,
String copyrightNotice)
Creates an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Channel other) |
void |
copySettingsToChannel(Channel to)
Deprecated.
not needed since we use the ChannelUserSettings class for storing channel user settings
|
boolean |
equals(Object obj) |
int |
getCategories()
Gets the categories of this channel.
|
static Channel |
getChannel(String dataServiceId,
String groupId,
String country,
String channelId) |
String |
getCopyrightNotice()
Gets the copyright notice for this channel.
|
String |
getCountry()
Gets the country of this channel.
|
TvDataService |
getDataService()
Deprecated.
|
TvDataServiceProxy |
getDataServiceProxy()
Gets the data service proxy of this channel
|
int |
getDayLightSavingTimeCorrection()
Gets the day light saving time correction of this channel.
|
Icon |
getDefaultIcon()
Return the Default-Icon
|
String |
getDefaultName()
Get the default ChannelName
|
String |
getDefaultWebPage()
Get the Default WebPage
|
int |
getEndTimeLimit()
Gets the end time limit in minutes of day.
|
ChannelGroup |
getGroup()
Gets the channel group of this channel.
|
Icon |
getIcon() |
String |
getIconFileName()
Deprecated.
use getUserIconFileName()
|
String |
getId()
Gets the id of this channel.
|
String |
getName()
Gets the name of this channel.
|
int |
getStartTimeLimit()
Gets the start time limit in minutes of day.
|
TimeZone |
getTimeZone()
Gets the time zone of this channel.
|
String |
getUnescapedName()
Gets the unescaped name of this channel.
|
String |
getUniqueId()
Gets a unique identifier of this channel.
|
String |
getUserChannelName()
Get the ChannelName used by the User
|
String |
getUserIconFileName() |
String |
getUserWebPage()
Get the WebPage used by the User
|
String |
getWebpage()
Gets the webpage for this channel.
|
boolean |
hasIcon()
Gets if this channel has an icon.
|
boolean |
isTimeLimited()
Gets if this channel is limited in start and end time.
|
boolean |
isUsingUserIcon()
Is using the User-Icon if availabe?
|
static Channel |
readData(DataInput in,
boolean allowNull)
Method for OnDemandDayProgramFile file format version 2.
|
static Channel |
readData(ObjectInputStream in,
boolean allowNull)
Creates an instance of this class from a stream.
|
void |
setChannelCopyrightNotice(String copyrightNotice)
Sets the copyright notice of this channel.
|
void |
setChannelName(String name)
Sets the name of this channel.
|
void |
setChannelWebpage(String webpage)
Sets the webpage of this channel.
|
void |
setDayLightSavingTimeCorrection(int correction)
Sets the day light saving time correction.
|
void |
setDefaultIcon(Icon icon)
Sets the Default-Icon.
|
void |
setEndTimeLimit(int endTimeLimit)
Sets the end time limit to the new value.
|
void |
setIcon(Icon icon) |
void |
setIconFileName(String filename)
Deprecated.
user setUserIconFileName
|
void |
setStartTimeLimit(int startTimeLimit)
Sets the start time limit to the new value.
|
void |
setUserChannelName(String name)
Set the ChannelName used by the User
|
void |
setUserIconFileName(String filename)
Sets the user icon file name.
|
void |
setUserWebPage(String url)
Seth the WebPage used by the User
|
String |
toString() |
void |
useUserIcon(boolean use)
Use the User-Icon if available?
|
void |
writeData(ObjectOutputStream out)
Serialized this object.
|
void |
writeToDataFile(RandomAccessFile out)
Method for OnDemandDayProgramFile file format version 2.
|
public static final int CATEGORY_NONE
public static final int CATEGORY_TV
public static final int CATEGORY_RADIO
public static final int CATEGORY_CINEMA
public static final int CATEGORY_EVENTS
public static final int CATEGORY_DIGITAL
public static final int CATEGORY_SPECIAL_MUSIC
public static final int CATEGORY_SPECIAL_SPORT
public static final int CATEGORY_SPECIAL_NEWS
public static final int CATEGORY_SPECIAL_OTHER
public static final int CATEGORY_PAY_TV
public static final int CATEGORY_PAYED_DATA_TV
public Channel(TvDataService dataService, String name, String id, TimeZone timeZone, String country, String copyrightNotice, String webpage, ChannelGroup group, Icon icon, int categories, String unescapedName)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.copyrightNotice
- The copyright notice for this channel.webpage
- The webpage of this channel.group
- The group of this channel.icon
- The icon for this channel.categories
- The categories for this channel.unescapedName
- The unescaped name for this channel.public Channel(TvDataService dataService, String name, String id, TimeZone timeZone, String country, String copyrightNotice, String webpage, ChannelGroup group, Icon icon, int categories)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.copyrightNotice
- The copyright notice for this channel.webpage
- The webpage of this channel.group
- The group of this channel.icon
- The icon for this channel.categories
- The categories for this channel.public Channel(TvDataService dataService, String name, String id, TimeZone timeZone, String country, String copyrightNotice, String webpage, ChannelGroup group, Icon icon)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.copyrightNotice
- The copyright notice for this channel.webpage
- The webpage of this channel.group
- The group of this channel.icon
- The icon for this channel.public Channel(TvDataService dataService, String name, String id, TimeZone timeZone, String country, String copyrightNotice, String webpage, ChannelGroup group)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.copyrightNotice
- The copyright notice for this channel.webpage
- The webpage of this channel.group
- The group of this channel.public Channel(TvDataService dataService, String name, String id, TimeZone timeZone, String country, String copyrightNotice, String webpage)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.copyrightNotice
- The copyright notice for this channel.webpage
- The webpage of this channel.public Channel(TvDataService dataService, String name, String id, TimeZone timeZone, String country, String copyrightNotice)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.copyrightNotice
- The copyright notice for this channel.public Channel(TvDataService dataService, String name, TimeZone timeZone, String country, String copyrightNotice)
dataService
- The data service of this channel.name
- The name of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.copyrightNotice
- The copyright notice for this channel.public Channel(TvDataService dataService, String name, String id, TimeZone timeZone, String country)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.public Channel(TvDataService dataService, String name, TimeZone timeZone, String country)
dataService
- The data service of this channel.name
- The name of this channel.timeZone
- The time zone of this channel.country
- The country of this channel.public Channel(TvDataService dataService, String name, String id, TimeZone timeZone)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.timeZone
- The time zone of this channel.public Channel(TvDataService dataService, String name, TimeZone timeZone)
dataService
- The data service of this channel.name
- The name of this channel.timeZone
- The time zone of this channel.public Channel(TvDataService dataService, String name, String id)
dataService
- The data service of this channel.name
- The name of this channel.id
- The id of this channel.public Channel(TvDataService dataService, String name)
dataService
- The data service of this channel.name
- The name of this channel.public Channel(String id, String country)
id
- The id of this channel.country
- The country of this channel.public Channel(String id)
id
- The id of this channel.public static Channel readData(ObjectInputStream in, boolean allowNull) throws IOException, ClassNotFoundException
in
- The stream to load the data from.allowNull
- True
if the method is allowed to return null
.null
if allowNull
is true
and the channel could not be load.IOException
ClassNotFoundException
public static Channel readData(DataInput in, boolean allowNull) throws IOException, ClassNotFoundException
in
- The file too read the Data from.allowNull
- IOException
ClassNotFoundException
public void writeToDataFile(RandomAccessFile out) throws IOException
out
- The file to write the Data in.IOException
public void writeData(ObjectOutputStream out) throws IOException
out
- The stream to write the values of this channel to.IOException
public String getCopyrightNotice()
public String getWebpage()
public ChannelGroup getGroup()
public int getCategories()
public static Channel getChannel(String dataServiceId, String groupId, String country, String channelId)
dataServiceId
- The id of the data service of the channel to get.groupId
- The group id of the channel to get.country
- The country of the channel to get.channelId
- The id of the channel to get.null
if no channel with the ids was found.public TimeZone getTimeZone()
public String getCountry()
public void setDayLightSavingTimeCorrection(int correction)
correction
- The new day light saving time correction.public int getDayLightSavingTimeCorrection()
public TvDataService getDataService()
public TvDataServiceProxy getDataServiceProxy()
public void setDefaultIcon(Icon icon)
icon
- Default-Iconpublic void setIcon(Icon icon)
icon
- The new icon or null to remove the current iconpublic String getName()
public String getId()
public void copySettingsToChannel(Channel to)
to
- to this Channelpublic Icon getIcon()
public boolean hasIcon()
True
if this channel has an icon,
false
otherwise.public String getIconFileName()
public void setIconFileName(String filename)
filename
- Filename for Iconpublic void setUserIconFileName(String filename)
filename
- The file name of ths user icon file.public String getUserIconFileName()
public void useUserIcon(boolean use)
use
- true for using User-Iconpublic boolean isUsingUserIcon()
public Icon getDefaultIcon()
public void setUserChannelName(String name)
name
- new ChannelNamepublic String getUserChannelName()
public String getDefaultName()
public void setUserWebPage(String url)
url
- WebPagepublic String getUserWebPage()
public String getDefaultWebPage()
public boolean isTimeLimited()
True
if this channel is time limited.public int getStartTimeLimit()
public void setStartTimeLimit(int startTimeLimit)
startTimeLimit
- The new value for start time
limit in minutes of day.public int getEndTimeLimit()
public void setEndTimeLimit(int endTimeLimit)
endTimeLimit
- The new value for end time
limit in minutes of day.public int compareTo(Channel other)
compareTo
in interface Comparable<Channel>
public void setChannelName(String name)
name
- The new name for the channel.public void setChannelCopyrightNotice(String copyrightNotice)
copyrightNotice
- The new copyright notice for the channel.public void setChannelWebpage(String webpage)
webpage
- The new webpage for the channel.public String getUnescapedName()
public String getUniqueId()
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)