|
@@ -301,34 +301,27 @@ public class StoreController {
|
|
// Key and occasionally the id of Uppernode
|
|
// Key and occasionally the id of Uppernode
|
|
switch (type) {
|
|
switch (type) {
|
|
case CANVAS:
|
|
case CANVAS:
|
|
- if (edge.getA().getConnections().contains(edge) && edge.getA().getConnections().contains(edge))
|
|
|
|
- b = true;
|
|
|
|
- temp.add("connection", new JsonPrimitive(b));
|
|
|
|
-
|
|
|
|
k = "CVSEDGE" + getNumerator(NUMTYPE.EDGE);
|
|
k = "CVSEDGE" + getNumerator(NUMTYPE.EDGE);
|
|
break;
|
|
break;
|
|
case CONNECTION:
|
|
case CONNECTION:
|
|
- temp.add("connection", new JsonPrimitive(b));
|
|
|
|
k = "CONNEDGE" + getNumerator(NUMTYPE.CONNECTION);
|
|
k = "CONNEDGE" + getNumerator(NUMTYPE.CONNECTION);
|
|
break;
|
|
break;
|
|
case NODE:
|
|
case NODE:
|
|
temp.add("ID", new JsonPrimitive(id));
|
|
temp.add("ID", new JsonPrimitive(id));
|
|
- if (edge.getA().getConnections().contains(edge) && edge.getA().getConnections().contains(edge))
|
|
|
|
- b = true;
|
|
|
|
- temp.add("connection", new JsonPrimitive(b));
|
|
|
|
k = "NODEEDGE" + getNumerator(NUMTYPE.NODEEDGE);
|
|
k = "NODEEDGE" + getNumerator(NUMTYPE.NODEEDGE);
|
|
break;
|
|
break;
|
|
case OLD:
|
|
case OLD:
|
|
temp.add("ID", new JsonPrimitive(id));
|
|
temp.add("ID", new JsonPrimitive(id));
|
|
- if (edge.getA().getConnections().contains(edge) && edge.getA().getConnections().contains(edge))
|
|
|
|
- b = true;
|
|
|
|
- temp.add("connection", new JsonPrimitive(b));
|
|
|
|
k = "OLDEDGE" + getNumerator(NUMTYPE.OLDEDGE);
|
|
k = "OLDEDGE" + getNumerator(NUMTYPE.OLDEDGE);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ // lookup if the CVS, NODE or OLDEDGE are also connections
|
|
|
|
+ if (edge.getA().getConnections().contains(edge) && edge.getA().getConnections().contains(edge)
|
|
|
|
+ && !type.equals(EDGETYPE.CANVAS))
|
|
|
|
+ b = true;
|
|
|
|
+ temp.add("connection", new JsonPrimitive(b));
|
|
file.add(k, gson.toJsonTree(temp));
|
|
file.add(k, gson.toJsonTree(temp));
|
|
temp = new JsonObject();
|
|
temp = new JsonObject();
|
|
}
|
|
}
|