| java.lang.Object org.apache.batik.test.xml.XMLTestReportProcessor
All known Subclasses: org.apache.batik.test.svg.SVGAccuracyTestProcessor, org.apache.batik.test.xml.XSLXMLReportConsumer,
XMLTestReportProcessor | public class XMLTestReportProcessor implements TestReportProcessor,XTRConstants,XMLConstants(Code) | | This implementation of the TestReportProcessor interface
converts the TestReports it processes into an
XML document that it outputs in a directory. The directory
used by the object can be configured at creation time.
The XMLTestReportProcessor can optionally notify a
report consumer of the XML file it created.
author: Vincent Hardy version: $Id: XMLTestReportProcessor.java 482121 2006-12-04 10:00:39Z dvholten $ |
Inner Class :public static interface XMLReportConsumer | |
Method Summary | |
public void | checkDirectory(File dir, String errorCode) Checks that the input File represents a directory that
can be used. | protected void | copy(File in, File out) Utility method. | protected File | createResourceFileForName(String fileName) Untility method. | protected File | createResourceFileForName(String fileName, int instance) | protected String | encode(String attrValue) Poor way of replacing '<', '>', '"', '&' and '''
in attribute values. | public File | getReportDirectory() | public File | getReportResourcesDirectory() By default, the report resources directory is
given by a configuration variable. | public void | initializeReportDirectories() By default, the report directory is given by a configuration
variable. | protected String | makeTwoDigits(int i) | protected void | processEntry(TestReport.Entry entry, Element descriptionElement, Document reportDocument) | public void | processReport(TestReport report) Recursively processes the input TestReport and
any of its children. | protected void | processReport(TestReport report, Element reportElement, Document reportDocument) Recursively processes the input TestReport adding
the report information to the input element. | protected void | replace(StringBuffer s, char c, String r) | protected void | serializeAttributes(Element element, Writer writer) | protected void | serializeElement(Element element, String prefix, Writer writer) | protected File | serializeReport(Element reportElement) |
ERROR_REPORT_DIRECTORY_UNUSABLE | final public static String ERROR_REPORT_DIRECTORY_UNUSABLE(Code) | | Error message if report directory does not exist.
|
ERROR_REPORT_RESOURCES_DIRECTORY_UNUSABLE | final public static String ERROR_REPORT_RESOURCES_DIRECTORY_UNUSABLE(Code) | | Error message if report resources directory does not exist.
|
XML_REPORT_DIRECTORY | final public static String XML_REPORT_DIRECTORY(Code) | | Directory where the XML report is created
|
XML_RESOURCES_DIRECTORY | final public static String XML_RESOURCES_DIRECTORY(Code) | | Directory where resources (e.g., images) referenced by the
XML report are copied.
|
XML_TEST_REPORT_DEFAULT_DIRECTORY | final public static String XML_TEST_REPORT_DEFAULT_DIRECTORY(Code) | | Default report directory
|
XML_TEST_REPORT_NAME | final public static String XML_TEST_REPORT_NAME(Code) | | Test report name
|
consumer | protected XMLReportConsumer consumer(Code) | | The XMLReportConsumer instance is notified whenever
this object generates a new report.
|
reportDate | protected String reportDate(Code) | | String encoding the date the report was generated.
|
reportDirectory | protected File reportDirectory(Code) | | Directory into which this processor puts all files and resources.
|
xmlDirectory | protected File xmlDirectory(Code) | | Directory into which XML files are created
|
xmlResourcesDirectory | protected File xmlResourcesDirectory(Code) | | Directory into whichr resources refered to by XML files are created
|
XMLTestReportProcessor | public XMLTestReportProcessor()(Code) | | Default constructor
|
checkDirectory | public void checkDirectory(File dir, String errorCode) throws TestException(Code) | | Checks that the input File represents a directory that
can be used. If the directory does not exist, this method
will attempt to create it.
|
createResourceFileForName | protected File createResourceFileForName(String fileName)(Code) | | Untility method. Creates a file in the resources directory
for the given name. If a file in that directory does not
exist yet, then it is used. Otherwise, a file with the same
name with a digit suffix is created. For example, if "myFile.png"
is requested, then "myFile.png" is created or "myFile.png"
where will be one or several digits.
|
createResourceFileForName | protected File createResourceFileForName(String fileName, int instance)(Code) | | |
encode | protected String encode(String attrValue)(Code) | | Poor way of replacing '<', '>', '"', '&' and '''
in attribute values.
|
getReportDirectory | public File getReportDirectory()(Code) | | Returns the report directory
|
getReportResourcesDirectory | public File getReportResourcesDirectory()(Code) | | By default, the report resources directory is
given by a configuration variable.
|
initializeReportDirectories | public void initializeReportDirectories() throws TestException(Code) | | By default, the report directory is given by a configuration
variable. Each test run will create a sub directory with
the current date and time as the same. All the resources
created by the report processor are then put into that
"dated" directory.
|
makeTwoDigits | protected String makeTwoDigits(int i)(Code) | | Forces a two digit string
|
processReport | public void processReport(TestReport report) throws TestException(Code) | | Recursively processes the input TestReport and
any of its children.
|
processReport | protected void processReport(TestReport report, Element reportElement, Document reportDocument) throws IOException(Code) | | Recursively processes the input TestReport adding
the report information to the input element.
|
|
|