JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / ws / jws2 / JPred301Client.java
index 8328d45..b98eae4 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -35,6 +35,8 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import compbio.data.sequence.FastaSequence;
 import compbio.data.sequence.JpredAlignment;
@@ -90,15 +92,18 @@ public class JPred301Client extends JabawsMsaInterfaceAlignCalcWorker
     return "calculating consensus secondary structure prediction using JPred service";
   }
 
-  private static HashMap<String, String[]> jpredRowLabels = new HashMap<String, String[]>();
+  private static Map<String, String[]> jpredRowLabels = new HashMap<String, String[]>();
 
-  private static HashSet<String> jpredRes_graph, jpredRes_ssonly;
+  private static final Set<String> jpredRes_graph;
+
+  private static final Set<String> jpredRes_ssonly;
+  static
   {
-    jpredRes_ssonly = new HashSet();
+    jpredRes_ssonly = new HashSet<String>();
     jpredRes_ssonly.add("jnetpred".toLowerCase());
     jpredRes_ssonly.add("jnetpssm".toLowerCase());
     jpredRes_ssonly.add("jnethmm".toLowerCase());
-    jpredRes_graph = new HashSet();
+    jpredRes_graph = new HashSet<String>();
     jpredRes_graph.add("jnetconf".toLowerCase());
     jpredRes_graph.add("jnet burial".toLowerCase());
   }
@@ -123,8 +128,7 @@ public class JPred301Client extends JabawsMsaInterfaceAlignCalcWorker
           String[] k = jpredRowLabels.get(fsq.getId());
           if (k == null)
           {
-            k = new String[]
-            { fsq.getId(), "JNet Output" };
+            k = new String[] { fsq.getId(), "JNet Output" };
           }
           if (fsq.getId().startsWith("JNETSOL"))
           {
@@ -137,7 +141,8 @@ public class JPred301Client extends JabawsMsaInterfaceAlignCalcWorker
               {
                 sol[spos] = '0';
               }
-              if (vseq[spos] == 'B' && (sol[spos]=='0' || sol[spos] < amnt))
+              if (vseq[spos] == 'B'
+                      && (sol[spos] == '0' || sol[spos] < amnt))
               {
                 sol[spos] = amnt;
               }
@@ -247,7 +252,7 @@ public class JPred301Client extends JabawsMsaInterfaceAlignCalcWorker
         try
         {
           elm[i] = new Annotation("" + annot, "" + annot, annot,
-                  Integer.valueOf(""+annot));
+                  Integer.valueOf("" + annot));
         } catch (Exception x)
         {
           System.err.println("Expected numeric value in character '"