net.objectlab.qalab.parser
Class PMDCPDStatMerge

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

public class PMDCPDStatMerge
extends BaseStatMerge

This class is able to read the XML output from PMD CPD (Copy Paste Detector) and integrate the violation results into our "qalab" xml format.

 

Constructor Summary
PMDCPDStatMerge()
           
 
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

PMDCPDStatMerge

public PMDCPDStatMerge()
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
Throws:
org.xml.sax.SAXException - any SAX issue
Parameters:
ignoreNamespaceURI - ignore (present for interface implementation).
localname - name of the current element.
qualifiedname - element name.
attrs - the XML attribute of the current element.