jfreerails.server
Class CitySAXParser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by jfreerails.server.CitySAXParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

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

Class to parse an xml file that contains city names and co-ords. Upon reading in the data, its stored in KEY.CITIES.

Author:
Scott Bennett Date: 31st March 2003

Field Summary
private  java.util.Vector<CityModel> cities
           
private  World world
           
 
Constructor Summary
CitySAXParser(World w)
           
 
Method Summary
 void endDocument()
           
 void startElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName, org.xml.sax.Attributes attrs)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cities

private final java.util.Vector<CityModel> cities

world

private final World world
Constructor Detail

CitySAXParser

public CitySAXParser(World w)
              throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
Method Detail

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

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String sName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
                  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