V - the graph vertex typeE - the graph edge typepublic class GraphMLExporter<V,E> extends Object implements GraphExporter<V,E>
For a description of the format see http://en.wikipedia.org/wiki/ GraphML.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | GraphMLExporter.AttributeCategoryDenotes the category of a GraphML-Attribute. | 
| static class  | GraphMLExporter.AttributeTypeDenotes the type of a GraphML-Attribute. | 
| Constructor and Description | 
|---|
| GraphMLExporter()Constructs a new GraphMLExporter with integer name providers for the vertex and edge
 identifiers. | 
| GraphMLExporter(VertexNameProvider<V> vertexIDProvider,
               VertexNameProvider<V> vertexLabelProvider,
               ComponentAttributeProvider<V> vertexAttributeProvider,
               EdgeNameProvider<E> edgeIDProvider,
               EdgeNameProvider<E> edgeLabelProvider,
               ComponentAttributeProvider<E> edgeAttributeProvider)Constructs a new GraphMLExporter. | 
| GraphMLExporter(VertexNameProvider<V> vertexIDProvider,
               VertexNameProvider<V> vertexLabelProvider,
               EdgeNameProvider<E> edgeIDProvider,
               EdgeNameProvider<E> edgeLabelProvider)Constructs a new GraphMLExporter. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | export(Writer writer,
      Graph<V,E> g)Deprecated.  | 
| void | exportGraph(Graph<V,E> g,
           Writer writer)Exports a graph in GraphML format. | 
| ComponentAttributeProvider<E> | getEdgeAttributeProvider()Get the edge attribute provider | 
| String | getEdgeLabelAttributeName()Get the attribute name for edge labels | 
| EdgeNameProvider<E> | getEdgeLabelProvider()Get the edge label provider | 
| String | getEdgeWeightAttributeName()Get the attribute name for edge weights | 
| ComponentAttributeProvider<V> | getVertexAttributeProvider()Get the vertex attribute provider | 
| String | getVertexLabelAttributeName()Get the attribute name for vertex labels | 
| VertexNameProvider<V> | getVertexLabelProvider()Get the vertex label provider | 
| boolean | isExportEdgeWeights()Whether the exporter will print edge weights. | 
| void | registerAttribute(String name,
                 GraphMLExporter.AttributeCategory category,
                 GraphMLExporter.AttributeType type)Register a GraphML-Attribute | 
| void | registerAttribute(String name,
                 GraphMLExporter.AttributeCategory category,
                 GraphMLExporter.AttributeType type,
                 String defaultValue)Register a GraphML-Attribute | 
| void | setEdgeAttributeProvider(ComponentAttributeProvider<E> edgeAttributeProvider)Set the edge attribute provider. | 
| void | setEdgeLabelAttributeName(String edgeLabelAttributeName)Set the attribute name to use for edge labels. | 
| void | setEdgeLabelProvider(EdgeNameProvider<E> edgeLabelProvider)Set the edge label provider. | 
| void | setEdgeWeightAttributeName(String edgeWeightAttributeName)Set the attribute name to use for edge weights. | 
| void | setExportEdgeWeights(boolean exportEdgeWeights)Set whether the exporter will print edge weights. | 
| void | setVertexAttributeProvider(ComponentAttributeProvider<V> vertexAttributeProvider)Set the vertex attribute provider. | 
| void | setVertexLabelAttributeName(String vertexLabelAttributeName)Set the attribute name to use for vertex labels. | 
| void | setVertexLabelProvider(VertexNameProvider<V> vertexLabelProvider)Set the vertex label provider. | 
| void | unregisterAttribute(String name)Unregister a GraphML-Attribute | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexportGraph, exportGraphpublic GraphMLExporter()
public GraphMLExporter(VertexNameProvider<V> vertexIDProvider, VertexNameProvider<V> vertexLabelProvider, EdgeNameProvider<E> edgeIDProvider, EdgeNameProvider<E> edgeLabelProvider)
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.public GraphMLExporter(VertexNameProvider<V> vertexIDProvider, VertexNameProvider<V> vertexLabelProvider, ComponentAttributeProvider<V> vertexAttributeProvider, EdgeNameProvider<E> edgeIDProvider, EdgeNameProvider<E> edgeLabelProvider, ComponentAttributeProvider<E> edgeAttributeProvider)
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.public void registerAttribute(String name, GraphMLExporter.AttributeCategory category, GraphMLExporter.AttributeType type)
name - the attribute namecategory - the attribute categorytype - the attribute typepublic void registerAttribute(String name, GraphMLExporter.AttributeCategory category, GraphMLExporter.AttributeType type, String defaultValue)
name - the attribute namecategory - the attribute categorytype - the attribute typedefaultValue - default valuepublic void unregisterAttribute(String name)
name - the attribute namepublic boolean isExportEdgeWeights()
true if the exporter prints edge weights, false otherwisepublic void setExportEdgeWeights(boolean exportEdgeWeights)
exportEdgeWeights - value to setpublic String getVertexLabelAttributeName()
public void setVertexLabelAttributeName(String vertexLabelAttributeName)
vertexLabelAttributeName - the attribute namepublic String getEdgeLabelAttributeName()
public void setEdgeLabelAttributeName(String edgeLabelAttributeName)
edgeLabelAttributeName - the attribute namepublic String getEdgeWeightAttributeName()
public void setEdgeWeightAttributeName(String edgeWeightAttributeName)
edgeWeightAttributeName - the attribute namepublic VertexNameProvider<V> getVertexLabelProvider()
public void setVertexLabelProvider(VertexNameProvider<V> vertexLabelProvider)
vertexLabelProvider - the vertex label provider to setpublic EdgeNameProvider<E> getEdgeLabelProvider()
public void setEdgeLabelProvider(EdgeNameProvider<E> edgeLabelProvider)
edgeLabelProvider - the edge label provider to setpublic ComponentAttributeProvider<V> getVertexAttributeProvider()
public void setVertexAttributeProvider(ComponentAttributeProvider<V> vertexAttributeProvider)
vertexAttributeProvider - the vertex attribute provider to setpublic ComponentAttributeProvider<E> getEdgeAttributeProvider()
public void setEdgeAttributeProvider(ComponentAttributeProvider<E> edgeAttributeProvider)
edgeAttributeProvider - the edge attribute provider to set@Deprecated public void export(Writer writer, Graph<V,E> g) throws SAXException, TransformerConfigurationException
writer - the writer to which the graph to be exportedg - the graph to be exportedSAXException - in case of a SAX errorTransformerConfigurationException - in case of a configuration errorpublic void exportGraph(Graph<V,E> g, Writer writer) throws ExportException
exportGraph in interface GraphExporter<V,E>g - the graphwriter - the writer to export the graphExportException - in case any error occurs during exportCopyright © 2016. All rights reserved.