org.inxar.syntacs.util
Interface GraphViz

All Known Implementing Classes:
Dot

public interface GraphViz

GraphViz instances are used to generate graphviz dot files. These text files can be converted to a number of formats -- notably postscript -- and further converted to images such as PNG.


Inner Class Summary
static interface GraphViz.Edge
          An Edge is a triple (source, destination, attrs) where attrs is a list of attributes.
static interface GraphViz.Node
          A Node is a tuple (name, attrs) where attrs is a list of attributes.
 
Method Summary
 GraphViz attr(String key, String value)
          Adds a new attribute to the graph and returns the graph instance.
 GraphViz comment(String text)
          Sets the comment for the graph.
 GraphViz.Edge edge(String src, String dst)
          Adds a new Edge to the graph and returns it to the caller for further refinement.
 String getName()
          Returns the name of the graph.
 boolean isDirected()
          Returns true if this is a digraph instance (for input to the dot program, false if it is a non-directed graph (for input to the neato program).
 void isDirected(boolean value)
          Setter method for the directed flag.
 GraphViz.Node node(String name)
          Adds a new Node to the graph and returns it to the caller for further refinement.
 void setName(String name)
          The the name of the graph.
 GraphViz subgraph(String name)
          Adds a new subgraph to the graph and returns it to the caller for further refinement.
 

Method Detail

getName

public String getName()
Returns the name of the graph.

setName

public void setName(String name)
The the name of the graph.

isDirected

public boolean isDirected()
Returns true if this is a digraph instance (for input to the dot program, false if it is a non-directed graph (for input to the neato program).

isDirected

public void isDirected(boolean value)
Setter method for the directed flag.

comment

public GraphViz comment(String text)
Sets the comment for the graph.

attr

public GraphViz attr(String key,
                     String value)
Adds a new attribute to the graph and returns the graph instance.

node

public GraphViz.Node node(String name)
Adds a new Node to the graph and returns it to the caller for further refinement.

edge

public GraphViz.Edge edge(String src,
                          String dst)
Adds a new Edge to the graph and returns it to the caller for further refinement.

subgraph

public GraphViz subgraph(String name)
Adds a new subgraph to the graph and returns it to the caller for further refinement.