net.sf.mavenhist.extractor.jncss
Class JNCSSFunctionsPerPackageExtractor

java.lang.Object
  extended by net.sf.mavenhist.extractor.AbstractXMLValueExtractor
      extended by net.sf.mavenhist.extractor.AbstractValidatingXMLValueExtractor
          extended by net.sf.mavenhist.extractor.jncss.JNCSSFunctionsPerPackageExtractor
All Implemented Interfaces:
INamedExtractor, IValueExtractor, IXMLValueExtractor

public class JNCSSFunctionsPerPackageExtractor
extends AbstractValidatingXMLValueExtractor

Extracts the function count per package of a measured entity from a JavaNCSS-XML file.


Constructor Summary
JNCSSFunctionsPerPackageExtractor()
           
 
Method Summary
 MultiMetric[] extractValidatedDocument(Document document)
          Extracts muliple values from one result document.
 String getName()
          Gets the name of the entity.
protected  String getValidityTestXPath()
          The given xml-file will be tested with this xpath to be sure that the result will be valid.
 
Methods inherited from class net.sf.mavenhist.extractor.AbstractValidatingXMLValueExtractor
extract, isDocumentValid
 
Methods inherited from class net.sf.mavenhist.extractor.AbstractXMLValueExtractor
extract
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNCSSFunctionsPerPackageExtractor

public JNCSSFunctionsPerPackageExtractor()
Method Detail

extractValidatedDocument

public MultiMetric[] extractValidatedDocument(Document document)
                                       throws TransformerException
Extracts muliple values from one result document.

Specified by:
extractValidatedDocument in class AbstractValidatingXMLValueExtractor
Parameters:
document - to parse for the values.
Returns:
Array of metrics with the differentiated locations and values.
Throws:
TransformerException - the XML-Queries failed.

getValidityTestXPath

protected String getValidityTestXPath()
The given xml-file will be tested with this xpath to be sure that the result will be valid. It is necessairy that the xpath query has a result to mark the XML as okay.

Specified by:
getValidityTestXPath in class AbstractValidatingXMLValueExtractor
Returns:
XPath to check validity of the given file.

getName

public String getName()
Gets the name of the entity.

Returns:
the name.


Copyright © 2009. All Rights Reserved.