org.eclipse.gef4.dot

## Class DotExport

- java.lang.Object
- - org.eclipse.gef4.dot.DotExport

    public final class DotExport
    extends java.lang.Object

Transformation of Zest Graph instances to DOT strings or files, or via DOT to an image generated by calling the 'dot' executable.

### Field Summary

Fields
`static java.lang.String` `DOT_BIN_DIR_KEY`

### Constructor Summary

Constructors
Constructor and Description
`DotExport(org.eclipse.gef4.graph.Graph graph)`
`DotExport(java.lang.String dotString)`

### Method Summary

Methods
`java.io.File` `toDotFile(java.io.File destination)` Export a Zest Graph to a DOT file.
`java.lang.String` `toDotString()` Export a Zest Graph to a DOT string.
`java.io.File` `toImage(java.lang.String dotBinDir, java.lang.String resultFile)`
`java.io.File` `toImage(java.lang.String dotDir, java.lang.String format, java.lang.String resultFile)`
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DOT_BIN_DIR_KEY

    public static final java.lang.String DOT_BIN_DIR_KEY

See Also:
  Constant Field Values

### Constructor Detail

#### DotExport

    public DotExport(org.eclipse.gef4.graph.Graph graph)

Parameters:
  `graph` - The Zest graph to export to DOT

#### DotExport

    public DotExport(java.lang.String dotString)

Parameters:
  `dotString` - The DOT graph to export to an image

### Method Detail

#### toDotString

    public java.lang.String toDotString()

Export a Zest Graph to a DOT string.

Returns:
  The DOT representation of the given Zest graph

#### toDotFile

    public java.io.File toDotFile(java.io.File destination)

Export a Zest Graph to a DOT file.

Parameters:
  `destination` - The file to store the DOT export
Returns:
  The given file

#### toImage

    public java.io.File toImage(java.lang.String dotBinDir,
                       java.lang.String resultFile)

Parameters:
  `dotBinDir` - The directory containing the local Graphviz 'dot' binary, e.g. "/usr/bin"
  `resultFile` - The output image file name, e.g. "output.pdf" (can be null, will result in export to temp result file with unpecified default format)
Returns:
  The image file generated by rendering the output of `toDotString()` with Graphviz, using the format of the specified output file

#### toImage

    public java.io.File toImage(java.lang.String dotDir,
                       java.lang.String format,
                       java.lang.String resultFile)

Parameters:
  `dotDir` - The directory containing the 'dot' executable of the local Graphviz installation
  `format` - The image format to export the graph to (e.g. 'pdf' or 'png')
  `resultFile` -
Returns:
  The image file exported via DOT for the given Zest graph, or null

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`