Java Doc for FlatXmlDataSet.java in  » Testing » DbUnit » org » dbunit » dataset » 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 » Testing » DbUnit » org.dbunit.dataset.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.dbunit.dataset.CachedDataSet
   org.dbunit.dataset.xml.FlatXmlDataSet

FlatXmlDataSet
public class FlatXmlDataSet extends CachedDataSet (Code)
Reads and writes flat XML dataset document. Each XML element corresponds to a table row. Each XML element name corresponds to a table name. The XML attributes correspond to table columns.

Flat XML dataset document sample:

 <!DOCTYPE dataset SYSTEM "my-dataset.dtd">
 <dataset>
 <TEST_TABLE COL0="row 0 col 0"
 COL1="row 0 col 1"
 COL2="row 0 col 2"/>
 <TEST_TABLE COL1="row 1 col 1"/>
 <SECOND_TABLE COL0="row 0 col 0"
 COL1="row 0 col 1" />
 <EMPTY_TABLE/>
 </dataset>

To specify null values, omit corresponding attribute. In the above example, missing COL0 and COL2 attributes of TEST_TABLE second row represents null values.

Table metadata is deduced from the first row of each table. Beware that DbUnit may think a table miss some columns if the first row of that table has one or more null values. Because of that, this is highly recommended to use DTD. DbUnit will use the columns declared in the DTD as table metadata. DbUnit only support external system URI. The URI can be absolute or relative.
author:
   Manuel Laflamme
version:
   $Revision: 554 $
since:
   Mar 12, 2002




Constructor Summary
public  FlatXmlDataSet(InputSource source)
     Creates an FlatXmlDataSet object with the specifed InputSource.
public  FlatXmlDataSet(File xmlFile)
     Creates an FlatXmlDataSet object with the specifed xml file.
public  FlatXmlDataSet(File xmlFile, boolean dtdMetadata)
     Creates an FlatXmlDataSet object with the specifed xml file.
public  FlatXmlDataSet(URL xmlUrl)
     Creates an FlatXmlDataSet object with the specifed xml URL.
public  FlatXmlDataSet(URL xmlUrl, boolean dtdMetadata)
     Creates an FlatXmlDataSet object with the specifed xml URL.
public  FlatXmlDataSet(Reader xmlReader)
     Creates an FlatXmlDataSet object with the specifed xml reader.
public  FlatXmlDataSet(Reader xmlReader, boolean dtdMetadata)
     Creates an FlatXmlDataSet object with the specifed xml reader.
public  FlatXmlDataSet(Reader xmlReader, Reader dtdReader)
     Creates an FlatXmlDataSet object with the specifed xml and dtd readers.
public  FlatXmlDataSet(Reader xmlReader, IDataSet metaDataSet)
     Creates an FlatXmlDataSet object with the specifed xml reader.
public  FlatXmlDataSet(InputStream xmlStream)
     Creates an FlatXmlDataSet object with the specifed xml input stream.
public  FlatXmlDataSet(InputStream xmlStream, boolean dtdMetadata)
     Creates an FlatXmlDataSet object with the specifed xml input stream.
public  FlatXmlDataSet(InputStream xmlStream, InputStream dtdStream)
     Creates an FlatXmlDataSet object with the specifed xml and dtd input stream.
public  FlatXmlDataSet(InputStream xmlStream, IDataSet metaDataSet)
     Creates an FlatXmlDataSet object with the specifed xml input stream.

Method Summary
public static  voidwrite(IDataSet dataSet, OutputStream out)
     Write the specified dataset to the specified output stream as xml.
public static  voidwrite(IDataSet dataSet, Writer writer)
     Write the specified dataset to the specified writer as xml.
public static  voidwrite(IDataSet dataSet, Writer writer, String encoding)
     Write the specified dataset to the specified writer as xml.
public static  voidwriteDtd(IDataSet dataSet, OutputStream out)
     Write a DTD for the specified dataset to the specified output.


Constructor Detail
FlatXmlDataSet
public FlatXmlDataSet(InputSource source) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed InputSource.



FlatXmlDataSet
public FlatXmlDataSet(File xmlFile) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml file. Relative DOCTYPE uri are resolved from the xml file path.
Parameters:
  xmlFile - the xml file



