nz.ac.waikato.mcennis.rat.parser.xmlHandler
Class LastFMArtistTag

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by nz.ac.waikato.mcennis.rat.parser.xmlHandler.Handler
          extended by nz.ac.waikato.mcennis.rat.parser.xmlHandler.LastFMArtistTag
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class LastFMArtistTag
extends Handler

Parse the ArtistTag XML. See www.audioscrobbler.net's web services page for a description of the XML format. Contains the tags and their frequency used to describe this artist across all LastFM users.


Constructor Summary
LastFMArtistTag()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 Handler duplicate()
          Create a complete duplicate of this class
 void endDocument()
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 ParsedObject get()
          Return the underlying parsed object
 void set(ParsedObject o)
          Set the underlying parsed object for parsing
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void setParser(ToFileParser parser)
          Reference to a ToFileParser to control where this XML file is stored.
 void startDocument()
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
           
 
Methods inherited from class nz.ac.waikato.mcennis.rat.parser.xmlHandler.Handler
error, fatalError, setCrawler, warning
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LastFMArtistTag

public LastFMArtistTag()
Method Detail

setParser

public void setParser(ToFileParser parser)
Reference to a ToFileParser to control where this XML file is stored.

Parameters:
parser - reference to a ToFileParser

get

public ParsedObject get()
Description copied from class: Handler
Return the underlying parsed object

Specified by:
get in class Handler
Returns:
parsed object

set

public void set(ParsedObject o)
Description copied from class: Handler
Set the underlying parsed object for parsing

Specified by:
set in class Handler
Parameters:
o - underlying parsed object

duplicate

public Handler duplicate()
Description copied from class: Handler
Create a complete duplicate of this class

Specified by:
duplicate in class Handler
Returns:
deep copy of the original.

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException