org.jgrapht.ext
Class DOTImporter<V,E>
- java.lang.Object
-
- org.jgrapht.ext.DOTImporter<V,E>
-
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
- GraphImporter<V,E>
Deprecated.Useorg.jgrapht.io.DOTImporterinstead.
@Deprecated public class DOTImporter<V,E> extends java.lang.Object implements GraphImporter<V,E>
Imports a graph from a DOT file.For a description of the format see http://en.wikipedia.org/wiki/DOT_language and http://www.graphviz.org/doc/info/lang.html
state machine description (In dot format naturally):digraph G { 1 [label="start" description="Entry point"]; 2 [label="header" description="Processing The header"]; 3 [label="next" description="work out what the type of the next node is"]; 4 [label="edge" description="process an edge entry"]; 5 [label="edge_quotes" description="process a section of an edge in quotes"]; 6 [label="node" description="process a node entry"]; 7 [label="node_quotes" description="process a section of a node in quotes"]; 8 [label="line_comment" description="process and ignore a line comment"]; 9 [label="block_comment" description="process and ignore a block comment"]; 10 [label="done" description="exit point"]; 1 -> 2; 2 -> 3; 3 -> 4; 4 -> 3; 4 -> 5; 5 -> 4; 3 -> 6; 6 -> 3; 6 -> 7; 7 -> 6; 3 -> 10; 2 -> 8; 8 -> 2; 2 -> 9; 9 -> 2; 3 -> 8; 8 -> 3; 3 -> 9; 9 -> 3; 4 -> 8; 8 -> 4; 4 -> 9; 9 -> 4; 6 -> 8; 8 -> 6; 6 -> 9; 9 -> 6; }
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringDEFAULT_GRAPH_ID_KEYDeprecated.Default key used in the graph updater (if provided) for the graph ID.
-
Constructor Summary
Constructors Constructor and Description DOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider)Deprecated.Constructs a new DOTImporter with the given providersDOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider, ComponentUpdater<V> vertexUpdater)Deprecated.Constructs a new DOTImporter with the given providersDOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider, ComponentUpdater<V> vertexUpdater, ComponentUpdater<Graph<V,E>> graphUpdater)Deprecated.Constructs a new DOTImporter with the given providers
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidimportGraph(Graph<V,E> graph, java.io.Reader input)Deprecated.Read a dot formatted input and populate the provided graph.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgrapht.ext.GraphImporter
importGraph, importGraph
-
-
-
-
Field Detail
-
DEFAULT_GRAPH_ID_KEY
public static final java.lang.String DEFAULT_GRAPH_ID_KEY
Deprecated.Default key used in the graph updater (if provided) for the graph ID.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DOTImporter
public DOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider)
Deprecated.Constructs a new DOTImporter with the given providers- Parameters:
vertexProvider- Provider to create a vertexedgeProvider- Provider to create an edge
-
DOTImporter
public DOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider, ComponentUpdater<V> vertexUpdater)
Deprecated.Constructs a new DOTImporter with the given providers- Parameters:
vertexProvider- Provider to create a vertexedgeProvider- Provider to create an edgevertexUpdater- Method used to update an existing Vertex
-
DOTImporter
public DOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider, ComponentUpdater<V> vertexUpdater, ComponentUpdater<Graph<V,E>> graphUpdater)
Deprecated.Constructs a new DOTImporter with the given providers- Parameters:
vertexProvider- Provider to create a vertexedgeProvider- Provider to create an edgevertexUpdater- Method used to update an existing VertexgraphUpdater- Method used to update the graph ID
-
-
Method Detail
-
importGraph
public void importGraph(Graph<V,E> graph, java.io.Reader input) throws ImportException
Deprecated.Read a dot formatted input and populate the provided graph. The current implementation reads the whole input as a string and then parses the graph.- Specified by:
importGraphin interfaceGraphImporter<V,E>- Parameters:
graph- the graph to updateinput- the input reader- Throws:
ImportException- if there is a problem parsing the file.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG