-/*******************************************************************************\r
- * Copyright (c) 2012 Association for Decentralized Information Management in\r
- * 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.modeling.userComponent;\r
-\r
-import gnu.trove.map.hash.THashMap;\r
-\r
-import org.simantics.databoard.Datatypes;\r
-import org.simantics.databoard.type.ArrayType;\r
-import org.simantics.databoard.type.Datatype;\r
-\r
-public class TypeConversion {\r
-\r
- private static final THashMap<String,Datatype> CONVERSION_MAP = \r
- new THashMap<String,Datatype>();\r
- \r
- private static void add(String sclType, Datatype dataType) {\r
- CONVERSION_MAP.put(sclType, dataType);\r
- CONVERSION_MAP.put("[" + sclType + "]", new ArrayType(dataType));\r
- CONVERSION_MAP.put("Array " + sclType, new ArrayType(dataType));\r
- CONVERSION_MAP.put("Vector " + sclType, new ArrayType(dataType));\r
- }\r
- \r
- static {\r
- add("Boolean", Datatypes.BOOLEAN);\r
- add("Integer", Datatypes.INTEGER);\r
- add("Long", Datatypes.LONG);\r
- add("Float", Datatypes.FLOAT);\r
- add("Double", Datatypes.DOUBLE);\r
- add("String", Datatypes.STRING);\r
- }\r
- \r
- /**\r
- * This is a workaround solution currently for converting SCL types\r
- * to datatypes.\r
- */\r
- public static Datatype convertSCLTypeToDatatype(String type) {\r
- return CONVERSION_MAP.get(type);\r
- }\r
- \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2012 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.modeling.userComponent;
+
+import gnu.trove.map.hash.THashMap;
+
+import org.simantics.databoard.Datatypes;
+import org.simantics.databoard.type.ArrayType;
+import org.simantics.databoard.type.Datatype;
+
+public class TypeConversion {
+
+ private static final THashMap<String,Datatype> CONVERSION_MAP =
+ new THashMap<String,Datatype>();
+
+ private static void add(String sclType, Datatype dataType) {
+ CONVERSION_MAP.put(sclType, dataType);
+ CONVERSION_MAP.put("[" + sclType + "]", new ArrayType(dataType));
+ CONVERSION_MAP.put("Array " + sclType, new ArrayType(dataType));
+ CONVERSION_MAP.put("Vector " + sclType, new ArrayType(dataType));
+ }
+
+ static {
+ add("Boolean", Datatypes.BOOLEAN);
+ add("Integer", Datatypes.INTEGER);
+ add("Long", Datatypes.LONG);
+ add("Float", Datatypes.FLOAT);
+ add("Double", Datatypes.DOUBLE);
+ add("String", Datatypes.STRING);
+ }
+
+ /**
+ * This is a workaround solution currently for converting SCL types
+ * to datatypes.
+ */
+ public static Datatype convertSCLTypeToDatatype(String type) {
+ return CONVERSION_MAP.get(type);
+ }
+
+}