JAL-1264 remove broken applet build dependencies
[jalview.git] / src / jalview / analysis / CrossRef.java
index 17658b3..47bd7bc 100644 (file)
@@ -1,38 +1,40 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
  * Jalview is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License 
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
  *  
  * Jalview is distributed in the hope that it will be useful, but 
  * WITHOUT ANY WARRANTY; without even the implied warranty 
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
  * PURPOSE.  See the GNU General Public License for more details.
  * 
- * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
 package jalview.analysis;
 
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Vector;
-import java.util.Hashtable;
-
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
-import jalview.datamodel.DBRefSource;
 import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 import jalview.ws.SequenceFetcher;
 import jalview.ws.seqfetcher.ASequenceFetcher;
 
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+
 /**
  * Functions for cross-referencing sequence databases. user must first specify
  * if cross-referencing from protein or dna (set dna==true)
@@ -228,7 +230,7 @@ public class CrossRef
   {
     Vector rseqs = new Vector();
     Alignment ral = null;
-    AlignedCodonFrame cf = new AlignedCodonFrame(0); // nominal width
+    AlignedCodonFrame cf = new AlignedCodonFrame(); // nominal width
     for (int s = 0; s < seqs.length; s++)
     {
       SequenceI dss = seqs[s];
@@ -256,7 +258,9 @@ public class CrossRef
       for (int r = 0; xrfs != null && r < xrfs.length; r++)
       {
         if (source != null && !source.equals(xrfs[r].getSource()))
+        {
           continue;
+        }
         if (xrfs[r].hasMap())
         {
           if (xrfs[r].getMap().getTo() != null)
@@ -289,7 +293,9 @@ public class CrossRef
           {
             found |= searchDataset(dss, xrfs[r], dataset, rseqs, cf); // ,false,!dna);
             if (found)
+             {
               xrfs[r] = null; // we've recovered seqs for this one.
+            }
           }
         }
       }
@@ -326,7 +332,9 @@ public class CrossRef
             for (int r = 0; r < xrfs.length; r++)
             {
               if (xrfs[r] != null)
+              {
                 t[l++] = xrfs[r];
+              }
             }
             xrfs = t;
             try
@@ -430,7 +438,9 @@ public class CrossRef
   {
     boolean found = false;
     if (lrfs == null)
+    {
       return false;
+    }
     for (int i = 0; i < lrfs.length; i++)
     {
       DBRefEntry xref = new DBRefEntry(lrfs[i]);
@@ -482,7 +492,9 @@ public class CrossRef
     boolean found = false;
     SequenceI[] typer = new SequenceI[1];
     if (dataset == null)
+    {
       return false;
+    }
     if (dataset.getSequences() == null)
     {
       System.err.println("Empty dataset sequence set - NO VECTOR");
@@ -492,6 +504,7 @@ public class CrossRef
     synchronized (ds = dataset.getSequences())
     {
       for (SequenceI nxt : ds)
+      {
         if (nxt != null)
         {
           if (nxt.getDatasetSequence() != null)
@@ -564,6 +577,7 @@ public class CrossRef
 
           }
         }
+      }
     }
     return found;
   }