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:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Enclosing class:
XMxmlParser

protected class XMxmlParser.MxmlHandler
extends org.xml.sax.helpers.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  java.lang.StringBuffer buffer
          Buffer for characters.
protected  XTrace currentInstance
           
protected  XLog currentProcess
           
protected  XEvent entry
           
protected  XAttributeLiteral eventTypeAttribute
           
protected  XAttributeLiteral genericAttribute
           
protected  java.util.Date lastTimestamp
           
protected  java.util.ArrayList<XLog> logs
           
protected  int numUnorderedEntries
           
protected  XAttributeLiteral originatorAttribute
           
protected  XAttributeLiteral sourceAttribute
           
protected  boolean sourceOpen
           
protected  java.util.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(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 java.util.List<XLog> getLogs()
           
 void ignorableWhitespace(char[] str, int offset, int len)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.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 java.lang.StringBuffer buffer
Buffer for characters.


logs

protected java.util.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 java.util.Date timestamp

lastTimestamp

protected java.util.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 java.util.List<XLog> getLogs()

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

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

characters

public void characters(char[] str,
                       int offset,
                       int len)
                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

ignorableWhitespace

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