V
- the graph vertex typeE
- the graph edge typepublic class GmlExporter<V,E> extends Object implements GraphExporter<V,E>
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.
Modifier and Type | Class and Description |
---|---|
static class |
GmlExporter.Parameter
Parameters that affect the behavior of the exporter.
|
Modifier and Type | Field and Description |
---|---|
static Integer |
PRINT_EDGE_LABELS
Deprecated.
|
static Integer |
PRINT_EDGE_VERTEX_LABELS
Deprecated.
|
static Integer |
PRINT_NO_LABELS
Deprecated.
|
static Integer |
PRINT_VERTEX_LABELS
Deprecated.
|
Constructor and Description |
---|
GmlExporter()
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(VertexNameProvider<V> vertexIDProvider,
VertexNameProvider<V> vertexLabelProvider,
EdgeNameProvider<E> edgeIDProvider,
EdgeNameProvider<E> edgeLabelProvider)
Constructs a new GmlExporter object with the given ID and label providers.
|
Modifier and Type | Method and Description |
---|---|
void |
export(Writer writer,
DirectedGraph<V,E> g)
Deprecated.
|
void |
export(Writer writer,
UndirectedGraph<V,E> g)
Deprecated.
|
void |
exportGraph(Graph<V,E> g,
Writer writer)
Exports an graph into a plain text GML format.
|
Integer |
getPrintLabels()
Deprecated.
|
boolean |
isParameter(GmlExporter.Parameter p)
Return if a particular parameter of the exporter is enabled
|
void |
setParameter(GmlExporter.Parameter p,
boolean value)
Set the value of a parameter of the exporter
|
void |
setPrintLabels(Integer i)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exportGraph, exportGraph
@Deprecated public static final Integer PRINT_NO_LABELS
@Deprecated public static final Integer PRINT_EDGE_LABELS
@Deprecated public static final Integer PRINT_EDGE_VERTEX_LABELS
@Deprecated public static final Integer PRINT_VERTEX_LABELS
public GmlExporter()
public GmlExporter(VertexNameProvider<V> vertexIDProvider, VertexNameProvider<V> vertexLabelProvider, EdgeNameProvider<E> edgeIDProvider, EdgeNameProvider<E> edgeLabelProvider)
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.@Deprecated public void export(Writer writer, UndirectedGraph<V,E> g)
writer
- the writer to which the graph to be exportedg
- the undirected graph to be exported@Deprecated public void export(Writer writer, DirectedGraph<V,E> g)
writer
- the writer to which the graph to be exportedg
- the directed graph to be exportedpublic void exportGraph(Graph<V,E> g, Writer writer)
exportGraph
in interface GraphExporter<V,E>
writer
- the writerg
- the graph@Deprecated public void setPrintLabels(Integer i)
i
- What labels to export. Valid options are PRINT_NO_LABELS
,
PRINT_EDGE_LABELS
, PRINT_EDGE_VERTEX_LABELS
, and
PRINT_VERTEX_LABELS
.IllegalArgumentException
- if a non-supported value is usedPRINT_NO_LABELS
,
PRINT_EDGE_LABELS
,
PRINT_EDGE_VERTEX_LABELS
,
PRINT_VERTEX_LABELS
@Deprecated public Integer getPrintLabels()
PRINT_NO_LABELS
, PRINT_EDGE_LABELS
,
PRINT_EDGE_VERTEX_LABELS
, or PRINT_VERTEX_LABELS
.public boolean isParameter(GmlExporter.Parameter p)
p
- the parametertrue
if the parameter is set, false
otherwisepublic void setParameter(GmlExporter.Parameter p, boolean value)
p
- the parametervalue
- the value to setCopyright © 2016. All rights reserved.