Java Doc for XMLTestReportProcessor.java in  » Graphic-Library » batik » org » apache » batik » test » xml » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » batik » org.apache.batik.test.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

Field Summary
final public static  StringERROR_REPORT_DIRECTORY_UNUSABLE
     Error message if report directory does not exist.
final public static  StringERROR_REPORT_RESOURCES_DIRECTORY_UNUSABLE
     Error message if report resources directory does not exist.
final public static  StringXML_REPORT_DIRECTORY
    
final public static  StringXML_RESOURCES_DIRECTORY
     Directory where resources (e.g., images) referenced by the XML report are copied.
final public static  StringXML_TEST_REPORT_DEFAULT_DIRECTORY
    
final public static  StringXML_TEST_REPORT_NAME
    
protected  XMLReportConsumerconsumer
     The XMLReportConsumer instance is notified whenever this object generates a new report.
protected  StringreportDate
     String encoding the date the report was generated.
protected  FilereportDirectory
     Directory into which this processor puts all files and resources.
protected  FilexmlDirectory
    
protected  FilexmlResourcesDirectory
    

Constructor Summary
public  XMLTestReportProcessor()
    
public  XMLTestReportProcessor(XMLTestReportProcessor.XMLReportConsumer consumer)
    
Parameters:
  consumer - consumer for the XML report generatedby this object.

Method Summary
public  voidcheckDirectory(File dir, String errorCode)
     Checks that the input File represents a directory that can be used.
protected  voidcopy(File in, File out)
     Utility method.
protected  FilecreateResourceFileForName(String fileName)
     Untility method.
protected  FilecreateResourceFileForName(String fileName, int instance)
    
protected  Stringencode(String attrValue)
     Poor way of replacing '<', '>', '"', '&' and ''' in attribute values.
public  FilegetReportDirectory()
    
public  FilegetReportResourcesDirectory()
     By default, the report resources directory is given by a configuration variable.
public  voidinitializeReportDirectories()
     By default, the report directory is given by a configuration variable.
protected  StringmakeTwoDigits(int i)
    
protected  voidprocessEntry(TestReport.Entry entry, Element descriptionElement, Document reportDocument)
    
public  voidprocessReport(TestReport report)
     Recursively processes the input TestReport and any of its children.
protected  voidprocessReport(TestReport report, Element reportElement, Document reportDocument)
     Recursively processes the input TestReport adding the report information to the input element.
protected  voidreplace(StringBuffer s, char c, String r)
    
protected  voidserializeAttributes(Element element, Writer writer)
    
protected  voidserializeElement(Element element, String prefix, Writer writer)
    
protected  FileserializeReport(Element reportElement)
    

Field Detail
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




Constructor Detail
XMLTestReportProcessor
public XMLTestReportProcessor()(Code)
Default constructor



XMLTestReportProcessor
public XMLTestReportProcessor(XMLTestReportProcessor.XMLReportConsumer consumer)(Code)

Parameters:
  consumer - consumer for the XML report generatedby this object. May be null.




Method Detail
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.



copy
protected void copy(File in, File out) throws IOException(Code)
Utility method. Copies in to out



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



processEntry
protected void processEntry(TestReport.Entry entry, Element descriptionElement, Document reportDocument) throws IOException(Code)



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.



replace
protected void replace(StringBuffer s, char c, String r)(Code)



serializeAttributes
protected void serializeAttributes(Element element, Writer writer) throws IOException(Code)



serializeElement
protected void serializeElement(Element element, String prefix, Writer writer) throws IOException(Code)



serializeReport
protected File serializeReport(Element reportElement) throws IOException(Code)
Saves the XML document into a file



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.