org.stanwood.media.source.xbmc
Class XBMCExtension

java.lang.Object
  extended by org.stanwood.media.xml.XMLParser
      extended by org.stanwood.media.source.xbmc.XBMCExtension
Direct Known Subclasses:
XBMCLibrary, XBMCScraper

public abstract class XBMCExtension
extends XMLParser

All types of XBMC extension classes should inherit from this class as it implements methods generic to all XBMC extensions.


Field Summary
 
Fields inherited from class org.stanwood.media.xml.XMLParser
DTD_WEB_LOCATION, SCHEMA_WEB_LOCATION
 
Constructor Summary
XBMCExtension(XBMCAddon addon, java.io.File scraperFile, java.lang.String point)
          The constructor
 
Method Summary
 java.lang.String executeXBMCFunction(org.w3c.dom.Element functionNode, java.util.Map<java.lang.Integer,java.lang.String> params)
          Used to execute a XBMC function
abstract  java.lang.String executeXBMCScraperFunction(java.lang.String functionName, java.util.Map<java.lang.Integer,java.lang.String> params)
          Used to execute a XBMC function
protected  XBMCAddon getAddon()
           
protected  org.w3c.dom.Document getDocument()
           
 java.io.File getFile()
          Used to get the XML scraper file been used
 java.lang.String toString()
          
 
Methods inherited from class org.stanwood.media.xml.XMLParser
createDocBuilder, createFactory, deleteNode, domToStr, encodeAttributeValue, firstChild, getAttribute, getElement, getFirstChildElement, getFloatFromXML, getIntegerFromXML, getLastChildElement, getLongFromXML, getSchema, getStringFromXML, getStringFromXMLOrNull, getURLFromXML, getURLFromXMLOrNull, hasNode, parse, parse, parse, quoteXPathQuery, selectChildNodes, selectNodeList, selectSingleNode, strToDom, strToDom, strToDom, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XBMCExtension

public XBMCExtension(XBMCAddon addon,
                     java.io.File scraperFile,
                     java.lang.String point)
The constructor

Parameters:
addon - the addon
scraperFile - The scraper file the extension is been read from
point - The extension point been used for the extension
Method Detail

getDocument

protected org.w3c.dom.Document getDocument()
                                    throws XBMCException
Throws:
XBMCException

executeXBMCFunction

public java.lang.String executeXBMCFunction(org.w3c.dom.Element functionNode,
                                            java.util.Map<java.lang.Integer,java.lang.String> params)
                                     throws XBMCException,
                                            XMLParserException
Used to execute a XBMC function

Parameters:
functionNode - The node of the function
params - The parameters been passed to the function
Returns:
The result of executing the function
Throws:
XBMCException - Thrown if their is a XBMC problem
XMLParserException - Thrown if their is a XML problem

getFile

public java.io.File getFile()
Used to get the XML scraper file been used

Returns:
The XML scraper file

executeXBMCScraperFunction

public abstract java.lang.String executeXBMCScraperFunction(java.lang.String functionName,
                                                            java.util.Map<java.lang.Integer,java.lang.String> params)
                                                     throws XBMCException,
                                                            XMLParserException
Used to execute a XBMC function

Parameters:
functionName - The name of the function
params - The parameters been passed to the function
Returns:
The result of executing the function
Throws:
XBMCException - Thrown if their is a XBMC problem
XMLParserException - Thrown if their is a XML problem

getAddon

protected XBMCAddon getAddon()

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object