}\r
\r
protected void setSysdynExperimentState(final ExperimentState state) {\r
- sysdynExperimentState = state;\r
- session.asyncRequest(new ReadRequest() {\r
-\r
- @Override\r
- public void run(ReadGraph graph) throws DatabaseException {\r
- VirtualGraphSupport support = graph.getService(VirtualGraphSupport.class);\r
- final Session session = graph.getSession();\r
- session.asyncRequest(new WriteRequest(support.getWorkspacePersistent("experiments")) {\r
- @Override\r
- public void perform(WriteGraph graph) throws DatabaseException {\r
- Layer0 L0 = Layer0.getInstance(graph);\r
- SimulationResource SR = SimulationResource.getInstance(graph);\r
- graph.deny(model, SR.HasExperimentState);\r
- graph.deny(experiment, SR.HasExperimentState);\r
-\r
- Resource st = graph.newResource();\r
- switch(state) {\r
- case INITIALIZING:\r
- graph.claim(st, L0.InstanceOf, SR.ExperimentState_Initializing);\r
- break;\r
- case RUNNING:\r
- graph.claim(st, L0.InstanceOf, SR.ExperimentState_Running);\r
- break;\r
- case STOPPED:\r
- graph.claim(st, L0.InstanceOf, SR.ExperimentState_Stopped);\r
- break;\r
- case DISPOSED:\r
- graph.claim(st, L0.InstanceOf, SR.ExperimentState_Disposed);\r
- break;\r
- }\r
-\r
- graph.claim(model, SR.HasExperimentState, st);\r
- graph.claim(experiment, SR.HasExperimentState, st);\r
- }});\r
- }\r
- });\r
+ sysdynExperimentState = state;\r
+ VirtualGraphSupport support = session.getService(VirtualGraphSupport.class);\r
+ session.asyncRequest(new WriteRequest(support.getWorkspacePersistent("experiments")) {\r
+ @Override\r
+ public void perform(WriteGraph graph) throws DatabaseException {\r
+ Layer0 L0 = Layer0.getInstance(graph);\r
+ SimulationResource SR = SimulationResource.getInstance(graph);\r
+ graph.deny(model, SR.HasExperimentState);\r
+ graph.deny(experiment, SR.HasExperimentState);\r
+\r
+ Resource st = graph.newResource();\r
+ switch(state) {\r
+ case INITIALIZING:\r
+ graph.claim(st, L0.InstanceOf, SR.ExperimentState_Initializing);\r
+ break;\r
+ case RUNNING:\r
+ graph.claim(st, L0.InstanceOf, SR.ExperimentState_Running);\r
+ break;\r
+ case STOPPED:\r
+ graph.claim(st, L0.InstanceOf, SR.ExperimentState_Stopped);\r
+ break;\r
+ case DISPOSED:\r
+ graph.claim(st, L0.InstanceOf, SR.ExperimentState_Disposed);\r
+ break;\r
+ }\r
+\r
+ graph.claim(model, SR.HasExperimentState, st);\r
+ graph.claim(experiment, SR.HasExperimentState, st);\r
+ }});\r
}\r
\r
/**\r
\r
@Override\r
public void simulateDuration(double duration) {\r
- System.out.println("simulateDuartion");\r
+\r
}\r
\r
\r
@Override\r
public void rewindTo(double time) {\r
- System.out.println("rewindTo");\r
+\r
}\r
\r
}\r