org.eigenbase.dmv
Class DmvGraphvizRenderer

java.lang.Object
  extended by org.eigenbase.dmv.DmvGraphvizRenderer

public class DmvGraphvizRenderer
extends Object

DmvGraphvizRenderer renders a DmvResponse as a .dot file suitable for input to Graphviz.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/dmv/DmvGraphvizRenderer.java#5 $
Author:
John Sichi

Field Summary
private  JmiDependencyGraph dependencyGraph
           
private  org.jgrapht.DirectedGraph<JmiDependencyVertex,org.jgrapht.graph.DefaultEdge> hierarchyGraph
           
private  PrintWriter pw
           
private  DmvResponse response
           
 
Constructor Summary
DmvGraphvizRenderer()
           
 
Method Summary
private  JmiDependencyVertex getHierarchyRep(JmiDependencyVertex vertex)
           
private  String getVertexId(JmiDependencyVertex vertex)
           
private  String getVertexName(JmiDependencyVertex vertex)
           
private  boolean isClusterChild(JmiDependencyVertex vertex)
           
private  boolean isClusterParent(JmiDependencyVertex vertex)
           
 void renderDmv(DmvResponse response, Writer writer)
          Renders a DmvResponse in .dot format and writes the result to a Writer.
private  void renderEdges()
           
private  void renderGraph()
           
private  void renderVertex(JmiDependencyVertex vertex)
           
private  void renderVertices()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pw

private PrintWriter pw

response

private DmvResponse response

dependencyGraph

private JmiDependencyGraph dependencyGraph

hierarchyGraph

private org.jgrapht.DirectedGraph<JmiDependencyVertex,org.jgrapht.graph.DefaultEdge> hierarchyGraph
Constructor Detail

DmvGraphvizRenderer

public DmvGraphvizRenderer()
Method Detail

renderDmv

public void renderDmv(DmvResponse response,
                      Writer writer)
Renders a DmvResponse in .dot format and writes the result to a Writer.


renderGraph

private void renderGraph()

renderVertices

private void renderVertices()

renderVertex

private void renderVertex(JmiDependencyVertex vertex)

renderEdges

private void renderEdges()

getVertexId

private String getVertexId(JmiDependencyVertex vertex)

getVertexName

private String getVertexName(JmiDependencyVertex vertex)

isClusterParent

private boolean isClusterParent(JmiDependencyVertex vertex)

isClusterChild

private boolean isClusterChild(JmiDependencyVertex vertex)

getHierarchyRep

private JmiDependencyVertex getHierarchyRep(JmiDependencyVertex vertex)