]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleExperiment.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / request / PossibleExperiment.java
index 42208ddb19c5e9c1064d10e342b53eea5312a440..0b762ea7c9aa2fe25fdf4f1e891ef9163f40dbf0 100644 (file)
@@ -1,34 +1,34 @@
-package org.simantics.db.layer0.request;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.request.ResourceRead;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.layer0.Layer0;\r
-import org.simantics.simulation.ontology.SimulationResource;\r
-\r
-public class PossibleExperiment extends ResourceRead<Resource> {\r
-\r
-    public PossibleExperiment(Resource partOfExperiment) {\r
-        super(partOfExperiment);\r
-    }\r
-\r
-    @Override\r
-    public Resource perform(ReadGraph graph) throws DatabaseException {\r
-\r
-\r
-       SimulationResource SIMU = SimulationResource.getInstance(graph);\r
-       Layer0 L0 = Layer0.getInstance(graph);\r
-       \r
-        if (graph.isInstanceOf(resource, SIMU.Experiment))\r
-            return resource;\r
-        \r
-        Resource parent = graph.getPossibleObject(resource, L0.PartOf);\r
-        if (parent == null)\r
-            return null;\r
-        \r
-        else return graph.syncRequest(new PossibleExperiment(parent));\r
-\r
-    }\r
-\r
-}\r
+package org.simantics.db.layer0.request;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.ResourceRead;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.layer0.Layer0;
+import org.simantics.simulation.ontology.SimulationResource;
+
+public class PossibleExperiment extends ResourceRead<Resource> {
+
+    public PossibleExperiment(Resource partOfExperiment) {
+        super(partOfExperiment);
+    }
+
+    @Override
+    public Resource perform(ReadGraph graph) throws DatabaseException {
+
+
+       SimulationResource SIMU = SimulationResource.getInstance(graph);
+       Layer0 L0 = Layer0.getInstance(graph);
+       
+        if (graph.isInstanceOf(resource, SIMU.Experiment))
+            return resource;
+        
+        Resource parent = graph.getPossibleObject(resource, L0.PartOf);
+        if (parent == null)
+            return null;
+        
+        else return graph.syncRequest(new PossibleExperiment(parent));
+
+    }
+
+}