// Create a partial graph
Identity[] idents = {new DummyIdentity("1"),
new DummyIdentity("2")};
LabelVertex[] nodes = new LabelVertex[2];
for (int i = 0; i < nodes.length; i++) {
nodes[i] = new LabelVertex(idents[i]);
graph.addVertex(nodes[i]);
}
graph.addEdge(new WeightedEdge(2), nodes[0], nodes[1]);
} else if (node == PartialToyBuilder.NODE2) {
// Create a partial graph
Identity ident = new DummyIdentity("3");
LabelVertex ver = new LabelVertex(ident);
graph.addVertex(ver);
} else if (node == PartialToyBuilder.NODE3) {
Identity[] idents = {new DummyIdentity("4"),
new DummyIdentity("5")};
LabelVertex[] nodes = new LabelVertex[2];
for (int i = 0; i < nodes.length; i++) {
nodes[i] = new LabelVertex(idents[i]);
graph.addVertex(nodes[i]);
}
graph.addEdge(new WeightedEdge(), nodes[0], nodes[1]);
}
return Graphs.unmodifiableUndirectedGraph(graph);