FlatXmlDataSet
public FlatXmlDataSet(File xmlFile, boolean dtdMetadata) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml file. Relative DOCTYPE uri are resolved from the xml file path.
Parameters:
  xmlFile - the xml file
Parameters:
  dtdMetadata - if false do not use DTD as metadata



FlatXmlDataSet
public FlatXmlDataSet(URL xmlUrl) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml URL. Relative DOCTYPE uri are resolved from the xml file path.
Parameters:
  xmlUrl - the xml URL



FlatXmlDataSet
public FlatXmlDataSet(URL xmlUrl, boolean dtdMetadata) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml URL. Relative DOCTYPE uri are resolved from the xml file path.
Parameters:
  xmlUrl - the xml URL
Parameters:
  dtdMetadata - if false do not use DTD as metadata



FlatXmlDataSet
public FlatXmlDataSet(Reader xmlReader) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml reader. Relative DOCTYPE uri are resolved from the current working dicrectory.
Parameters:
  xmlReader - the xml reader



FlatXmlDataSet
public FlatXmlDataSet(Reader xmlReader, boolean dtdMetadata) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml reader. Relative DOCTYPE uri are resolved from the current working dicrectory.
Parameters:
  xmlReader - the xml reader
Parameters:
  dtdMetadata - if false do not use DTD as metadata



FlatXmlDataSet
public FlatXmlDataSet(Reader xmlReader, Reader dtdReader) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml and dtd readers.
Parameters:
  xmlReader - the xml reader
Parameters:
  dtdReader - the dtd reader



FlatXmlDataSet
public FlatXmlDataSet(Reader xmlReader, IDataSet metaDataSet) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml reader.
Parameters:
  xmlReader - the xml reader
Parameters:
  metaDataSet - the dataset used as metadata source.



FlatXmlDataSet
public FlatXmlDataSet(InputStream xmlStream) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml input stream. Relative DOCTYPE uri are resolved from the current working dicrectory.
Parameters:
  xmlStream - the xml input stream



FlatXmlDataSet
public FlatXmlDataSet(InputStream xmlStream, boolean dtdMetadata) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml input stream. Relative DOCTYPE uri are resolved from the current working dicrectory.
Parameters:
  xmlStream - the xml input stream
Parameters:
  dtdMetadata - if false do not use DTD as metadata



FlatXmlDataSet
public FlatXmlDataSet(InputStream xmlStream, InputStream dtdStream) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml and dtd input stream.
Parameters:
  xmlStream - the xml input stream
Parameters:
  dtdStream - the dtd input stream



FlatXmlDataSet
public FlatXmlDataSet(InputStream xmlStream, IDataSet metaDataSet) throws IOException, DataSetException(Code)
Creates an FlatXmlDataSet object with the specifed xml input stream.
Parameters:
  xmlStream - the xml input stream
Parameters:
  metaDataSet - the dataset used as metadata source.




Method Detail
write
public static void write(IDataSet dataSet, OutputStream out) throws IOException, DataSetException(Code)
Write the specified dataset to the specified output stream as xml.



write
public static void write(IDataSet dataSet, Writer writer) throws IOException, DataSetException(Code)
Write the specified dataset to the specified writer as xml.



write
public static void write(IDataSet dataSet, Writer writer, String encoding) throws IOException, DataSetException(Code)
Write the specified dataset to the specified writer as xml.



writeDtd
public static void writeDtd(IDataSet dataSet, OutputStream out) throws IOException, DataSetException(Code)
Write a DTD for the specified dataset to the specified output. FlatDtdDataSet.write



Methods inherited from org.dbunit.dataset.CachedDataSet
protected ITableIterator createIterator(boolean reversed) throws DataSetException(Code)(Java Doc)
public void endDataSet() throws DataSetException(Code)(Java Doc)
public void endTable() throws DataSetException(Code)(Java Doc)
public void row(Object[] values) throws DataSetException(Code)(Java Doc)
public void startDataSet() throws DataSetException(Code)(Java Doc)
public void startTable(ITableMetaData metaData) throws DataSetException(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.