|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
net.objectlab.qalab.parser.BaseStatMerge
net.objectlab.qalab.parser.CoberturaLineStatMerge
public class CoberturaLineStatMerge
This class is able to read the XML output from Cobertura (LINE INFORMATION) and integrate the violation results into our "qalab" xml format.
| Constructor Summary | |
|---|---|
CoberturaLineStatMerge()
|
|
| Method Summary | |
|---|---|
void |
endElement(java.lang.String ignoreNamespaceURI,
java.lang.String ignoreSimplename,
java.lang.String qualifiedname)
At the end of an element, check if it is a file one and add the results found. |
protected java.lang.String |
getSummaryTag()
|
int |
getTotalStatistics()
For Cobertura the total statistics is the average of coverage, ie sum of all percentages divided by the TOTAL number of files (ie we do not report ZERO % coverage but they should count). |
java.lang.String |
getType()
|
protected org.xml.sax.InputSource |
preProcessSource(org.xml.sax.InputSource source)
This is required to get rid of the SYSTEM DTD otherwise one cannot parse coverage.xml behind most firewalls or offline. |
protected void |
setFileName(org.xml.sax.Attributes att)
set the file name from the attributes from Findbugs XML. |
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, incrementFileCount, isQuiet, mergeStats, resetFileStatistics, setCurrentFile, setMergerTimeStamp, setQuiet, setSrcDir, setTaskLogger, setTotalStatistics |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
characters, endDocument, 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 |
|---|
public CoberturaLineStatMerge()
| Method Detail |
|---|
public java.lang.String getType()
protected final java.lang.String getSummaryTag()
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
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerignoreNamespaceURI - ignore (present for interface implementation).localname - name of the current element.qualifiedname - element name.attrs - the XML attribute of the current element.
org.xml.sax.SAXException - any SAX issue
public final void endElement(java.lang.String ignoreNamespaceURI,
java.lang.String ignoreSimplename,
java.lang.String qualifiedname)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerignoreNamespaceURI - ignore (present for interface implementation).ignoreSimplename - ignore (present for interface implementation).qualifiedname - the name of the element.
org.xml.sax.SAXException - any SAX issueprotected void setFileName(org.xml.sax.Attributes att)
att - xml attributespublic int getTotalStatistics()
getTotalStatistics in interface StatMergergetTotalStatistics in class BaseStatMergeprotected org.xml.sax.InputSource preProcessSource(org.xml.sax.InputSource source)
preProcessSource in class BaseStatMerge
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||