net.sourceforge.groboutils.codecoverage.v2.ant
Class SourceXslReportStyle

java.lang.Object
  extended bynet.sourceforge.groboutils.codecoverage.v2.ant.SourceXslReportStyle
All Implemented Interfaces:
IReportStyle, IXmlReportConst
Direct Known Subclasses:
SourceHtmlReportStyle

public class SourceXslReportStyle
extends java.lang.Object
implements IReportStyle, IXmlReportConst

This is a combo report, which means that it only works with the combined coverage file. Use of this style is really delicate.

Since:
March 15, 2004
Version:
$Date: 2004/07/07 09:39:09 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Nested Class Summary
static class SourceXslReportStyle.DirType
           
static class SourceXslReportStyle.StyleType
           
 
Field Summary
 
Fields inherited from interface net.sourceforge.groboutils.codecoverage.v2.report.IXmlReportConst
A_CLASSNAME, A_CLASSSIGNATURE, A_COVERED, A_COVERED_DISP, A_INDEX, A_MEASURE, A_METHODSIGNATURE, A_METHODSIGNATURE_REAL, A_NAME, A_PACKAGE, A_PERCENTCOVERED, A_PERCENTCOVERED_DISP, A_SOURCEFILE, A_SOURCELINE, A_TEXT, A_TOTAL, A_TOTAL_DISP, A_UNIT, A_WEIGHT, A_WEIGHTEDPERCENT, A_WEIGHTEDPERCENT_DISP, T_CLASSCOVERAGE, T_COVER, T_COVERAGEREPORT, T_MARK, T_METHODCOVERAGE, T_PACKAGE
 
Constructor Summary
SourceXslReportStyle()
           
 
Method Summary
 void addFile(SourceXslReportStyle.StyleType s)
           
 void addPackageStyle(SourceXslReportStyle.StyleType s)
           
 void addParam(SimpleXslReportStyle.ParamType pt)
           
 void addRootStyle(SourceXslReportStyle.StyleType s)
           
 void addSourceStyle(SourceXslReportStyle.StyleType s)
           
 void addSrcDir(SourceXslReportStyle.DirType dt)
          Add a new source directory to this report.
protected  void clearCache(java.util.Enumeration styles)
           
protected  void copyResources(org.apache.tools.ant.Project project)
           
 void generateReport(org.apache.tools.ant.Project project, org.w3c.dom.Document doc, java.lang.String moduleName)
           
protected  java.lang.String getOutFileBase(java.lang.String baseName)
           
protected  StyleTransformer getRemoveEmptiesStyle(org.apache.tools.ant.Project project)
           
protected  java.io.File getSourceFile(java.lang.String sourceName, org.apache.tools.ant.Project project)
          Returns the first file from the list of source directories that contains the given sourcefile.
protected  java.lang.String getStylesheetSystemIdForClass(java.lang.String name)
           
protected  java.lang.String getStylesheetSystemIdForFile(java.io.File f)
           
protected  StyleTransformer getStyleTransformer(org.apache.tools.ant.Project project, SourceXslReportStyle.StyleType s)
           
protected  java.lang.String getUpDir(java.lang.String filename)
           
 void reportComplete(org.apache.tools.ant.Project project, java.util.Vector errors)
          Called when the task is finished generating all the reports.
 void setDestDir(java.io.File dir)
           
 void setRemoveEmpty(boolean on)
           
 void setSrcDir(java.io.File dir)
           
 void setStyleCacheCount(int count)
           
protected  void setupStyles()
           
protected  void setupStyles(java.util.Enumeration e)
           
protected  void transform(org.apache.tools.ant.Project project, org.w3c.dom.Document doc, java.util.Enumeration styles, java.lang.String baseOutName)
           
protected  void transformPackages(org.apache.tools.ant.Project project, org.w3c.dom.Document doc)
           
protected  void transformRoots(org.apache.tools.ant.Project project, org.w3c.dom.Document doc)
           
protected  void transformSources(org.apache.tools.ant.Project project, org.w3c.dom.Document doc)
          This is the biggest time eater.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceXslReportStyle

