public class XBMCAddon extends XMLParser
DTD_WEB_LOCATION, SCHEMA_WEB_LOCATION
Constructor and Description |
---|
XBMCAddon(XBMCAddonManager addonMgr,
java.io.File addonDir,
java.util.Locale locale)
Used to create a instance of the addon class
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkCondition(java.lang.String expression)
Used to evaluate a expression making use of the addon settings.
|
java.lang.String |
executeFunction(XBMCAddon rootAddon,
java.lang.String functionName)
Used to execute a scraper function
|
XBMCAddon |
findAddonWithFunction(XBMCAddon rootAddon,
java.lang.String functionName)
Uses to find the addon that contains the function
|
org.w3c.dom.Element |
findFunction(XBMCAddon rootAddon,
java.lang.String functionName)
Uses to find a function in the scrapers
|
protected java.lang.String |
getAddonSetting(java.lang.String key) |
java.lang.String |
getDescription()
Used to get the description of the addon
|
java.io.File |
getFile(java.lang.String path)
Used to get a reference to one of the addons files
|
java.lang.String |
getId()
Used to get the id of the addon
|
java.lang.String |
getInfoSetting(java.lang.String key)
Used to get the value of a info setting
|
XBMCAddonManager |
getManager()
Used to get the addon manager
|
java.lang.String |
getName()
Used to get the name of the addon
|
java.lang.String |
getProviderName()
Used to get the provider name of the addon
|
java.util.List<XBMCAddon> |
getRquiredAddons()
Used to get a list of required addons by this addon
|
XBMCScraper |
getScraper(Mode mode)
Used to get the scraper class that will read data using the XBMC XML scraper files
|
Value |
getSetting(java.lang.String id)
Used to get the value of a addon setting
|
java.util.Map<java.lang.String,Value> |
getSettings()
Used to get the addon settings
|
java.lang.String |
getSummary()
Used to get the summary of the addon
|
Version |
getVersion()
Used to get the version of the addon
|
boolean |
hasScrapers()
Used to find out if the extension has scrappers
|
void |
setSetting(java.lang.String key,
java.lang.String expression)
Used to assign a value to a variable which are used as settings.
|
boolean |
supportsMode(Mode mode)
Used o find out if the scraper supports a given mode
|
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 XBMCAddon(XBMCAddonManager addonMgr, java.io.File addonDir, java.util.Locale locale) throws XBMCException
addonMgr
- The XBMC addon manageraddonDir
- The directory contain the XBMC addonslocale
- The locale to use with the scrapersXBMCException
- Thrown if anable to parse the settingspublic Value getSetting(java.lang.String id) throws XBMCException
id
- The id of the addon settingXBMCException
- Thrown if their is a problem getting the settingpublic java.util.Map<java.lang.String,Value> getSettings()
public java.lang.String getId() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.util.List<XBMCAddon> getRquiredAddons() throws XBMCException
XBMCException
- Thrown if their is a problempublic Version getVersion() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.lang.String getProviderName() throws XBMCException
XBMCException
- Thrown if their are any problemspublic boolean supportsMode(Mode mode) throws XBMCException
mode
- The mode to checkXBMCException
- Thrown if their is any problems while checkingpublic XBMCScraper getScraper(Mode mode) throws XBMCException
mode
- The mode that the scraper is been used forXBMCException
- Thrown if their are any problemspublic java.lang.String getSummary() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.lang.String getDescription() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.lang.String getName() throws XBMCException
XBMCException
- Thrown if their are any problemspublic java.lang.String getInfoSetting(java.lang.String key) throws XBMCException
key
- The info setting nameXBMCException
- Thrown if not able to find the settingprotected java.lang.String getAddonSetting(java.lang.String key) throws XBMCException
XBMCException
public java.io.File getFile(java.lang.String path)
path
- The Path relative to the addon directorypublic org.w3c.dom.Element findFunction(XBMCAddon rootAddon, java.lang.String functionName) throws XBMCException
rootAddon
- The root addon that required all the othersfunctionName
- The name of the function been looked forXBMCFunctionNotFoundException
- Thrown if the function could not be foundXBMCException
- Thrown if their are any other problemspublic XBMCAddon findAddonWithFunction(XBMCAddon rootAddon, java.lang.String functionName) throws XBMCException
rootAddon
- The root addon that required all the othersfunctionName
- The name of the function been looked forXBMCFunctionNotFoundException
- Thrown if the function could not be foundXBMCException
- Thrown if their are any other problemspublic java.lang.String executeFunction(XBMCAddon rootAddon, java.lang.String functionName) throws XBMCException
rootAddon
- The root addon that required all the othersfunctionName
- The function nameXBMCException
- Thrown if their are any problemspublic XBMCAddonManager getManager()
public boolean hasScrapers() throws XBMCException
XBMCException
- Thrown if their are any problemspublic boolean checkCondition(java.lang.String expression) throws XBMCException
expression
- The expressionXBMCException
- Thrown if their are any problemspublic void setSetting(java.lang.String key, java.lang.String expression) throws XBMCException
key
- The name of the settingexpression
- The expression to evaluate and store in the settingXBMCException
- Thrown if their are any problems.public java.lang.String toString()
toString
in class java.lang.Object