java.lang.Object
org.jgrapht.nio.BaseExporter<V,E>
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- Direct Known Subclasses:
CSVExporter
,DIMACSExporter
,DOTExporter
,GEXFExporter
,GmlExporter
,GraphMLExporter
,JSONExporter
,LemonExporter
,MatrixExporter
,VisioExporter
Base implementation for an exporter.
- Author:
- Dimitrios Michail
-
Field Summary
Modifier and TypeFieldDescriptionAn edge attribute providerAn edge id providerA graph attribute providerA graph id providerA vertex attribute providerA vertex id provider -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEdgeAttribute
(E e, String key) Get an optional of an edge attributeGet the edge attribute providerGet edge attributesGet an optional of the edge idGet the edge id providergetGraphAttribute
(String key) Get an optional of a graph attributeGet the graph attribute provider.Get the graph id if presentGet the graph id provider.getVertexAttribute
(V v, String key) Get an optional of a vertex attributeGet the vertex attribute providerGet vertex attributesprotected String
getVertexId
(V v) Get the vertex idGet vertex id provider.void
Set the edge attribute provider.void
setEdgeIdProvider
(Function<E, String> edgeIdProvider) Set edge id providervoid
setGraphAttributeProvider
(Supplier<Map<String, Attribute>> graphAttributeProvider) Set the graph attribute provider.void
setGraphIdProvider
(Supplier<String> graphIdProvider) Set the graph id provider.void
Set the vertex attribute providervoid
setVertexIdProvider
(Function<V, String> vertexIdProvider) Set the vertex id provider
-
Field Details
-
graphIdProvider
A graph id provider -
graphAttributeProvider
A graph attribute provider -
vertexIdProvider
A vertex id provider -
vertexAttributeProvider
A vertex attribute provider -
edgeIdProvider
An edge id provider -
edgeAttributeProvider
An edge attribute provider
-
-
Constructor Details
-
BaseExporter
Constructor- Parameters:
vertexIdProvider
- the vertex id provider to use. Cannot be null.
-
-
Method Details
-
getGraphIdProvider
Get the graph id provider.- Returns:
- the graph id provider as an
Optional
.
-
setGraphIdProvider
Set the graph id provider.- Parameters:
graphIdProvider
- the graph id provider
-
getGraphAttributeProvider
Get the graph attribute provider.- Returns:
- the graph attribute provider as an
Optional
.
-
setGraphAttributeProvider
Set the graph attribute provider.- Parameters:
graphAttributeProvider
- the graph attribute provider
-
getVertexIdProvider
Get vertex id provider.- Returns:
- the vertex id provider
-
setVertexIdProvider
Set the vertex id provider- Parameters:
vertexIdProvider
- the vertex id provider
-
getVertexAttributeProvider
Get the vertex attribute provider- Returns:
- the vertex attribute provider as an
Optional
-
setVertexAttributeProvider
Set the vertex attribute provider- Parameters:
vertexAttributeProvider
- the vertex attribute provider
-
getEdgeIdProvider
Get the edge id provider- Returns:
- the edge id provider as an
Optional
.
-
setEdgeIdProvider
Set edge id provider- Parameters:
edgeIdProvider
- the edge id provider
-
getEdgeAttributeProvider
Get the edge attribute provider- Returns:
- the edge attribute provider as an
Optional
-
setEdgeAttributeProvider
Set the edge attribute provider.- Parameters:
edgeAttributeProvider
- the edge attribute provider
-
getGraphId
Get the graph id if present- Returns:
- an
Optional
of the graph id
-
getVertexId
Get the vertex id- Parameters:
v
- the vertex- Returns:
- the id of the vertex
-
getEdgeId
Get an optional of the edge id- Parameters:
e
- the edge- Returns:
- the edge id
-
getVertexAttributes
Get vertex attributes- Parameters:
v
- the vertex v- Returns:
- the vertex attributes as an
Optional
-
getVertexAttribute
Get an optional of a vertex attribute- Parameters:
v
- the vertex vkey
- the attribute key- Returns:
- the attribute as an
Optional
-
getEdgeAttributes
Get edge attributes- Parameters:
e
- the edge e- Returns:
- the edge attributes as an
Optional
-
getEdgeAttribute
Get an optional of an edge attribute- Parameters:
e
- the edge ekey
- the attribute key- Returns:
- the attribute as an
Optional
-
getGraphAttribute
Get an optional of a graph attribute- Parameters:
key
- the attribute key- Returns:
- the attribute as an
Optional
-