org.deckfour.xes.in
Class XMxmlParser.MxmlHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.deckfour.xes.in.XMxmlParser.MxmlHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Enclosing class:
XMxmlParser

protected class XMxmlParser.MxmlHandler
extends DefaultHandler

This class implements a SAX2 handler for sequential parsing of MXML documents. It is geared towards directly constructing a log reader's data structures, of which it is a protected class.

Author:
Christian W. Guenther (christian at deckfour dot org)

Field Summary
protected  StringBuffer buffer
          Buffer for characters.
protected  XTrace currentInstance
           
protected  XLog currentProcess
           
protected  XEvent entry
           
protected  XAttributeLiteral eventTypeAttribute
           
protected  XAttributeLiteral genericAttribute
           
protected  Date lastTimestamp
           
protected  ArrayList<XLog> logs
           
protected  int numUnorderedEntries
           
protected  XAttributeLiteral originatorAttribute
           
protected  XAttributeLiteral sourceAttribute
           
protected  boolean sourceOpen
           
protected  Date timestamp
           
 
Constructor Summary
protected XMxmlParser.MxmlHandler()
          Creates a new SAX2 handler instance.
 
Method Summary
 void characters(char[] str, int offset, int len)
           
 void endElement(String uri, String localName, String qName)
           
 List<XLog> getLogs()
           
 void ignorableWhitespace(char[] str, int offset, int len)
           
 void startElement(String uri, String localName, String qName, Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, 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

buffer

protected StringBuffer buffer
Buffer for characters.


logs

protected ArrayList<XLog> logs

currentProcess

protected XLog currentProcess

currentInstance

protected XTrace currentInstance

entry

protected XEvent entry

sourceAttribute

protected XAttributeLiteral sourceAttribute

genericAttribute

protected XAttributeLiteral genericAttribute

eventTypeAttribute

protected XAttributeLiteral eventTypeAttribute

originatorAttribute

protected XAttributeLiteral originatorAttribute

sourceOpen

protected boolean sourceOpen

timestamp

protected Date timestamp

lastTimestamp

protected Date lastTimestamp

numUnorderedEntries

protected int numUnorderedEntries
Constructor Detail

XMxmlParser.MxmlHandler

protected XMxmlParser.MxmlHandler()
Creates a new SAX2 handler instance.

Parameters:
aData - Parent container to store data to.
aFile - LogFile used for parsing.
Method Detail

getLogs

public List<XLog> getLogs()

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException

characters

public void characters(char[] str,
                       int offset,
                       int len)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] str,
                                int offset,
                                int len)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
Overrides:
ignorableWhitespace in class DefaultHandler
Throws:
SAXException