/** * Produces a graph depicting the old and new and the delta between them. Output is in SVG format. * * @param catalogName The name to generate as title in the graph. May be <code>null</code> * @param oldCatalogSream * @param newCatalogStream * @param svgStream * @param monitor * @param root - the root for files listed as source files in the catalog */ public void produceSVGDeltaGraph( String catalogName, InputStream oldCatalogStream, IPath oldRoot, InputStream newCatalogStream, IPath newRoot, OutputStream svgStream, IProgressMonitor monitor) throws IOException { final SubMonitor ticker = SubMonitor.convert(monitor, 2000); CatalogDeltaGraphProducer graphProducer = new CatalogDeltaGraphProducer(hrefProducer, prefix); Catalog oldCatalog = CatalogJsonSerializer.load(oldCatalogStream); Catalog newCatalog = CatalogJsonSerializer.load(newCatalogStream); ICancel cancel = new ProgressMonitorCancelIndicator(ticker.newChild(IProgressMonitor.UNKNOWN), 1000); ByteArrayOutputStream2 out = new ByteArrayOutputStream2(); graphProducer.produceGraph(cancel, catalogName, oldCatalog, oldRoot, newCatalog, newRoot, out); graphProducer .getSVGProducer() .produceSVG( out.toInputStream(false), svgStream, false, // ticker.newChild(IProgressMonitor.UNKNOWN)); }