Commit e43aec52 authored by Jakob Schöttl's avatar Jakob Schöttl

Remove unused listener system

parent c9775ddf
......@@ -14,7 +14,6 @@ import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.simulator.control.PassiveCallback;
import org.vadere.simulator.projects.dataprocessing.DataProcessingJsonManager;
import org.vadere.simulator.projects.dataprocessing.ModelTest;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.io.JsonConverter;
import org.vadere.state.attributes.Attributes;
......@@ -39,7 +38,6 @@ public class Scenario {
private ScenarioStore scenarioStore;
private List<ModelTest> modelTests;
private final List<PassiveCallback> passiveCallbacks;
private DataProcessingJsonManager dataProcessingJsonManager;
......@@ -62,7 +60,6 @@ public class Scenario {
public Scenario(final String name, final ScenarioStore store) {
this.passiveCallbacks = new LinkedList<>();
this.modelTests = new LinkedList<>();
this.scenarioStore = store;
this.dataProcessingJsonManager = new DataProcessingJsonManager();
......@@ -147,15 +144,6 @@ public class Scenario {
this.scenarioStore.name = name;
}
public boolean isSuccessful() {
for (ModelTest modelTest : modelTests) {
if (!modelTest.isSucceeded()) {
return false;
}
}
return true;
}
public void setAttributesModel(List<Attributes> attributesList) {
scenarioStore.attributesList = attributesList;
}
......@@ -207,7 +195,6 @@ public class Scenario {
scenarioStore = srm.scenarioStore;
dataProcessingJsonManager = srm.dataProcessingJsonManager;
processorManager = srm.processorManager;
modelTests = srm.modelTests;
finishedListener = srm.finishedListener;
simpleOutputProcessorName = srm.simpleOutputProcessorName;
//this.passiveCallbacks = srm.passiveCallbacks; // is final, can't be reassigned
......
......@@ -19,7 +19,6 @@ import org.vadere.simulator.control.Simulation;
import org.vadere.simulator.models.MainModel;
import org.vadere.simulator.models.MainModelBuilder;
import org.vadere.simulator.projects.dataprocessing.DataProcessingJsonManager;
import org.vadere.simulator.projects.dataprocessing.ModelTest;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.state.attributes.Attributes;
import org.vadere.state.attributes.AttributesSimulation;
......@@ -40,7 +39,6 @@ public class ScenarioRun implements Runnable {
private ScenarioStore scenarioStore;
private Path outputPath;
private List<ModelTest> modelTests;
private final List<PassiveCallback> passiveCallbacks;
private DataProcessingJsonManager dataProcessingJsonManager;
......@@ -68,7 +66,6 @@ public class ScenarioRun implements Runnable {
@Deprecated
public ScenarioRun(final String name, final ScenarioStore store) {
this.passiveCallbacks = new LinkedList<>();
this.modelTests = new LinkedList<>();
this.scenarioStore = store;
this.scenario = null;
......@@ -136,10 +133,7 @@ public class ScenarioRun implements Runnable {
passiveCallbacks.clear();
logger.info(String.format("Scenario finished."));
logger.info(String.format("Running output processor, if any..."));
logger.info(String.format("Done running scenario '%s': '%s'", scenario.getName(),
(isSuccessful() ? "SUCCESSFUL" : "FAILURE")));
logger.info(String.format("Simulation of scenario %s finished.", scenario.getName()));
}
// Getter...
......@@ -194,15 +188,6 @@ public class ScenarioRun implements Runnable {
this.scenarioStore.name = name;
}
public boolean isSuccessful() {
for (ModelTest modelTest : modelTests) {
if (!modelTest.isSucceeded()) {
return false;
}
}
return true;
}
public void setAttributesModel(List<Attributes> attributesList) {
scenarioStore.attributesList = attributesList;
}
......
package org.vadere.simulator.projects.dataprocessing;
public interface ModelTest {
boolean isSucceeded();
}
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