Package org.jgrapht.io
Class GmlExporter<V,E>
- java.lang.Object
-
- org.jgrapht.io.GmlExporter<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
GraphExporter<V,E>
@Deprecated public class GmlExporter<V,E> extends Object implements GraphExporter<V,E>
Deprecated.In favor ofGmlImporter
.Exports a graph into a GML file (Graph Modeling Language).For a description of the format see http://www. infosun.fmi.uni-passau.de/Graphlet/GML/.
The behavior of the exporter such as whether to print vertex labels, edge labels, and/or edge weights can be adjusted using the
setParameter
method. When exporting labels, the exporter escapes them as Java strings.- Author:
- Dimitrios Michail
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GmlExporter.Parameter
Deprecated.Parameters that affect the behavior of theGmlExporter
exporter.
-
Field Summary
Fields Modifier and Type Field Description protected ComponentNameProvider<E>
edgeIDProvider
Deprecated.Provides an identifier for an edge.protected ComponentNameProvider<V>
vertexIDProvider
Deprecated.Provides an identifier for a vertex.
-
Constructor Summary
Constructors Constructor Description GmlExporter()
Deprecated.Creates a new GmlExporter object with integer name providers for the vertex and edge IDs and null providers for the vertex and edge labels.GmlExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeIDProvider, ComponentNameProvider<E> edgeLabelProvider)
Deprecated.Constructs a new GmlExporter object with the given ID and label providers.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
exportGraph(Graph<V,E> g, Writer writer)
Deprecated.Exports an graph into a plain text GML format.ComponentNameProvider<E>
getEdgeIDProvider()
Deprecated.Get the edge id providerComponentNameProvider<V>
getVertexIDProvider()
Deprecated.Get the vertex id providerboolean
isParameter(GmlExporter.Parameter p)
Deprecated.Return if a particular parameter of the exporter is enabledvoid
setEdgeIDProvider(ComponentNameProvider<E> edgeIDProvider)
Deprecated.Set the edge id provider.void
setParameter(GmlExporter.Parameter p, boolean value)
Deprecated.Set the value of a parameter of the exportervoid
setVertexIDProvider(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
-
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
-
GmlExporter
public GmlExporter()
Deprecated.Creates a new GmlExporter object with integer name providers for the vertex and edge IDs and null providers for the vertex and edge labels.
-
GmlExporter
public GmlExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeIDProvider, ComponentNameProvider<E> edgeLabelProvider)
Deprecated.Constructs a new GmlExporter 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 be generated using the toString() method of the vertex object.edgeIDProvider
- for generating vertex IDs. Must not be null.edgeLabelProvider
- for generating edge labels. If null, edge labels will be generated using the toString() method of the edge object.
-
-
Method Detail
-
exportGraph
public void exportGraph(Graph<V,E> g, Writer writer)
Deprecated.Exports an graph into a plain text GML format.- Specified by:
exportGraph
in interfaceGraphExporter<V,E>
- Parameters:
writer
- the writerg
- the graph
-
isParameter
public boolean isParameter(GmlExporter.Parameter p)
Deprecated.Return if a particular parameter of the exporter is enabled- Parameters:
p
- the parameter- Returns:
true
if the parameter is set,false
otherwise
-
setParameter
public void setParameter(GmlExporter.Parameter p, boolean value)
Deprecated.Set the value of a parameter of the exporter- Parameters:
p
- the parametervalue
- the value to set
-
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.
-
-