public abstract class XMLGraphWriter extends Object implements IReportWriter
IReportWriter
that transforms a DependencyGraph
to output in XMLModifier and Type | Field and Description |
---|---|
protected Document |
doc |
protected DependencyGraph |
graph |
protected Collection<ICompilationUnit> |
roots |
Constructor and Description |
---|
XMLGraphWriter(DependencyGraph graph,
Collection<ICompilationUnit> roots)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected String |
formatXMLStyleQName(String qname)
Helper function to help format a qname
String into the XML style of prefix:name that
the old compiler used. |
protected void |
writeReport(OutputStream outStream)
Writes this class's report
Document to the OutputStream |
abstract void |
writeToStream(OutputStream outStream,
Collection<ICompilerProblem> problems)
Writes the current graph state and root compilation nodes to the output stream specified
as a link report.
|
protected DependencyGraph graph
protected Collection<ICompilationUnit> roots
protected Document doc
public XMLGraphWriter(DependencyGraph graph, Collection<ICompilationUnit> roots)
graph
- A dependency graph for this graph writerroots
- The root compilation nodes to be writtenpublic abstract void writeToStream(OutputStream outStream, Collection<ICompilerProblem> problems) throws InterruptedException
IReportWriter
This should only be called when all compilation units are finished. There are no guarantees on the effects if called when compiler threads are still running.
writeToStream
in interface IReportWriter
outStream
- An OutputStream
that the report will be written toproblems
- A Collection
of ICompilerProblem
that this class will add to in case of exceptions or problemsInterruptedException
- can occur if this method is called while compilation is happeningprotected void writeReport(OutputStream outStream) throws TransformerException
Document
to the OutputStream
outStream
- The OutputStream
that will be written to.IOException
TransformerException
Copyright © 2016 The Apache Software Foundation. All rights reserved.