| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
public class AggregateTransformer
Transform a JUnit xml report. The default transformation generates an html report in either framed or non-framed style. The non-framed style is convenient to have a concise report via mail, the framed report is much more convenient if you want to browse into different packages or testcases since it is a Javadoc like report.
| Nested Class Summary | |
|---|---|
| static class | AggregateTransformer.Formatdefines acceptable formats. | 
| Field Summary | |
|---|---|
| protected static javax.xml.parsers.DocumentBuilderFactory | dbfactoryXML Parser factory accessible to subclasses | 
| protected  org.w3c.dom.Document | documentthe xml document to process | 
| protected  java.lang.String | formatthe format to use for the report. | 
| static java.lang.String | FRAMESname of the frames format. | 
| static java.lang.String | NOFRAMESname of the no frames format. | 
| protected  java.io.File | styleDirthe style directory. | 
| protected  Task | taskTask | 
| protected  java.io.File | toDirthe destination directory, this is the root from where html should be generated | 
| Constructor Summary | |
|---|---|
| AggregateTransformer(Task task)constructor creating the transformer from the junitreport task. | |
| Method Summary | |
|---|---|
| protected  void | checkOptions()check for invalid options | 
|  XSLTProcess.Param | createParam()Create an instance of an XSL parameter for configuration by Ant. | 
| protected static javax.xml.parsers.DocumentBuilderFactory | getDocumentBuilderFactory()Get the Document Builder Factory | 
| protected  Resource | getStylesheet()access the stylesheet to be used as a resource. | 
| protected  java.lang.String | getStylesheetSystemId()Get the systemid of the appropriate stylesheet based on its name and styledir. | 
|  void | setExtension(java.lang.String ext)set the extension of the output files | 
|  void | setFormat(AggregateTransformer.Format format)sets the format. | 
|  void | setStyledir(java.io.File styledir)set the style directory. | 
|  void | setTodir(java.io.File todir)set the destination directory. | 
|  void | setXmlDocument(org.w3c.dom.Document doc)sets the input document. | 
| protected  void | setXmlfile(java.io.File xmlfile)Set the xml file to be processed. | 
|  void | transform()transformation | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String FRAMES
public static final java.lang.String NOFRAMES
protected Task task
protected org.w3c.dom.Document document
protected java.io.File styleDir
protected java.io.File toDir
protected java.lang.String format
protected static javax.xml.parsers.DocumentBuilderFactory dbfactory
| Constructor Detail | 
|---|
public AggregateTransformer(Task task)
task - task delegating to this class| Method Detail | 
|---|
protected static javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
public void setFormat(AggregateTransformer.Format format)
format - Must be FRAMES or NOFRAMESpublic void setXmlDocument(org.w3c.dom.Document doc)
doc - input dom tree
protected void setXmlfile(java.io.File xmlfile)
                   throws BuildException
xmlfile - xml file to be processed
BuildException - if the document cannot be parsed.public void setStyledir(java.io.File styledir)
styledir - the directory containing the xsl files if the user
 would like to override with its own style.public void setTodir(java.io.File todir)
todir - the destination directorypublic void setExtension(java.lang.String ext)
ext - extension.public XSLTProcess.Param createParam()
public void transform()
               throws BuildException
BuildException - exception if something goes wrong with the transformation.protected Resource getStylesheet()
protected void checkOptions()
                     throws BuildException
BuildException - if something goes wrong.
protected java.lang.String getStylesheetSystemId()
                                          throws java.io.IOException
java.io.IOException - thrown if the requested stylesheet does
 not exist.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||