]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.charts/src/org/simantics/charts/query/FindChartItemForTrendItem.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.charts / src / org / simantics / charts / query / FindChartItemForTrendItem.java
index 427cff83e1f0f4d8fe12115cc89d7e9c1391b102..a47416deb2876ab8d870d4b724d24de30fe593e5 100644 (file)
@@ -1,44 +1,44 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2011 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.charts.query;\r
-\r
-import org.simantics.charts.ontology.ChartResource;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.request.BinaryRead;\r
-import org.simantics.db.common.request.ObjectsWithType;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.layer0.Layer0;\r
-import org.simantics.trend.configuration.TrendItem;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class FindChartItemForTrendItem extends BinaryRead<Resource, TrendItem, Resource> {\r
-\r
-    public FindChartItemForTrendItem(Resource chart, TrendItem item) {\r
-        super(chart, item);\r
-    }\r
-\r
-    @Override\r
-    public Resource perform(ReadGraph graph) throws DatabaseException {\r
-        Layer0 L0 = Layer0.getInstance(graph);\r
-        ChartResource CHART = ChartResource.getInstance(graph);\r
-        for (Resource chartItem : graph.syncRequest(new ObjectsWithType(parameter, L0.ConsistsOf, CHART.Chart_Item))) {\r
-            TrendItem trendItem = graph.sync( new TrendItemQuery(chartItem) );\r
-            if (trendItem.equals(parameter2))\r
-                return chartItem;\r
-        }\r
-        return null;\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 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.charts.query;
+
+import org.simantics.charts.ontology.ChartResource;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.BinaryRead;
+import org.simantics.db.common.request.ObjectsWithType;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.layer0.Layer0;
+import org.simantics.trend.configuration.TrendItem;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class FindChartItemForTrendItem extends BinaryRead<Resource, TrendItem, Resource> {
+
+    public FindChartItemForTrendItem(Resource chart, TrendItem item) {
+        super(chart, item);
+    }
+
+    @Override
+    public Resource perform(ReadGraph graph) throws DatabaseException {
+        Layer0 L0 = Layer0.getInstance(graph);
+        ChartResource CHART = ChartResource.getInstance(graph);
+        for (Resource chartItem : graph.syncRequest(new ObjectsWithType(parameter, L0.ConsistsOf, CHART.Chart_Item))) {
+            TrendItem trendItem = graph.sync( new TrendItemQuery(chartItem) );
+            if (trendItem.equals(parameter2))
+                return chartItem;
+        }
+        return null;
+    }
+
+}