merge from 2_4_Release branch
[jalview.git] / src / jalview / io / FeaturesFile.java
index 3e0314a..462ee22 100755 (executable)
@@ -1,17 +1,17 @@
 /*\r
- * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
- *\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)\r
+ * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * \r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
  * as published by the Free Software Foundation; either version 2\r
  * of the License, or (at your option) any later version.\r
- *\r
+ * \r
  * This program is distributed in the hope that it will be useful,\r
  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
  * GNU General Public License for more details.\r
- *\r
+ * \r
  * You should have received a copy of the GNU General Public License\r
  * along with this program; if not, write to the Free Software\r
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
@@ -148,7 +148,7 @@ public class FeaturesFile extends AlignFile
           }\r
           continue;\r
         }\r
-        String seqId="";\r
+        String seqId = "";\r
         while (st.hasMoreElements())\r
         {\r
 \r
@@ -205,7 +205,7 @@ public class FeaturesFile extends AlignFile
               }\r
 \r
               seq.addSequenceFeature(sf);\r
-              while ((seq=align.findName(seq, seqId, true))!=null)\r
+              while ((seq = align.findName(seq, seqId, true)) != null)\r
               {\r
                 seq.addSequenceFeature(new SequenceFeature(sf));\r
               }\r
@@ -234,12 +234,12 @@ public class FeaturesFile extends AlignFile
 \r
           if (!token.equals("ID_NOT_SPECIFIED"))\r
           {\r
-            seq = align.findName(seqId=token, true);\r
+            seq = align.findName(seqId = token, true);\r
             st.nextToken();\r
           }\r
           else\r
           {\r
-            seqId=null;\r
+            seqId = null;\r
             try\r
             {\r
               index = Integer.parseInt(st.nextToken());\r
@@ -285,7 +285,8 @@ public class FeaturesFile extends AlignFile
 \r
           seq.addSequenceFeature(sf);\r
 \r
-          while (seqId!=null && (seq=align.findName(seq, seqId, false))!=null)\r
+          while (seqId != null\r
+                  && (seq = align.findName(seq, seqId, false)) != null)\r
           {\r
             seq.addSequenceFeature(new SequenceFeature(sf));\r
           }\r
@@ -379,12 +380,15 @@ public class FeaturesFile extends AlignFile
 \r
   }\r
 \r
-/**\r
- * generate a features file for seqs\r
- * @param seqs source of sequence features\r
- * @param visible hash of feature types and colours \r
- * @return features file contents\r
- */\r
+  /**\r
+   * generate a features file for seqs\r
+   * \r
+   * @param seqs\r
+   *                source of sequence features\r
+   * @param visible\r
+   *                hash of feature types and colours\r
+   * @return features file contents\r
+   */\r
   public String printJalviewFormat(SequenceI[] seqs, Hashtable visible)\r
   {\r
     return printJalviewFormat(seqs, visible, true);\r
@@ -392,9 +396,13 @@ public class FeaturesFile extends AlignFile
 \r
   /**\r
    * generate a features file for seqs with colours from visible (if any)\r
-   * @param seqs        source of features\r
-   * @param visible     hash of Colours for each feature type\r
-   * @param visOnly     when true only feature types in 'visible' will be output\r
+   * \r
+   * @param seqs\r
+   *                source of features\r
+   * @param visible\r
+   *                hash of Colours for each feature type\r
+   * @param visOnly\r
+   *                when true only feature types in 'visible' will be output\r
    * @return features file contents\r
    */\r
   public String printJalviewFormat(SequenceI[] seqs, Hashtable visible,\r
@@ -409,7 +417,8 @@ public class FeaturesFile extends AlignFile
     }\r
     if (visible != null && visOnly)\r
     {\r
-      // write feature colours only if we're given them and we are generating viewed features\r
+      // write feature colours only if we're given them and we are generating\r
+      // viewed features\r
       Enumeration en = visible.keys();\r
       String type;\r
       int color;\r