public class XBMCSource extends XMLParser implements ISource
DTD_WEB_LOCATION, SCHEMA_WEB_LOCATION
Constructor and Description |
---|
XBMCSource(ExtensionInfo<? extends ISource> sourceInfo,
XBMCAddonManager mgr,
java.lang.String addonId)
Used to create a instance of this class
|
Modifier and Type | Method and Description |
---|---|
IEpisode |
getEpisode(ISeason season,
int episodeNum,
java.io.File file)
Called to retrieve the information on a episode
|
Film |
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,
java.io.File file)
This will get a season from the source.
|
Show |
getShow(java.lang.String showId,
java.net.URL url,
java.io.File file)
This will get a show from the source.
|
IEpisode |
getSpecial(ISeason season,
int specialNumber,
java.io.File file)
This gets a special episode from the source.
|
protected void |
parseCertification(IVideoCertification video,
org.w3c.dom.Document doc) |
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.
|
java.lang.String |
toString() |
createDocBuilder, createFactory, deleteNode, domToStr, domToStrNoXMLProlog, encodeAttributeValue, firstChild, fixXMl, getAttribute, getElement, getFirstChildElement, getFloatFromXML, getIntegerFromXML, getLastChildElement, getLongFromXML, getSchema, getStringFromXML, getStringFromXMLOrNull, getURLFromXML, getURLFromXMLOrNull, hasNode, parse, parse, parse, quoteXPathQuery, selectChildNodes, selectNodeList, selectSingleNode, strToDom, strToDom, strToDom, writeXML
public XBMCSource(ExtensionInfo<? extends ISource> sourceInfo, XBMCAddonManager mgr, java.lang.String addonId) throws XBMCException
sourceInfo
- The source informationmgr
- The addon manageraddonId
- The ID of the sources XBMC addonXBMCException
- Thrown if their are any problemspublic IEpisode getEpisode(ISeason season, int episodeNum, java.io.File file) throws SourceException, java.net.MalformedURLException, java.io.IOException
getEpisode
in interface ISource
season
- The season the episode belongs tooepisodeNum
- The number of the episodefile
- The film file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.net.MalformedURLException
- Thrown if their is a problem creating URL'sjava.io.IOException
- Throw if their is a IO related problempublic ISeason getSeason(IShow show, int seasonNum, java.io.File file) throws SourceException, java.io.IOException
getSeason
in interface ISource
show
- The show the season belongs tooseasonNum
- The number of the season that is to be fetchedfile
- The media file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.io.IOException
- Thrown if their is a I/O related problem.public Show getShow(java.lang.String showId, java.net.URL url, java.io.File file) throws SourceException, java.net.MalformedURLException, java.io.IOException
getShow
in interface ISource
showId
- The id of the show to get.url
- String url of the showfile
- The media file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.net.MalformedURLException
- Thrown if their is a problem creating URL'sjava.io.IOException
- Thrown if their is a I/O related problem.public Film 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 used to lookup the filmfile
- The film file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.net.MalformedURLException
- Thrown if their is a problem creating URL'sjava.io.IOException
- Thrown if their is a I/O related problem.protected void parseCertification(IVideoCertification video, org.w3c.dom.Document doc) throws XMLParserException
XMLParserException
public IEpisode getSpecial(ISeason season, int specialNumber, java.io.File file) throws SourceException, java.net.MalformedURLException, java.io.IOException
getSpecial
in interface ISource
season
- The season the special episode belongs toospecialNumber
- The number of the special episode too getfile
- The film file if looking up a files details, or NULLSourceException
- Thrown if their is a problem retrieving the datajava.net.MalformedURLException
- Thrown if their is a problem creating URL'sjava.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 forSourceException
- 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.
setParameter
in interface ISource
key
- The key of the parametervalue
- The value of the parameterSourceException
- 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.
getParameter
in interface ISource
key
- The key of the parameterSourceException
- Throw if the key is not supported by this source.public void setMediaDirConfig(MediaDirectory dir) throws SourceException
setMediaDirConfig
in interface ISource
dir
- The media directorySourceException
- Thrown if their is a problem with the sourcepublic java.lang.String toString()
toString
in class java.lang.Object
public ExtensionInfo<? extends ISource> getInfo()