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

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.LastFMProfile
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class LastFMProfile
extends Handler

Parse the Profile XML file from LastFM. See audioscrobbler.net for a description of the file format. Usually obtained from the CrawlLastFM data aquisition module. Contains all the demographic information associated with this username.


Field Summary
 
Fields inherited from class nz.ac.waikato.mcennis.rat.parser.xmlHandler.Handler
properties, site
 
Constructor Summary
LastFMProfile()
           
 
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)
          Set where the given parser will store files when they are parsed
 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
check, check, error, fatalError, getName, getParameter, getParameter, init, setCrawler, setName, setProperties, 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

LastFMProfile

public LastFMProfile()
Method Detail

setParser

public void setParser(ToFileParser parser)
Set where the given parser will store files when they are parsed

Parameters:
parser - ToFileParser to store files parsed by this parser

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

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

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

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

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

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.

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

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads