ca.site.elkb
Class CategoryHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by ca.site.elkb.CategoryHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class CategoryHandler
extends org.xml.sax.helpers.DefaultHandler

This class loads the categories from an xml file. The class requires an instance of the Category class to be passed in the constructor. Methods from the category class are used by this class.

Version:
1.4 2013
Author:
Alistsair Kennedy

Constructor Summary
CategoryHandler(Category c)
          Initializes the CategoryHandler and is passed an instance of the Category class.
 
Method Summary
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoryHandler

public CategoryHandler(Category c)
Initializes the CategoryHandler and is passed an instance of the Category class.

Parameters:
c -
Method Detail

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  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

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