Commit 6b4d6907 authored by Christina's avatar Christina

use class as simulation parameter

parent 6ea9adb4
Pipeline #301111 failed with stages
in 2 minutes and 1 second
......@@ -281,7 +281,7 @@ public class TextView extends JPanel implements IJsonView {
switch (attributeType) {
case MODEL:
textfileTextarea.setText(StateJsonConverter.serializeMainModelAttributesModelBundle(
scenario.getModelAttributes(), scenario.getScenarioStore().getMainModel()));
scenario.getModelAttributes(), scenario.getScenarioStore().getMainModel(), scenario.getScenarioStore().getStrategyModel()));
break;
case SIMULATION:
textfileTextarea
......
......@@ -359,9 +359,11 @@ public abstract class StateJsonConverter {
return prettyWriter.writeValueAsString(serializeTopographyToNode(topography));
}
public static String serializeMainModelAttributesModelBundle(List<Attributes> attributesList, String mainModel)
public static String serializeMainModelAttributesModelBundle(List<Attributes> attributesList, String mainModel, String strategyModel)
throws JsonProcessingException {
ObjectNode node = mapper.createObjectNode();
node.put("strategyModel",strategyModel);
node.put(MAIN_MODEL_KEY, mainModel);
node.set("attributesModel", serializeAttributesModelToNode(attributesList));
return prettyWriter.writeValueAsString(node);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment