net.objectlab.qalab.parser
Class SimianStatMerge

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by net.objectlab.qalab.parser.BaseStatMerge
          extended by net.objectlab.qalab.parser.SimianStatMerge
All Implemented Interfaces:
StatMerger, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class SimianStatMerge
extends BaseStatMerge

This class is able to read the XML output from Simian (version 2.x required) and integrate the violation results into our "qalab" xml format.

Version:
$Revision: 187 $
Author:
Benoit Xhenseval

Constructor Summary
SimianStatMerge()
           
 
Method Summary
 java.lang.String getType()
           
 void startElement(java.lang.String ignoreNamespaceURI, java.lang.String localname, java.lang.String qualifiedname, org.xml.sax.Attributes attrs)
          At the start of a new element, capture the filename and if the element is a result one, create a SingleStat to store for the given type.
 
Methods inherited from class net.objectlab.qalab.parser.BaseStatMerge
addFileStatistics, addNewResults, addTotalStatistics, getFileCount, getFileStatistics, getMergerTimeStamp, getSrcDir, getTaskLogger, getTotalStatistics, incrementFileCount, isQuiet, mergeStats, preProcessSource, resetFileStatistics, setCurrentFile, setMergerTimeStamp, setQuiet, setSrcDir, setTaskLogger, setTotalStatistics
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, 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
 

Constructor Detail

SimianStatMerge

public SimianStatMerge()
Method Detail

getType

public final java.lang.String getType()
Returns:
simian

startElement

public final void startElement(java.lang.String ignoreNamespaceURI,
                               java.lang.String localname,
                               java.lang.String qualifiedname,
                               org.xml.sax.Attributes attrs)
                        throws org.xml.sax.SAXException
At the start of a new element, capture the filename and if the element is a result one, create a SingleStat to store for the given type.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
ignoreNamespaceURI - ignore (present for interface implementation).
localname - name of the current element.
qualifiedname - element name.
attrs - the XML attribute of the current element.
Throws:
org.xml.sax.SAXException - any SAX issue