|
@@ -219,6 +219,8 @@ public class LoadController {
|
|
|
loadUnitGraph(GRAPHTYPE.ELEMENT, json.get(key), null, eleDispatch);
|
|
|
if (key.contains("TRACKED"))
|
|
|
loadTracked(json.get(key), objDispatch);
|
|
|
+ if(key.contains("STATSGRAPH"))
|
|
|
+ loadStatisticGraph(json.get(key), objDispatch);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -237,6 +239,7 @@ public class LoadController {
|
|
|
model.setObjectsOnCanvas(new ArrayList<AbstractCpsObject>());
|
|
|
model.setEdgesOnCanvas(new ArrayList<CpsEdge>());
|
|
|
model.setTrackingObj(new ArrayList<>());
|
|
|
+ model.setStatisticData(new ArrayList<>());
|
|
|
model.setCanvasX(json.get("CANVAS_SIZE_X").getAsInt());
|
|
|
model.setCanvasX(json.get("CANVAS_SIZE_Y").getAsInt());
|
|
|
IdCounter.setCounter(json.get("IDCOUNTER").getAsInt());
|
|
@@ -289,14 +292,6 @@ public class LoadController {
|
|
|
|
|
|
}
|
|
|
|
|
|
- private String refreshPath(String image) {
|
|
|
- // TODO Auto-generated method stub
|
|
|
- if (!image.contains("/HolonGUI/"))
|
|
|
- return image;
|
|
|
- return (System.getProperty("user.home") + image.substring(image.indexOf("/HolonGUI/"), image.length()))
|
|
|
- .replace("\\", "/");
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Load a given Element in Category by Deserialization
|
|
|
*
|
|
@@ -458,6 +453,12 @@ public class LoadController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void loadStatisticGraph(JsonElement jsonElement, HashMap<Integer, AbstractCpsObject> objDispatch) {
|
|
|
+ // TODO Auto-generated method stub
|
|
|
+ JsonObject object = jsonElement.getAsJsonObject();
|
|
|
+ model.getStatisticData().add(object);
|
|
|
+ }
|
|
|
+
|
|
|
private void loadTracked(JsonElement jsonElement, HashMap<Integer, AbstractCpsObject> objDispatch) {
|
|
|
// TODO Auto-generated method stub
|
|
|
JsonObject object = jsonElement.getAsJsonObject();
|