From fcd2b796dae53e19f0bd02d9ae247e404df146cb Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Mon, 26 Sep 2011 08:04:00 +0000
Subject: [PATCH] if property not found try also upper-case

SVN: 23082
---
 .../DataSetInfoExtractorForProteinResults.java     | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/etlserver/phosphonetx/DataSetInfoExtractorForProteinResults.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/etlserver/phosphonetx/DataSetInfoExtractorForProteinResults.java
index cc4f88bca43..a1219193882 100644
--- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/etlserver/phosphonetx/DataSetInfoExtractorForProteinResults.java
+++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/etlserver/phosphonetx/DataSetInfoExtractorForProteinResults.java
@@ -99,13 +99,13 @@ public class DataSetInfoExtractorForProteinResults extends AbstractDataSetInfoEx
         service.registerExperiment(experiment);
         DataSetInformation info = new DataSetInformation();
         info.setExperimentIdentifier(experimentIdentifier);
-        String parentDataSetCodesOrNull = properties.getProperty(PARENT_DATA_SET_CODES);
+        String parentDataSetCodesOrNull = getProperty(properties, PARENT_DATA_SET_CODES);
         if (parentDataSetCodesOrNull != null)
         {
             info.setParentDataSetCodes(Arrays.asList(StringUtils.split(parentDataSetCodesOrNull)));
         } else 
         {
-            String baseExperimentIdentifier = properties.getProperty(EXPERIMENT_IDENTIFIER_KEY);
+            String baseExperimentIdentifier = getProperty(properties, EXPERIMENT_IDENTIFIER_KEY);
             if (baseExperimentIdentifier != null)
             {
                 ExperimentIdentifier identifier = new ExperimentIdentifierFactory(baseExperimentIdentifier).createIdentifier();
@@ -127,6 +127,16 @@ public class DataSetInfoExtractorForProteinResults extends AbstractDataSetInfoEx
         return info;
     }
     
+    private String getProperty(Properties properties, String key)
+    {
+        String property = properties.getProperty(key);
+        if (property == null)
+        {
+            property = properties.getProperty(key.toUpperCase());
+        }
+        return property;
+    }
+    
     private Properties loadSearchProperties(File propertiesFile)
     {
         Properties properties;
-- 
GitLab