make Vertex serializable
This commit is contained in:
@@ -35,7 +35,7 @@ public class GraphMLFileWriter {
|
|||||||
GraphMLExporter<Vertex, SimpleWeightedGraph<Vertex, DefaultWeightedEdge>> exporter = new GraphMLExporter<>(Vertex::getVertexLabel);
|
GraphMLExporter<Vertex, SimpleWeightedGraph<Vertex, DefaultWeightedEdge>> exporter = new GraphMLExporter<>(Vertex::getVertexLabel);
|
||||||
//set to export weights
|
//set to export weights
|
||||||
exporter.setExportEdgeWeights(true);
|
exporter.setExportEdgeWeights(true);
|
||||||
//set type, sequnce, and occupancy attributes for each vertex
|
//set type, sequence, and occupancy attributes for each vertex
|
||||||
exporter.setVertexAttributeProvider( v -> {
|
exporter.setVertexAttributeProvider( v -> {
|
||||||
Map<String, Attribute> attributes = new HashMap<>();
|
Map<String, Attribute> attributes = new HashMap<>();
|
||||||
attributes.put("type", DefaultAttribute.createAttribute(v.getType()));
|
attributes.put("type", DefaultAttribute.createAttribute(v.getType()));
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class Vertex implements Serializable {
|
||||||
public class Vertex {
|
|
||||||
private SequenceType type;
|
private SequenceType type;
|
||||||
private Integer vertexLabel;
|
private Integer vertexLabel;
|
||||||
private Integer sequence;
|
private Integer sequence;
|
||||||
|
|||||||
Reference in New Issue
Block a user