]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedOrderedSetElementsAccessor.java
Switch from org.apache.log4j to org.slf4j.
[simantics/platform.git] / bundles / org.simantics.objmap2 / src / org / simantics / objmap / graph / rules / domain / RelatedOrderedSetElementsAccessor.java
index 2190fef39e8725767153b7594e05f8e7936bea3d..a272b4f0bc4dd0786688d6ff25719089ee1545f0 100644 (file)
@@ -1,62 +1,63 @@
-/*******************************************************************************\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.rules.domain;\r
-\r
-import java.util.Collection;\r
-\r
-import org.apache.log4j.Logger;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.WriteGraph;\r
-import org.simantics.db.common.utils.OrderedSetUtils;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.objmap.exceptions.MappingException;\r
-\r
-/**\r
- * Accesses the set of objects attached to the element by the given relation.\r
- * @author Hannu Niemistö\r
- */\r
-public class RelatedOrderedSetElementsAccessor implements IDomainAccessor<Resource, Collection<Resource>> {\r
-\r
-    static Logger LOGGER = Logger.getLogger("org.simantics.objmap");\r
-    \r
-       boolean deleteExtraObjects;\r
-\r
-       public RelatedOrderedSetElementsAccessor(boolean deleteExtraObjects) {\r
-        super();\r
-        this.deleteExtraObjects = deleteExtraObjects;\r
-    }\r
-\r
-    @Override\r
-       public Collection<Resource> get(ReadGraph g, Resource element) throws MappingException {\r
-               try {\r
-                   LOGGER.info("        RelatedOrderedSetElementsAccessor.get");\r
-                       return OrderedSetUtils.toList(g, element);\r
-               } catch (DatabaseException e) {\r
-                       throw new MappingException(e);\r
-               }\r
-       }\r
-       \r
-       @Override\r
-       public boolean set(WriteGraph g, Resource element, Collection<Resource> value)\r
-                       throws MappingException {\r
-               try {\r
-                   LOGGER.info("        RelatedOrderedSetElementsAccessor.set");\r
-                   return OrderedSetUtils.set(g, element, value);\r
-                   // FIXME Implement deleteExtraObjects\r
-               } catch (DatabaseException e) {\r
-                       throw new MappingException(e);\r
-               }\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.rules.domain;
+
+import java.util.Collection;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.WriteGraph;
+import org.simantics.db.common.utils.OrderedSetUtils;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.objmap.exceptions.MappingException;
+
+/**
+ * Accesses the set of objects attached to the element by the given relation.
+ * @author Hannu Niemistö
+ */
+public class RelatedOrderedSetElementsAccessor implements IDomainAccessor<Resource, Collection<Resource>> {
+
+    static Logger LOGGER = LoggerFactory.getLogger(RelatedOrderedSetElementsAccessor.class);
+    
+       boolean deleteExtraObjects;
+
+       public RelatedOrderedSetElementsAccessor(boolean deleteExtraObjects) {
+        super();
+        this.deleteExtraObjects = deleteExtraObjects;
+    }
+
+    @Override
+       public Collection<Resource> get(ReadGraph g, Resource element) throws MappingException {
+               try {
+                   LOGGER.info("        RelatedOrderedSetElementsAccessor.get");
+                       return OrderedSetUtils.toList(g, element);
+               } catch (DatabaseException e) {
+                       throw new MappingException(e);
+               }
+       }
+       
+       @Override
+       public boolean set(WriteGraph g, Resource element, Collection<Resource> value)
+                       throws MappingException {
+               try {
+                   LOGGER.info("        RelatedOrderedSetElementsAccessor.set");
+                   return OrderedSetUtils.set(g, element, value);
+                   // FIXME Implement deleteExtraObjects
+               } catch (DatabaseException e) {
+                       throw new MappingException(e);
+               }
+               
+       }
+
+}