GraphFactoryImpl factory = dhnsGlobal.factory();
//Nodes
//System.out.println("-----Global-----");
for (int i = 0; i < 10; i++) {
Node node = factory.newNode();
node.getNodeData().setLabel("Node " + i);
graphGlobal.addNode(node);
nodeMap.put(node.getNodeData().getLabel(), node);
//System.out.println("Node " + i + " added. Id = " + node.getId());
}
//System.out.println("---End Global---");
//Alone node
Node fakeNode1 = factory.newNode();
Node fakeNode2 = factory.newNode();
nodeMap.put("Fake Node 1", fakeNode1);
nodeMap.put("Fake Node 2", fakeNode2);
//Edges
Node node1 = nodeMap.get("Node 1");
Node node2 = nodeMap.get("Node 2");
Node node3 = nodeMap.get("Node 3");
Node node4 = nodeMap.get("Node 4");
Node node5 = nodeMap.get("Node 5");
Node node6 = nodeMap.get("Node 6");
Node node7 = nodeMap.get("Node 7");
Node node8 = nodeMap.get("Node 8");
AbstractEdge edge1 = factory.newEdge(node4, node5);
AbstractEdge edge2 = factory.newEdge(node5, node6);
AbstractEdge edge3 = factory.newEdge(node6, node5);
AbstractEdge edge4 = factory.newEdge(node7, node7);