]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/UnescapedPropertyMapOfResource.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / request / UnescapedPropertyMapOfResource.java
index ddddd34259e1103412fe8867d6b25f1704420653..cc2e729657238cb3a86c3e8e51817d01581a2505 100644 (file)
@@ -1,48 +1,48 @@
-/*******************************************************************************\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.db.layer0.request;\r
-\r
-import gnu.trove.map.hash.THashMap;\r
-\r
-import java.util.Collection;\r
-import java.util.Map;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener;\r
-import org.simantics.db.common.request.ResourceRead;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-public class UnescapedPropertyMapOfResource extends ResourceRead<Map<String, PropertyInfo>> {\r
-\r
-       public UnescapedPropertyMapOfResource(Resource resource) {\r
-           super(resource);\r
-       }\r
-\r
-       @Override\r
-       public Map<String,PropertyInfo> perform(ReadGraph graph) throws DatabaseException {\r
-\r
-               Collection<Resource> predicates = graph.getPredicates(resource); \r
-        THashMap<String, PropertyInfo> result = new THashMap<String, PropertyInfo>(predicates.size());\r
-               for(Resource predicate : predicates) {\r
-                       PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.<PropertyInfo>instance());\r
-                       if(info != null && info.isHasProperty) {\r
-                       String name = info.name;\r
-                       if (result.put(name, info) != null)\r
-                               System.err.println(this + ": The database resource $" + resource.getResourceId() + " contains siblings with the same name " + name + " (resource=$" + info.predicate.getResourceId() +").");\r
-                       }                               \r
-               }\r
-               return result;\r
-               \r
-       }\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.db.layer0.request;
+
+import gnu.trove.map.hash.THashMap;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener;
+import org.simantics.db.common.request.ResourceRead;
+import org.simantics.db.exception.DatabaseException;
+
+public class UnescapedPropertyMapOfResource extends ResourceRead<Map<String, PropertyInfo>> {
+
+       public UnescapedPropertyMapOfResource(Resource resource) {
+           super(resource);
+       }
+
+       @Override
+       public Map<String,PropertyInfo> perform(ReadGraph graph) throws DatabaseException {
+
+               Collection<Resource> predicates = graph.getPredicates(resource); 
+        THashMap<String, PropertyInfo> result = new THashMap<String, PropertyInfo>(predicates.size());
+               for(Resource predicate : predicates) {
+                       PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.<PropertyInfo>instance());
+                       if(info != null && info.isHasProperty) {
+                       String name = info.name;
+                       if (result.put(name, info) != null)
+                               System.err.println(this + ": The database resource $" + resource.getResourceId() + " contains siblings with the same name " + name + " (resource=$" + info.predicate.getResourceId() +").");
+                       }                               
+               }
+               return result;
+               
+       }
+       
+}