|
@@ -372,12 +372,14 @@ public class GraphManager {
|
|
for (String s : n.getAttributeKeySet()) {
|
|
for (String s : n.getAttributeKeySet()) {
|
|
attributes.put(s, n.getAttribute(s));
|
|
attributes.put(s, n.getAttribute(s));
|
|
}
|
|
}
|
|
- g.addNode(n.getId());
|
|
|
|
- g.getNode(n.getId()).addAttributes(attributes);
|
|
|
|
|
|
+ String nodeId = activeSubGraph.getId() + n.getId();
|
|
|
|
+ g.addNode(nodeId);
|
|
|
|
+ g.getNode(nodeId).addAttributes(attributes);
|
|
if (activeSubGraph != null && !activeSubGraph.equals(g)) {
|
|
if (activeSubGraph != null && !activeSubGraph.equals(g)) {
|
|
activeSubGraph.addNode(n.getId());
|
|
activeSubGraph.addNode(n.getId());
|
|
activeSubGraph.getNode(n.getId()).addAttributes(attributes);
|
|
activeSubGraph.getNode(n.getId()).addAttributes(attributes);
|
|
- g.getNode(n.getId()).addAttribute("originalElement", activeSubGraph.getId() + "+#" + n.getId());
|
|
|
|
|
|
+ g.getNode(nodeId).addAttribute("originalElement", activeSubGraph.getId() + "+#" + n.getId());
|
|
|
|
+ g.getNode(nodeId).addAttribute("originalGraph", activeSubGraph.getId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -539,6 +541,7 @@ public class GraphManager {
|
|
g.getEdge(newID).addAttribute("originalElement", activeSubGraph.getId() + "+#" + newID);
|
|
g.getEdge(newID).addAttribute("originalElement", activeSubGraph.getId() + "+#" + newID);
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
+ Debug.out(sourceNode.getAttribute("originalGraph").toString() + targetNode.getAttribute("originalGraph").toString());
|
|
if (sourceNode.getAttribute("originalGraph").equals(targetNode.getAttribute("originalGraph"))){
|
|
if (sourceNode.getAttribute("originalGraph").equals(targetNode.getAttribute("originalGraph"))){
|
|
Debug.out("Can Only add edges to currently active Subgraph!", 2);
|
|
Debug.out("Can Only add edges to currently active Subgraph!", 2);
|
|
} else {
|
|
} else {
|