]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/annotations/factories/RelatedOrderedSetElementsRuleFactory.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.objmap2 / src / org / simantics / objmap / graph / annotations / factories / RelatedOrderedSetElementsRuleFactory.java
index 5cded5481cfd9decf0cc5b66ca3f58bebc8f4d33..eefc55e506629821ffc15f1c932de9d194c152e8 100644 (file)
@@ -1,42 +1,42 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2013 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.objmap.graph.annotations.factories;\r
-\r
-import java.lang.annotation.Annotation;\r
-import java.lang.reflect.Field;\r
-import java.util.Collection;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.exception.ResourceNotFoundException;\r
-import org.simantics.db.exception.ServiceException;\r
-import org.simantics.db.exception.ValidationException;\r
-import org.simantics.objmap.bidirectional.IBidirectionalMappingRule;\r
-import org.simantics.objmap.graph.annotations.RelatedOrderedSetElements;\r
-import org.simantics.objmap.graph.rules.MappedElementsRule;\r
-import org.simantics.objmap.graph.rules.domain.RelatedOrderedSetElementsAccessor;\r
-import org.simantics.objmap.graph.rules.factory.IFieldRuleFactory;\r
-import org.simantics.objmap.graph.rules.range.FieldAccessor;\r
-\r
-\r
-public class RelatedOrderedSetElementsRuleFactory<Range> implements IFieldRuleFactory<Resource, Range> {\r
-\r
-    @Override\r
-    public IBidirectionalMappingRule<Resource, Range> create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException {\r
-        RelatedOrderedSetElements annotation = (RelatedOrderedSetElements)_annotation;\r
-        return new MappedElementsRule<Resource,Range>(\r
-                new RelatedOrderedSetElementsAccessor(annotation.composition()),\r
-                new FieldAccessor<Range,Collection<Range>>(field)\r
-                );\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2013 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.objmap.graph.annotations.factories;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.util.Collection;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.exception.ResourceNotFoundException;
+import org.simantics.db.exception.ServiceException;
+import org.simantics.db.exception.ValidationException;
+import org.simantics.objmap.bidirectional.IBidirectionalMappingRule;
+import org.simantics.objmap.graph.annotations.RelatedOrderedSetElements;
+import org.simantics.objmap.graph.rules.MappedElementsRule;
+import org.simantics.objmap.graph.rules.domain.RelatedOrderedSetElementsAccessor;
+import org.simantics.objmap.graph.rules.factory.IFieldRuleFactory;
+import org.simantics.objmap.graph.rules.range.FieldAccessor;
+
+
+public class RelatedOrderedSetElementsRuleFactory<Range> implements IFieldRuleFactory<Resource, Range> {
+
+    @Override
+    public IBidirectionalMappingRule<Resource, Range> create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException {
+        RelatedOrderedSetElements annotation = (RelatedOrderedSetElements)_annotation;
+        return new MappedElementsRule<Resource,Range>(
+                new RelatedOrderedSetElementsAccessor(annotation.composition()),
+                new FieldAccessor<Range,Collection<Range>>(field)
+                );
+    }
+
+}