edu.uci.isr.yancees
Class YanceesEventSAXParser

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byedu.uci.isr.yancees.YanceesEventSAXParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

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

Generates SienaEvents using a SAX parser.


Method Summary
 void characters(char[] buf, int offset, int len)
           
 void endDocument()
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
          Parser calls this for each element in a document
 YanceesEvent getEvent()
           
static void parseFile(java.io.File file, YanceesEvent event)
          Parses the content of the file, returning a HashMap with attribute value pairs
 void startDocument()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseFile

public static void parseFile(java.io.File file,
                             YanceesEvent event)
Parses the content of the file, returning a HashMap with attribute value pairs

Parameters:
file -
event - is the YanceesEvent object to receive the attributes parsed

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
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
Parser calls this for each element in a document

Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] buf,
                       int offset,
                       int len)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getEvent

public YanceesEvent getEvent()
Returns:
a reference to the event that was parsed.