V
- the graph vertex typeE
- the graph edge typepublic class DOTImporter<V,E> extends Object implements GraphImporter<V,E>
For a description of the format see http://en.wikipedia.org/wiki/DOT_language and http://www.graphviz.org/doc/info/lang.html
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_GRAPH_ID_KEY
Default key used in the graph updater (if provided) for the graph ID.
|
protected EdgeProvider<V,E> |
edgeProvider
Constructs new edges
|
protected ComponentUpdater<Graph<V,E>> |
graphUpdater
Updates graph properties
|
protected VertexProvider<V> |
vertexProvider
Constructs new vertices
|
protected ComponentUpdater<V> |
vertexUpdater
Updates already constructed vertices
|
Constructor and Description |
---|
DOTImporter(VertexProvider<V> vertexProvider,
EdgeProvider<V,E> edgeProvider)
Constructs a new importer.
|
DOTImporter(VertexProvider<V> vertexProvider,
EdgeProvider<V,E> edgeProvider,
ComponentUpdater<V> vertexUpdater)
Constructs a new importer.
|
DOTImporter(VertexProvider<V> vertexProvider,
EdgeProvider<V,E> edgeProvider,
ComponentUpdater<V> vertexUpdater,
ComponentUpdater<Graph<V,E>> graphUpdater)
Constructs a new importer.
|
Modifier and Type | Method and Description |
---|---|
EdgeProvider<V,E> |
getEdgeProvider()
Get the edge provider
|
ComponentUpdater<Graph<V,E>> |
getGraphUpdater()
Get the graph updater.
|
VertexProvider<V> |
getVertexProvider()
Get the vertex provider
|
ComponentUpdater<V> |
getVertexUpdater()
Get the vertex updater
|
void |
importGraph(Graph<V,E> g,
Reader in)
Import a graph
|
void |
setEdgeProvider(EdgeProvider<V,E> edgeProvider)
Set the edge provider.
|
void |
setGraphUpdater(ComponentUpdater<Graph<V,E>> graphUpdater)
Set the graph updater.
|
void |
setVertexProvider(VertexProvider<V> vertexProvider)
Set the vertex provider
|
void |
setVertexUpdater(ComponentUpdater<V> vertexUpdater)
Set the vertex updater.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
importGraph, importGraph
public static final String DEFAULT_GRAPH_ID_KEY
protected VertexProvider<V> vertexProvider
protected EdgeProvider<V,E> edgeProvider
protected ComponentUpdater<V> vertexUpdater
protected ComponentUpdater<Graph<V,E>> graphUpdater
public DOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider)
vertexProvider
- used to create verticesedgeProvider
- used to create edgespublic DOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider, ComponentUpdater<V> vertexUpdater)
vertexProvider
- used to create verticesedgeProvider
- used to create edgesvertexUpdater
- used to further update verticespublic DOTImporter(VertexProvider<V> vertexProvider, EdgeProvider<V,E> edgeProvider, ComponentUpdater<V> vertexUpdater, ComponentUpdater<Graph<V,E>> graphUpdater)
vertexProvider
- used to create verticesedgeProvider
- used to create edgesvertexUpdater
- used to further update verticesgraphUpdater
- used to update graph attributes, like the graph identifierpublic void importGraph(Graph<V,E> g, Reader in) throws ImportException
importGraph
in interface GraphImporter<V,E>
g
- the graphin
- the input readerImportException
- in case any error occurs, such as I/O or parse errorpublic VertexProvider<V> getVertexProvider()
public void setVertexProvider(VertexProvider<V> vertexProvider)
vertexProvider
- the new vertex provider. Must not be null.public EdgeProvider<V,E> getEdgeProvider()
public void setEdgeProvider(EdgeProvider<V,E> edgeProvider)
edgeProvider
- the new edge provider. Must not be null.public ComponentUpdater<V> getVertexUpdater()
public void setVertexUpdater(ComponentUpdater<V> vertexUpdater)
vertexUpdater
- the new vertex updater. Must not be null.public ComponentUpdater<Graph<V,E>> getGraphUpdater()
public void setGraphUpdater(ComponentUpdater<Graph<V,E>> graphUpdater)
graphUpdater
- the new graph updater. Must not be null.Copyright © 2019. All rights reserved.