From 129d8e26bcc7146560da10efa000deffb53b5f07 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Wed, 21 Mar 2018 15:53:28 +0100
Subject: [PATCH] ignore letter case for submap connections

---
 .../lcsb/mapviewer/converter/ComplexZipConverter.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/converter/src/main/java/lcsb/mapviewer/converter/ComplexZipConverter.java b/converter/src/main/java/lcsb/mapviewer/converter/ComplexZipConverter.java
index 602b1a0379..fcad651bef 100644
--- a/converter/src/main/java/lcsb/mapviewer/converter/ComplexZipConverter.java
+++ b/converter/src/main/java/lcsb/mapviewer/converter/ComplexZipConverter.java
@@ -103,8 +103,8 @@ public class ComplexZipConverter {
       String mapping = validateSubmodelInformation(params, zipFile);
 
       IConverter converter = createConverterInstance();
-      Map<String, Model> filenameModelMap = new HashMap<String, Model>();
-      Map<String, Model> nameModelMap = new HashMap<String, Model>();
+      Map<String, Model> filenameModelMap = new HashMap<>();
+      Map<String, Model> nameModelMap = new HashMap<>();
 
       entries = zipFile.entries();
       Model result = null;
@@ -123,7 +123,7 @@ public class ComplexZipConverter {
             Model model = converter.createModel(cParams);
             model.setName(modelEntryFile.getName());
             filenameModelMap.put(entry.getName(), model);
-            nameModelMap.put(FilenameUtils.getBaseName(modelEntryFile.getFilename()), model);
+            nameModelMap.put(FilenameUtils.getBaseName(modelEntryFile.getFilename()).toLowerCase(), model);
             if (modelEntryFile.isRoot()) {
               result = model;
             }
@@ -240,8 +240,8 @@ public class ComplexZipConverter {
           if (complexTo == null) {
             complexTo = (Complex) toAlias;
           }
-          String fromName = complexFrom.getName();
-          String toName = complexTo.getName();
+          String fromName = complexFrom.getName().toLowerCase();
+          String toName = complexTo.getName().toLowerCase();
           Model fromModel = nameModelMap.get(fromName);
           Model toModel = nameModelMap.get(toName);
           if (fromModel == null) {
-- 
GitLab