Package org.jgrapht.io
Class DOTExporter<V,E>
- java.lang.Object
-
- org.jgrapht.io.DOTExporter<V,E>
-
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
GraphExporter<V,E>
@Deprecated public class DOTExporter<V,E> extends Object implements GraphExporter<V,E>
Deprecated.In favor ofDOTExporter.Exports a graph into a DOT file.For a description of the format see http://en.wikipedia.org/wiki/DOT_language.
The user can adjust the behavior usingComponentNameProviderandComponentAttributeProviderinstances given through the constructor.- Author:
- Trevor Harmon
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_GRAPH_IDDeprecated.Default graph id used by the exporter.protected ComponentNameProvider<E>edgeIDProviderDeprecated.Provides an identifier for an edge.protected ComponentNameProvider<V>vertexIDProviderDeprecated.Provides an identifier for a vertex.
-
Constructor Summary
Constructors Constructor Description DOTExporter()Deprecated.Constructs a new DOTExporter object with an integer name provider for the vertex IDs and null providers for the vertex and edge labels.DOTExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeLabelProvider)Deprecated.Constructs a new DOTExporter object with the given ID and label providers.DOTExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeLabelProvider, ComponentAttributeProvider<V> vertexAttributeProvider, ComponentAttributeProvider<E> edgeAttributeProvider)Deprecated.Constructs a new DOTExporter object with the given ID, label, and attribute providers.DOTExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeLabelProvider, ComponentAttributeProvider<V> vertexAttributeProvider, ComponentAttributeProvider<E> edgeAttributeProvider, ComponentNameProvider<Graph<V,E>> graphIDProvider)Deprecated.Constructs a new DOTExporter object with the given ID, label, attribute, and graph id providers.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidexportGraph(Graph<V,E> g, Writer writer)Deprecated.Exports a graph into a plain text file in DOT format.ComponentNameProvider<E>getEdgeIDProvider()Deprecated.Get the edge id providerComponentNameProvider<V>getVertexIDProvider()Deprecated.Get the vertex id providervoidputGraphAttribute(String key, String value)Deprecated.Set a graph attribute.voidremoveGraphAttribute(String key)Deprecated.Clear a graph attribute.voidsetEdgeIDProvider(ComponentNameProvider<E> edgeIDProvider)Deprecated.Set the edge id provider.voidsetVertexIDProvider(ComponentNameProvider<V> vertexIDProvider)Deprecated.Set the vertex id provider-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgrapht.io.GraphExporter
exportGraph, exportGraph
-
-
-
-
Field Detail
-
DEFAULT_GRAPH_ID
public static final String DEFAULT_GRAPH_ID
Deprecated.Default graph id used by the exporter.- See Also:
- Constant Field Values
-
vertexIDProvider
protected ComponentNameProvider<V> vertexIDProvider
Deprecated.Provides an identifier for a vertex.
-
edgeIDProvider
protected ComponentNameProvider<E> edgeIDProvider
Deprecated.Provides an identifier for an edge.
-
-
Constructor Detail
-
DOTExporter
public DOTExporter()
Deprecated.Constructs a new DOTExporter object with an integer name provider for the vertex IDs and null providers for the vertex and edge labels.
-
DOTExporter
public DOTExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeLabelProvider)
Deprecated.Constructs a new DOTExporter object with the given ID and label providers.- Parameters:
vertexIDProvider- for generating vertex IDs. Must not be null.vertexLabelProvider- for generating vertex labels. If null, vertex labels will not be written to the file.edgeLabelProvider- for generating edge labels. If null, edge labels will not be written to the file.
-
DOTExporter
public DOTExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeLabelProvider, ComponentAttributeProvider<V> vertexAttributeProvider, ComponentAttributeProvider<E> edgeAttributeProvider)
Deprecated.Constructs a new DOTExporter object with the given ID, label, and attribute providers. Note that if a label provider conflicts with a label-supplying attribute provider, the label provider is given precedence.- Parameters:
vertexIDProvider- for generating vertex IDs. Must not be null.vertexLabelProvider- for generating vertex labels. If null, vertex labels will not be written to the file (unless an attribute provider is supplied which also supplies labels).edgeLabelProvider- for generating edge labels. If null, edge labels will not be written to the file.vertexAttributeProvider- for generating vertex attributes. If null, vertex attributes will not be written to the file.edgeAttributeProvider- for generating edge attributes. If null, edge attributes will not be written to the file.
-
DOTExporter
public DOTExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeLabelProvider, ComponentAttributeProvider<V> vertexAttributeProvider, ComponentAttributeProvider<E> edgeAttributeProvider, ComponentNameProvider<Graph<V,E>> graphIDProvider)
Deprecated.Constructs a new DOTExporter object with the given ID, label, attribute, and graph id providers. Note that if a label provider conflicts with a label-supplying attribute provider, the label provider is given precedence.- Parameters:
vertexIDProvider- for generating vertex IDs. Must not be null.vertexLabelProvider- for generating vertex labels. If null, vertex labels will not be written to the file (unless an attribute provider is supplied which also supplies labels).edgeLabelProvider- for generating edge labels. If null, edge labels will not be written to the file.vertexAttributeProvider- for generating vertex attributes. If null, vertex attributes will not be written to the file.edgeAttributeProvider- for generating edge attributes. If null, edge attributes will not be written to the file.graphIDProvider- for generating the graph ID. If null the graph is namedDEFAULT_GRAPH_ID.
-
-
Method Detail
-
exportGraph
public void exportGraph(Graph<V,E> g, Writer writer)
Deprecated.Exports a graph into a plain text file in DOT format.- Specified by:
exportGraphin interfaceGraphExporter<V,E>- Parameters:
g- the graph to be exportedwriter- the writer to which the graph to be exported
-
removeGraphAttribute
public void removeGraphAttribute(String key)
Deprecated.Clear a graph attribute.- Parameters:
key- the graph attribute key
-
putGraphAttribute
public void putGraphAttribute(String key, String value)
Deprecated.Set a graph attribute.- Parameters:
key- the graph attribute keyvalue- the graph attribute value
-
getVertexIDProvider
public ComponentNameProvider<V> getVertexIDProvider()
Deprecated.Get the vertex id provider- Returns:
- the vertex id provider
-
setVertexIDProvider
public void setVertexIDProvider(ComponentNameProvider<V> vertexIDProvider)
Deprecated.Set the vertex id provider- Parameters:
vertexIDProvider- the new vertex id provider. Must not be null.
-
getEdgeIDProvider
public ComponentNameProvider<E> getEdgeIDProvider()
Deprecated.Get the edge id provider- Returns:
- The edge provider
-
setEdgeIDProvider
public void setEdgeIDProvider(ComponentNameProvider<E> edgeIDProvider)
Deprecated.Set the edge id provider.- Parameters:
edgeIDProvider- the new edge id provider. Must not be null.
-
-