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