Package org.jgrapht.io
Class GraphMLExporter<V,E>
- java.lang.Object
-
- org.jgrapht.io.GraphMLExporter<V,E>
-
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
GraphExporter<V,E>
@Deprecated public class GraphMLExporter<V,E> extends Object implements GraphExporter<V,E>
Deprecated.Deprecated in favor ofGraphMLExporter.Exports a graph as GraphML.For a description of the format see http://en.wikipedia.org/wiki/ GraphML.
- Author:
- Trevor Harmon, Dimitrios Michail
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraphMLExporter.AttributeCategoryDeprecated.Denotes the category of a GraphML-Attribute.
-
Field Summary
Fields Modifier and Type Field Description 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 GraphMLExporter()Deprecated.Constructs a new GraphMLExporter with integer name providers for the vertex and edge identifiers.GraphMLExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentAttributeProvider<V> vertexAttributeProvider, ComponentNameProvider<E> edgeIDProvider, ComponentNameProvider<E> edgeLabelProvider, ComponentAttributeProvider<E> edgeAttributeProvider)Deprecated.Constructs a new GraphMLExporter.GraphMLExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeIDProvider, ComponentNameProvider<E> edgeLabelProvider)Deprecated.Constructs a new GraphMLExporter.
-
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 in GraphML format.ComponentAttributeProvider<E>getEdgeAttributeProvider()Deprecated.Get the edge attribute providerComponentNameProvider<E>getEdgeIDProvider()Deprecated.Get the edge id providerStringgetEdgeLabelAttributeName()Deprecated.Get the attribute name for edge labelsComponentNameProvider<E>getEdgeLabelProvider()Deprecated.Get the edge label providerStringgetEdgeWeightAttributeName()Deprecated.Get the attribute name for edge weightsComponentAttributeProvider<V>getVertexAttributeProvider()Deprecated.Get the vertex attribute providerComponentNameProvider<V>getVertexIDProvider()Deprecated.Get the vertex id providerStringgetVertexLabelAttributeName()Deprecated.Get the attribute name for vertex labelsComponentNameProvider<V>getVertexLabelProvider()Deprecated.Get the vertex label providerbooleanisExportEdgeWeights()Deprecated.Whether the exporter will print edge weights.voidregisterAttribute(String name, GraphMLExporter.AttributeCategory category, AttributeType type)Deprecated.Register a GraphML-AttributevoidregisterAttribute(String name, GraphMLExporter.AttributeCategory category, AttributeType type, String defaultValue)Deprecated.Register a GraphML-AttributevoidsetEdgeAttributeProvider(ComponentAttributeProvider<E> edgeAttributeProvider)Deprecated.Set the edge attribute provider.voidsetEdgeIDProvider(ComponentNameProvider<E> edgeIDProvider)Deprecated.Set the edge id provider.voidsetEdgeLabelAttributeName(String edgeLabelAttributeName)Deprecated.Set the attribute name to use for edge labels.voidsetEdgeLabelProvider(ComponentNameProvider<E> edgeLabelProvider)Deprecated.Set the edge label provider.voidsetEdgeWeightAttributeName(String edgeWeightAttributeName)Deprecated.Set the attribute name to use for edge weights.voidsetExportEdgeWeights(boolean exportEdgeWeights)Deprecated.Set whether the exporter will print edge weights.voidsetVertexAttributeProvider(ComponentAttributeProvider<V> vertexAttributeProvider)Deprecated.Set the vertex attribute provider.voidsetVertexIDProvider(ComponentNameProvider<V> vertexIDProvider)Deprecated.Set the vertex id providervoidsetVertexLabelAttributeName(String vertexLabelAttributeName)Deprecated.Set the attribute name to use for vertex labels.voidsetVertexLabelProvider(ComponentNameProvider<V> vertexLabelProvider)Deprecated.Set the vertex label provider.voidunregisterAttribute(String name)Deprecated.Unregister a GraphML-Attribute-
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
-
GraphMLExporter
public GraphMLExporter()
Deprecated.Constructs a new GraphMLExporter with integer name providers for the vertex and edge identifiers.
-
GraphMLExporter
public GraphMLExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentNameProvider<E> edgeIDProvider, ComponentNameProvider<E> edgeLabelProvider)
Deprecated.Constructs a new GraphMLExporter.- Parameters:
vertexIDProvider- for generating vertex identifiers. Must not be null.vertexLabelProvider- for generating vertex labels. If null, vertex labels will not exported.edgeIDProvider- for generating edge identifiers. Must not be null.edgeLabelProvider- for generating edge labels. If null, edge labels will not be exported.
-
GraphMLExporter
public GraphMLExporter(ComponentNameProvider<V> vertexIDProvider, ComponentNameProvider<V> vertexLabelProvider, ComponentAttributeProvider<V> vertexAttributeProvider, ComponentNameProvider<E> edgeIDProvider, ComponentNameProvider<E> edgeLabelProvider, ComponentAttributeProvider<E> edgeAttributeProvider)
Deprecated.Constructs a new GraphMLExporter.- Parameters:
vertexIDProvider- for generating vertex identifiers. Must not be null.vertexLabelProvider- for generating vertex labels. If null, vertex labels will not exported.vertexAttributeProvider- for generating vertex attributes. If null, no additional attributes will be exported.edgeIDProvider- for generating edge identifiers. Must not be null.edgeLabelProvider- for generating edge labels. If null, edge labels will not be exported.edgeAttributeProvider- for generating edge attributes. If null, no additional attributes will be exported.
-
-
Method Detail
-
registerAttribute
public void registerAttribute(String name, GraphMLExporter.AttributeCategory category, AttributeType type)
Deprecated.Register a GraphML-Attribute- Parameters:
name- the attribute namecategory- the attribute categorytype- the attribute type
-
registerAttribute
public void registerAttribute(String name, GraphMLExporter.AttributeCategory category, AttributeType type, String defaultValue)
Deprecated.Register a GraphML-Attribute- Parameters:
name- the attribute namecategory- the attribute categorytype- the attribute typedefaultValue- default value
-
unregisterAttribute
public void unregisterAttribute(String name)
Deprecated.Unregister a GraphML-Attribute- Parameters:
name- the attribute name
-
isExportEdgeWeights
public boolean isExportEdgeWeights()
Deprecated.Whether the exporter will print edge weights.- Returns:
trueif the exporter prints edge weights,falseotherwise
-
setExportEdgeWeights
public void setExportEdgeWeights(boolean exportEdgeWeights)
Deprecated.Set whether the exporter will print edge weights.- Parameters:
exportEdgeWeights- value to set
-
getVertexLabelAttributeName
public String getVertexLabelAttributeName()
Deprecated.Get the attribute name for vertex labels- Returns:
- the attribute name
-
setVertexLabelAttributeName
public void setVertexLabelAttributeName(String vertexLabelAttributeName)
Deprecated.Set the attribute name to use for vertex labels.- Parameters:
vertexLabelAttributeName- the attribute name
-
getEdgeLabelAttributeName
public String getEdgeLabelAttributeName()
Deprecated.Get the attribute name for edge labels- Returns:
- the attribute name
-
setEdgeLabelAttributeName
public void setEdgeLabelAttributeName(String edgeLabelAttributeName)
Deprecated.Set the attribute name to use for edge labels.- Parameters:
edgeLabelAttributeName- the attribute name
-
getEdgeWeightAttributeName
public String getEdgeWeightAttributeName()
Deprecated.Get the attribute name for edge weights- Returns:
- the attribute name
-
setEdgeWeightAttributeName
public void setEdgeWeightAttributeName(String edgeWeightAttributeName)
Deprecated.Set the attribute name to use for edge weights.- Parameters:
edgeWeightAttributeName- the attribute name
-
getVertexLabelProvider
public ComponentNameProvider<V> getVertexLabelProvider()
Deprecated.Get the vertex label provider- Returns:
- the vertex label provider
-
setVertexLabelProvider
public void setVertexLabelProvider(ComponentNameProvider<V> vertexLabelProvider)
Deprecated.Set the vertex label provider.- Parameters:
vertexLabelProvider- the vertex label provider to set
-
getEdgeLabelProvider
public ComponentNameProvider<E> getEdgeLabelProvider()
Deprecated.Get the edge label provider- Returns:
- the edge label provider
-
setEdgeLabelProvider
public void setEdgeLabelProvider(ComponentNameProvider<E> edgeLabelProvider)
Deprecated.Set the edge label provider.- Parameters:
edgeLabelProvider- the edge label provider to set
-
getVertexAttributeProvider
public ComponentAttributeProvider<V> getVertexAttributeProvider()
Deprecated.Get the vertex attribute provider- Returns:
- the vertex attribute provider
-
setVertexAttributeProvider
public void setVertexAttributeProvider(ComponentAttributeProvider<V> vertexAttributeProvider)
Deprecated.Set the vertex attribute provider.- Parameters:
vertexAttributeProvider- the vertex attribute provider to set
-
getEdgeAttributeProvider
public ComponentAttributeProvider<E> getEdgeAttributeProvider()
Deprecated.Get the edge attribute provider- Returns:
- the edge attribute provider
-
setEdgeAttributeProvider
public void setEdgeAttributeProvider(ComponentAttributeProvider<E> edgeAttributeProvider)
Deprecated.Set the edge attribute provider.- Parameters:
edgeAttributeProvider- the edge attribute provider to set
-
exportGraph
public void exportGraph(Graph<V,E> g, Writer writer) throws ExportException
Deprecated.Exports a graph in GraphML format.- Specified by:
exportGraphin interfaceGraphExporter<V,E>- Parameters:
g- the graphwriter- the writer to export the graph- Throws:
ExportException- in case any error occurs during export
-
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.
-
-