resolved merge conflict
[jalview.git] / src / jalview / fts / service / uniprot / UniProtFTSRestClient.java
index dfdf715..a23df4c 100644 (file)
@@ -157,14 +157,14 @@ public class UniProtFTSRestClient extends FTSRestClient
     if (foundDataRow != null && foundDataRow.length > 0)
     {
       result = new ArrayList<FTSData>();
-      String titleRow = getDataColumnsFieldsAsTabDelimitedString(uniprotRestRequest
-              .getWantedFields());
-      // System.out.println(">>>>Title row : " + titleRow);
+      boolean firstRow = true;
       for (String dataRow : foundDataRow)
       {
-        if (dataRow.equalsIgnoreCase(titleRow))
+        // The first data row is usually the header data. This should be
+        // filtered out from the rest of the data See: JAL-2485
+        if (firstRow)
         {
-          // System.out.println(">>>>>>>>>> matched!!!");
+          firstRow = false;
           continue;
         }
         // System.out.println(dataRow);
@@ -240,14 +240,13 @@ public class UniProtFTSRestClient extends FTSRestClient
           {
             summaryRowData[colCounter++] = (field.getDataType()
                     .getDataTypeClass() == Integer.class) ? Integer
-                    .valueOf(fieldData)
- : (field.getDataType()
-                    .getDataTypeClass() == Double.class) ? Double
+                    .valueOf(fieldData.replace(",", ""))
+                    : (field.getDataType().getDataTypeClass() == Double.class) ? Double
                             .valueOf(fieldData) : fieldData;
           } catch (Exception e)
           {
             e.printStackTrace();
-              System.out.println("offending value:" + fieldData);
+            System.out.println("offending value:" + fieldData);
           }
         }
       } catch (Exception e)
@@ -306,7 +305,6 @@ public class UniProtFTSRestClient extends FTSRestClient
     };
   }
 
-
   public static FTSRestClientI getInstance()
   {
     if (instance == null)