java.lang.Object
org.jgrapht.nio.BaseExporter<V,E>
 
org.jgrapht.nio.gexf.GEXFExporter<V,E> 
- Type Parameters:
- V- the graph vertex type
- E- the graph edge type
- All Implemented Interfaces:
- GraphExporter<V,- E> 
Exports a graph as GEXF (Graph Exchange XML Format).
 
For a description of the format see https://gephi.org/gexf/format/schema.html. A nice primer for the format is located at https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf.
- Author:
- Dimitrios Michail
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumDenotes the category of a GEXF-Attribute.static enumParameters that affect the behavior of the exporter.
- 
Field SummaryFields inherited from class org.jgrapht.nio.BaseExporteredgeAttributeProvider, edgeIdProvider, graphAttributeProvider, graphIdProvider, vertexAttributeProvider, vertexIdProvider
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a new exporter with integer id providers for the vertices and the edges.Constructs a new exporter.
- 
Method SummaryModifier and TypeMethodDescriptionvoidexportGraph(Graph<V, E> g, Writer writer) Exports a graph in GraphML format.Get the creator for the meta field.Get the description for the meta field.Get the keywords for the meta field.booleanReturn if a particular parameter of the exporter is enabledvoidregisterAttribute(String name, GEXFExporter.AttributeCategory category, GEXFAttributeType type) Register a GEXF AttributevoidregisterAttribute(String name, GEXFExporter.AttributeCategory category, GEXFAttributeType type, String defaultValue) Register a GEXF AttributevoidregisterAttribute(String name, GEXFExporter.AttributeCategory category, GEXFAttributeType type, String defaultValue, String options) Register a GEXF AttributevoidsetCreator(String creator) Set the creator for the meta field.voidsetDescription(String description) Set the description for the meta field.voidsetKeywords(String keywords) Set the keywords for the meta field.voidsetParameter(GEXFExporter.Parameter p, boolean value) Set the value of a parameter of the exportervoidunregisterAttribute(String name, GEXFExporter.AttributeCategory category) Unregister a GraphML-AttributeMethods inherited from class org.jgrapht.nio.BaseExportergetEdgeAttribute, getEdgeAttributeProvider, getEdgeAttributes, getEdgeId, getEdgeIdProvider, getGraphAttribute, getGraphAttributeProvider, getGraphId, getGraphIdProvider, getVertexAttribute, getVertexAttributeProvider, getVertexAttributes, getVertexId, getVertexIdProvider, setEdgeAttributeProvider, setEdgeIdProvider, setGraphAttributeProvider, setGraphIdProvider, setVertexAttributeProvider, setVertexIdProviderMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jgrapht.nio.GraphExporterexportGraph, exportGraph
- 
Constructor Details- 
GEXFExporterpublic GEXFExporter()Constructs a new exporter with integer id providers for the vertices and the edges.
- 
GEXFExporterConstructs a new exporter.- Parameters:
- vertexIdProvider- for generating vertex identifiers. Must not be null.
- edgeIdProvider- for generating edge identifiers. Must not be null.
 
 
- 
- 
Method Details- 
isParameterReturn if a particular parameter of the exporter is enabled- Parameters:
- p- the parameter
- Returns:
- trueif the parameter is set,- falseotherwise
 
- 
setParameterSet the value of a parameter of the exporter- Parameters:
- p- the parameter
- value- the value to set
 
- 
registerAttributepublic void registerAttribute(String name, GEXFExporter.AttributeCategory category, GEXFAttributeType type) Register a GEXF Attribute- Parameters:
- name- the attribute name
- category- the attribute category
- type- the attribute type
 
- 
registerAttributepublic void registerAttribute(String name, GEXFExporter.AttributeCategory category, GEXFAttributeType type, String defaultValue) Register a GEXF Attribute- Parameters:
- name- the attribute name
- category- the attribute category
- type- the attribute type
- defaultValue- default value
 
- 
registerAttributepublic void registerAttribute(String name, GEXFExporter.AttributeCategory category, GEXFAttributeType type, String defaultValue, String options) Register a GEXF Attribute- Parameters:
- name- the attribute name
- category- the attribute category
- type- the attribute type
- defaultValue- default value
- options- the possible options
 
- 
unregisterAttributeUnregister a GraphML-Attribute- Parameters:
- name- the attribute name
- category- the attribute category
 
- 
getCreatorGet the creator for the meta field.- Returns:
- the creator for the meta field
 
- 
setCreatorSet the creator for the meta field.- Parameters:
- creator- the creator for the meta field
 
- 
getKeywordsGet the keywords for the meta field.- Returns:
- the keywords for the meta field
 
- 
setKeywordsSet the keywords for the meta field.- Parameters:
- keywords- the keywords for the meta field
 
- 
getDescriptionGet the description for the meta field.- Returns:
- the description for the meta field
 
- 
setDescriptionSet the description for the meta field.- Parameters:
- description- the description for the meta field
 
- 
exportGraphExports a graph in GraphML format.- Specified by:
- exportGraphin interface- GraphExporter<V,- E> 
- Parameters:
- g- the graph
- writer- the writer to export the graph
- Throws:
- ExportException- in case any error occurs during export
 
 
-