de.smartics.testdoc.core.export
Class XmlExporter

Package class diagram package XmlExporter
java.lang.Object
  extended by de.smartics.testdoc.core.export.XmlExporter
All Implemented Interfaces:
UnitTestDocExporter

public class XmlExporter
     
     
extends Object
implements UnitTestDocExporter

Exports the gathered test documentation to XML.

Author:
Robert Reiner

Constructor Summary
XmlExporter()
          Convenience constructor with pretty print turned on.
XmlExporter(boolean prettyPrint)
          Default constructor.
 
Method Summary
 void export(UnitTestDoc testDoc, OutputStream output)
          Exports the given test documentation to the stream.
 String getFileExtension()
          Returns the extension for the files being exported by this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlExporter

public XmlExporter()
            throws ParserConfigurationException
Convenience constructor with pretty print turned on.

Throws:
ParserConfigurationException - if the XML infrastructure cannot be established.

XmlExporter

public XmlExporter(boolean prettyPrint)
            throws ParserConfigurationException
Default constructor.

Parameters:
prettyPrint - the flag determines whether or not the XML file should be pretty-printed ( true) or not ( false ).
Throws:
ParserConfigurationException - if the XML infrastructure cannot be established.
Method Detail

getFileExtension

public String getFileExtension()
Returns the extension for the files being exported by this instance.

Specified by:
getFileExtension in interface UnitTestDocExporter
Returns:
xml.
See Also:
UnitTestDocExporter.getFileExtension()

export

public void export(UnitTestDoc testDoc,
                   OutputStream output)
            throws IOException,
                   NullPointerException
Exports the given test documentation to the stream.

Specified by:
export in interface UnitTestDocExporter
Parameters:
testDoc - the documentation to export.
output - the stream to write to.
Throws:
IOException - on any problem writing to the stream.
NullPointerException - if any of the arguments is null.
See Also:
UnitTestDocExporter.export(de.smartics.testdoc.core.doc.UnitTestDoc, java.io.OutputStream)


Copyright © 2010-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.