|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.stanwood.media.source.HybridFilmSource
public class HybridFilmSource
This class is a source used to retrieve the best film information it can. It does this by calling other sources and picking the best information from them.
This source supports the following parameters:
Field Summary | |
---|---|
static java.lang.String |
OLD_SOURCE_ID
The ID of the the source |
Constructor Summary | |
---|---|
HybridFilmSource(HybridFilmSourceInfo sourceInfo)
Used to create a instance of the source |
Method Summary | |
---|---|
IEpisode |
getEpisode(ISeason season,
int episodeNum,
java.io.File file)
This always returns null as this source does not support reading episodes. |
IFilm |
getFilm(java.lang.String filmId,
java.net.URL url,
java.io.File file)
This will get a film from the source. |
ExtensionInfo<? extends ISource> |
getInfo()
Used to get the source information details |
java.lang.String |
getParameter(java.lang.String key)
Used to get the value of a source parameter. |
ISeason |
getSeason(IShow show,
int seasonNum)
This always returns null as this source does not support reading episodes. |
Show |
getShow(java.lang.String showId,
java.net.URL url,
java.io.File file)
This always returns null as this source does not support reading episodes. |
IEpisode |
getSpecial(ISeason season,
int specialNumber,
java.io.File file)
This always returns null as this source does not support reading episodes. |
SearchResult |
searchMedia(java.lang.String name,
java.lang.String year,
Mode mode,
java.lang.Integer part)
This is called to search the source for media details |
void |
setMediaDirConfig(MediaDirectory dir)
Called to tell the source which media directory is been processed |
void |
setParameter(java.lang.String key,
java.lang.String value)
Used to set source parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OLD_SOURCE_ID
Constructor Detail |
---|
public HybridFilmSource(HybridFilmSourceInfo sourceInfo) throws SourceException
sourceInfo
- The description of the the source
SourceException
- Thrown if their are any problemsMethod Detail |
---|
public void setMediaDirConfig(MediaDirectory dir) throws SourceException
setMediaDirConfig
in interface ISource
dir
- The media directory
SourceException
- Thrown if their is a problem with the sourcepublic IEpisode getEpisode(ISeason season, int episodeNum, java.io.File file)
getEpisode
in interface ISource
season
- The season the episode belongs to.episodeNum
- The number of the episode to readfile
- The film file if looking up a files details, or NULL
public ISeason getSeason(IShow show, int seasonNum)
getSeason
in interface ISource
show
- The show the season belongs to.seasonNum
- The number of the season to read
public Show getShow(java.lang.String showId, java.net.URL url, java.io.File file)
getShow
in interface ISource
file
- The media file if looking up a files details, or NULLurl
- String url of the showshowId
- The id of the show to read
public IEpisode getSpecial(ISeason season, int specialNumber, java.io.File file)
getSpecial
in interface ISource
season
- The season the episode belongs to.specialNumber
- The number of the special episode to readfile
- The film file if looking up a files details, or NULL
public IFilm getFilm(java.lang.String filmId, java.net.URL url, java.io.File file) throws SourceException, java.net.MalformedURLException, java.io.IOException
getFilm
in interface ISource
filmId
- The id of the filmurl
- The URL to use when looking up film detailsfile
- The film file if looking up a files details, or NULL
SourceException
- Thrown if their is a problem retrieving the data
java.net.MalformedURLException
- Thrown if their is a problem creating URL's
java.io.IOException
- Thrown if their is a I/O related problem.public SearchResult searchMedia(java.lang.String name, java.lang.String year, Mode mode, java.lang.Integer part) throws SourceException
searchMedia
in interface ISource
name
- The search termyear
- The year to search for or empty string if not neededmode
- The mode of the searchpart
- The part number to search for
SourceException
- Thrown if their is a problem with the sourcepublic void setParameter(java.lang.String key, java.lang.String value) throws SourceException
Used to set source parameters. If the key is not supported by this source, then a SourceException
is thrown.
This source supports the following parameters:
setParameter
in interface ISource
key
- The key of the parametervalue
- The value of the parameter
SourceException
- Throw if the key is not supported by this source.public java.lang.String getParameter(java.lang.String key) throws SourceException
Used to get the value of a source parameter. If the key is not supported by this source, then a SourceException
is thrown.
This source supports the following parameters:
getParameter
in interface ISource
key
- The key of the parameter
SourceException
- Throw if the key is not supported by this source.public ExtensionInfo<? extends ISource> getInfo()
getInfo
in interface ISource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |