]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableMapImpl.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / variable / VariableMapImpl.java
index 2ab7e74660b63753b764d010a4784c876014f90d..5b6aa082001a4ae2be5f0547c3e983db9569c508 100644 (file)
@@ -1,35 +1,35 @@
-package org.simantics.db.layer0.variable;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-abstract public class VariableMapImpl implements VariableMap {\r
-\r
-       @Override\r
-       public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {\r
-               return getVariables(graph, context, null).get(name);\r
-       }\r
-\r
-       @Override\r
-       public Map<String, Variable> getVariables(ReadGraph graph, Variable context, String classification, Map<String, Variable> map) throws DatabaseException {\r
-               \r
-       Map<String,Variable> all = getVariables(graph, context, null);\r
-       if(all.isEmpty()) return all;\r
-       \r
-       for(Map.Entry<String, Variable> entry : all.entrySet()) {\r
-               Set<String> classifications = entry.getValue().getClassifications(graph);\r
-               if(classifications.contains(classification)) {\r
-                       if(map == null) map = new HashMap<String,Variable>();\r
-                       map.put(entry.getKey(), entry.getValue());\r
-               }\r
-       }\r
-       \r
-       return map;\r
-               \r
-       }\r
-\r
-}\r
+package org.simantics.db.layer0.variable;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.exception.DatabaseException;
+
+abstract public class VariableMapImpl implements VariableMap {
+
+       @Override
+       public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
+               return getVariables(graph, context, null).get(name);
+       }
+
+       @Override
+       public Map<String, Variable> getVariables(ReadGraph graph, Variable context, String classification, Map<String, Variable> map) throws DatabaseException {
+               
+       Map<String,Variable> all = getVariables(graph, context, null);
+       if(all.isEmpty()) return all;
+       
+       for(Map.Entry<String, Variable> entry : all.entrySet()) {
+               Set<String> classifications = entry.getValue().getClassifications(graph);
+               if(classifications.contains(classification)) {
+                       if(map == null) map = new HashMap<String,Variable>();
+                       map.put(entry.getKey(), entry.getValue());
+               }
+       }
+       
+       return map;
+               
+       }
+
+}