public SourceXslReportStyle()
Method Detail

setStyleCacheCount

public void setStyleCacheCount(int count)
                        throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

setDestDir

public void setDestDir(java.io.File dir)

setSrcDir

public void setSrcDir(java.io.File dir)

addRootStyle

public void addRootStyle(SourceXslReportStyle.StyleType s)

addSourceStyle

public void addSourceStyle(SourceXslReportStyle.StyleType s)

addPackageStyle

public void addPackageStyle(SourceXslReportStyle.StyleType s)

addFile

public void addFile(SourceXslReportStyle.StyleType s)

addSrcDir

public void addSrcDir(SourceXslReportStyle.DirType dt)
Add a new source directory to this report.


addParam

public void addParam(SimpleXslReportStyle.ParamType pt)

setRemoveEmpty

public void setRemoveEmpty(boolean on)

reportComplete

public void reportComplete(org.apache.tools.ant.Project project,
                           java.util.Vector errors)
                    throws org.apache.tools.ant.BuildException,
                           java.io.IOException
Called when the task is finished generating all the reports. This may be useful for styles that join all the reports together.

Specified by:
reportComplete in interface IReportStyle
Throws:
org.apache.tools.ant.BuildException
java.io.IOException

generateReport

public void generateReport(org.apache.tools.ant.Project project,
                           org.w3c.dom.Document doc,
                           java.lang.String moduleName)
                    throws org.apache.tools.ant.BuildException,
                           java.io.IOException
Specified by:
generateReport in interface IReportStyle
Parameters:
doc - the XML document of the coverage report to process.
Throws:
org.apache.tools.ant.BuildException
java.io.IOException

setupStyles

protected void setupStyles()

setupStyles

protected void setupStyles(java.util.Enumeration e)

transformSources

protected void transformSources(org.apache.tools.ant.Project project,
                                org.w3c.dom.Document doc)
                         throws java.io.IOException
This is the biggest time eater. This takes friggin' forever.

Throws:
java.io.IOException

transformPackages

protected void transformPackages(org.apache.tools.ant.Project project,
                                 org.w3c.dom.Document doc)
                          throws java.io.IOException
Throws:
java.io.IOException

transformRoots

protected void transformRoots(org.apache.tools.ant.Project project,
                              org.w3c.dom.Document doc)
                       throws java.io.IOException
Throws:
java.io.IOException

copyResources

protected void copyResources(org.apache.tools.ant.Project project)
                      throws java.io.IOException
Throws:
java.io.IOException

transform

protected void transform(org.apache.tools.ant.Project project,
                         org.w3c.dom.Document doc,
                         java.util.Enumeration styles,
                         java.lang.String baseOutName)
                  throws java.io.IOException
Throws:
java.io.IOException

clearCache

protected void clearCache(java.util.Enumeration styles)

getRemoveEmptiesStyle

protected StyleTransformer getRemoveEmptiesStyle(org.apache.tools.ant.Project project)
                                          throws java.io.IOException
Throws:
java.io.IOException

getSourceFile

protected java.io.File getSourceFile(java.lang.String sourceName,
                                     org.apache.tools.ant.Project project)
Returns the first file from the list of source directories that contains the given sourcefile.


getOutFileBase

protected java.lang.String getOutFileBase(java.lang.String baseName)

getUpDir

protected java.lang.String getUpDir(java.lang.String filename)

getStyleTransformer

protected StyleTransformer getStyleTransformer(org.apache.tools.ant.Project project,
                                               SourceXslReportStyle.StyleType s)
                                        throws java.io.IOException
Throws:
java.io.IOException

getStylesheetSystemIdForFile

protected java.lang.String getStylesheetSystemIdForFile(java.io.File f)
                                                 throws java.io.IOException
Throws:
java.io.IOException

getStylesheetSystemIdForClass

protected java.lang.String getStylesheetSystemIdForClass(java.lang.String name)
                                                  throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2001-2003 by The GroboUtils Project