-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.simulation.experiment;\r
-\r
-import java.util.concurrent.locks.Lock;\r
-\r
-import org.eclipse.core.runtime.IProgressMonitor;\r
-import org.simantics.databoard.accessor.Accessor;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.RequestProcessor;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.Session;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-public interface IExperiment {\r
-\r
- <T> T getService(Class<T> clazz);\r
- \r
- String getIdentifier();\r
-\r
- ExperimentState getState();\r
- ExperimentState getState(ReadGraph graph) throws DatabaseException;\r
- void changeState(ExperimentState state);\r
-\r
- Resource getResource();\r
- Resource getModel();\r
-\r
- /**\r
- * @param monitor\r
- * the progress monitor to use for reporting progress to the user\r
- * during the operation. It is the caller's responsibility to\r
- * call done() on the given monitor. Accepts null, indicating\r
- * that no progress should be reported and that the operation\r
- * cannot be cancelled.\r
- */\r
- void shutdown(IProgressMonitor monitor);\r
-\r
- void addListener(IExperimentListener listener);\r
- void removeListener(IExperimentListener listener);\r
-\r
- void addStatusListener(IExperimentStatusListener listener);\r
- void removeStatusListener(IExperimentStatusListener listener);\r
-\r
- //Historian getDataSession();\r
- \r
- /**\r
- * Get the lock object to the datasource. Lock must be acquired\r
- * for write operations. \r
- */\r
- Lock getDatasourceLock();\r
- \r
- /**\r
- * Get an accessor to the experiment.\r
- * The returned accessor follows Datasource Contract.\r
- * https://www.simantics.org/wiki/index.php/Databoard_Specification#Datasource_Contract\r
- * \r
- * @return valuation accessor\r
- */\r
- Accessor getAccessor();\r
-\r
- /**\r
- * Synchronizes the running experiment with configuration.\r
- */\r
- public void refresh(Session session);\r
- public void refresh(RequestProcessor session);\r
- \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.simulation.experiment;
+
+import java.util.concurrent.locks.Lock;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.simantics.databoard.accessor.Accessor;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.RequestProcessor;
+import org.simantics.db.Resource;
+import org.simantics.db.Session;
+import org.simantics.db.exception.DatabaseException;
+
+public interface IExperiment {
+
+ <T> T getService(Class<T> clazz);
+
+ String getIdentifier();
+
+ ExperimentState getState();
+ ExperimentState getState(ReadGraph graph) throws DatabaseException;
+ void changeState(ExperimentState state);
+
+ Resource getResource();
+ Resource getModel();
+
+ /**
+ * @param monitor
+ * the progress monitor to use for reporting progress to the user
+ * during the operation. It is the caller's responsibility to
+ * call done() on the given monitor. Accepts null, indicating
+ * that no progress should be reported and that the operation
+ * cannot be cancelled.
+ */
+ void shutdown(IProgressMonitor monitor);
+
+ void addListener(IExperimentListener listener);
+ void removeListener(IExperimentListener listener);
+
+ void addStatusListener(IExperimentStatusListener listener);
+ void removeStatusListener(IExperimentStatusListener listener);
+
+ //Historian getDataSession();
+
+ /**
+ * Get the lock object to the datasource. Lock must be acquired
+ * for write operations.
+ */
+ Lock getDatasourceLock();
+
+ /**
+ * Get an accessor to the experiment.
+ * The returned accessor follows Datasource Contract.
+ * https://www.simantics.org/wiki/index.php/Databoard_Specification#Datasource_Contract
+ *
+ * @return valuation accessor
+ */
+ Accessor getAccessor();
+
+ /**
+ * Synchronizes the running experiment with configuration.
+ */
+ public void refresh(Session session);
+ public void refresh(RequestProcessor session);
+
+}