/** * 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)); }
/** * 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 produceDOTDeltaGraph( String catalogName, InputStream oldCatalogStream, IPath oldRoot, InputStream newCatalogStream, IPath newRoot, OutputStream dotStream, IProgressMonitor monitor) throws IOException { final SubMonitor ticker = SubMonitor.convert(monitor, 1000); 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); graphProducer.produceGraph( cancel, catalogName, oldCatalog, oldRoot, newCatalog, newRoot, dotStream); }
public void produceDOTGraph( String catalogName, InputStream catalogStream, OutputStream dotStream, IProgressMonitor monitor, IPath root) throws IOException { final SubMonitor ticker = SubMonitor.convert(monitor, 1000); CatalogGraphProducer graphProducer = new CatalogGraphProducer(hrefProducer, prefix); ICancel cancel = new ProgressMonitorCancelIndicator(ticker.newChild(IProgressMonitor.UNKNOWN), 1000); Catalog catalog = CatalogJsonSerializer.load(catalogStream); graphProducer.produceGraph(cancel, catalog, catalogName, dotStream, root); }