TV-Browser 2.7.5 API

tvbrowserdataservice
Class ChannelGroup

java.lang.Object
  extended by tvbrowserdataservice.ChannelGroup
All Implemented Interfaces:
ChannelGroup

public class ChannelGroup
extends Object
implements ChannelGroup

The ChannelGroup implementation of the TvBrowserDataService


Field Summary
static Localizer mLocalizer
          The localizer for this class.
 
Constructor Summary
ChannelGroup(TvBrowserDataService dataservice, String id, String[] mirrorUrls, Properties settings)
          Creates a new ChannelGroup
ChannelGroup(TvBrowserDataService dataservice, String id, String name, String description, String provider, String[] mirrorUrls, Properties settings)
          Creates a new ChannelGroup
 
Method Summary
 void addChannel(Channel ch)
          Add a channel to this group.
 Channel[] checkForAvailableChannels(ProgressMonitor monitor)
          Checks and returns the available channels of this group.
protected  void chooseMirrors()
           
 void deleteAllFiles()
          delete all the files created by this channel group, only to be called on deletion of a channel group
 boolean equals(Object obj)
           
 Channel[] getAvailableChannels()
          Gets the list of the channels that are available by this data service.
 Iterator<Channel> getChannels()
          Get all channels.
 String getDescription()
           
 String getId()
           
 Mirror getMirror()
          Get the current mirror.
protected  String[] getMirrorArr()
           
 String getName()
           
 String getProviderName()
           
 SummaryFile getSummary()
           
 int hashCode()
           
 boolean isGroupMember(Channel ch)
          Checks if a channel is a member of this group.
protected  void setBaseMirror(String[] mirrorUrl)
           
 void setWorkingDirectory(File dataDir)
          Sets the data directory.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mLocalizer

public static final Localizer mLocalizer
The localizer for this class.

Constructor Detail

ChannelGroup

public ChannelGroup(TvBrowserDataService dataservice,
                    String id,
                    String name,
                    String description,
                    String provider,
                    String[] mirrorUrls,
                    Properties settings)
Creates a new ChannelGroup

Parameters:
dataservice - The data service of the group.
id - The id of the group.
name - The name of the group.
description - The description for the group.
provider - The provider of the group.
mirrorUrls - The mirror urls of the group.
settings - The properties of the group.

ChannelGroup

public ChannelGroup(TvBrowserDataService dataservice,
                    String id,
                    String[] mirrorUrls,
                    Properties settings)
Creates a new ChannelGroup

Parameters:
dataservice - The data service of the group.
id - The id of the group.
mirrorUrls - The mirror urls of the group.
settings - The properties of the group.
Method Detail

getMirrorArr

protected String[] getMirrorArr()

isGroupMember

public boolean isGroupMember(Channel ch)
Checks if a channel is a member of this group.

Parameters:
ch - The channel to check.
Returns:
True if the channel is a member of this group, false otherwise.

setWorkingDirectory

public void setWorkingDirectory(File dataDir)
Sets the data directory.

Parameters:
dataDir - The data directory.

addChannel

public void addChannel(Channel ch)
Add a channel to this group.

Parameters:
ch - The channel to add.

getChannels

public Iterator<Channel> getChannels()
Get all channels.

Returns:
An Iterator with the channels.

getDescription

public String getDescription()
Specified by:
getDescription in interface ChannelGroup
Returns:
short description of this group

getName

public String getName()
Specified by:
getName in interface ChannelGroup
Returns:
the title of this group

getProviderName

public String getProviderName()
Specified by:
getProviderName in interface ChannelGroup
Returns:
the name of the provider

toString

public String toString()
Overrides:
toString in class Object

chooseMirrors

protected void chooseMirrors()
                      throws TvBrowserException
Throws:
TvBrowserException

getSummary

public SummaryFile getSummary()
Returns:
The summary file.

getMirror

public Mirror getMirror()
Get the current mirror.

Returns:
The current mirror.

setBaseMirror

protected void setBaseMirror(String[] mirrorUrl)

checkForAvailableChannels

public Channel[] checkForAvailableChannels(ProgressMonitor monitor)
                                    throws TvBrowserException
Checks and returns the available channels of this group.

Parameters:
monitor - The progress monitor that is to be used.
Returns:
The available channel array.
Throws:
TvBrowserException

getAvailableChannels

public Channel[] getAvailableChannels()
Gets the list of the channels that are available by this data service.

Returns:
The available channel array.

getId

public String getId()
Specified by:
getId in interface ChannelGroup
Returns:
unique identifier of this group

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

deleteAllFiles

public void deleteAllFiles()
delete all the files created by this channel group, only to be called on deletion of a channel group

Since:
2.6

TV-Browser 2.7.5 API

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