JAL-1894 update year/version in copyright
[jalview.git] / src / jalview / io / StockholmFile.java
index 3b9fb00..2f5263b 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.0b1)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -420,8 +420,8 @@ public class StockholmFile extends AlignFile
         {
           // logger.error("Could not parse sequence line: " + line);
           throw new IOException(MessageManager.formatMessage(
-                  "exception.couldnt_parse_sequence_line", new String[]
-                  { line }));
+                  "exception.couldnt_parse_sequence_line",
+                  new String[] { line }));
         }
         String ns = seqs.get(x.stringMatched(1));
         if (ns == null)
@@ -533,9 +533,9 @@ public class StockholmFile extends AlignFile
           }
           else
           {
-            throw new IOException(MessageManager.formatMessage(
-                    "exception.error_parsing_line", new String[]
-                    { line }));
+            // throw new IOException(MessageManager.formatMessage(
+            // "exception.error_parsing_line", new String[] { line }));
+            System.err.println(">> missing annotation: " + line);
           }
         }
         else if (annType.equals("GC"))
@@ -665,8 +665,8 @@ public class StockholmFile extends AlignFile
         else
         {
           throw new IOException(MessageManager.formatMessage(
-                  "exception.unknown_annotation_detected", new String[]
-                  { annType, annContent }));
+                  "exception.unknown_annotation_detected", new String[] {
+                      annType, annContent }));
         }
       }
     }
@@ -779,9 +779,8 @@ public class StockholmFile extends AlignFile
     {
       for (DBRefEntry d : dbrs)
       {
-        jalview.util.MapList mp = new jalview.util.MapList(new int[]
-        { seqO.getStart(), seqO.getEnd() }, new int[]
-        { st, en }, 1, 1);
+        jalview.util.MapList mp = new jalview.util.MapList(new int[] {
+            seqO.getStart(), seqO.getEnd() }, new int[] { st, en }, 1, 1);
         jalview.datamodel.Mapping mping = new Mapping(mp);
         d.setMap(mping);
       }
@@ -826,7 +825,7 @@ public class StockholmFile extends AlignFile
       // be written out
       if (ss)
       {
-        //if (" .-_".indexOf(pos) == -1)
+        // if (" .-_".indexOf(pos) == -1)
         {
           if (detectbrackets.search(pos))
           {
@@ -848,7 +847,7 @@ public class StockholmFile extends AlignFile
             ann.displayCharacter = " " + ann.displayCharacter;
           }
         }
-        
+
       }
 
       els[i] = ann;
@@ -978,6 +977,7 @@ public class StockholmFile extends AlignFile
             {
               feature = ds.getSequenceFeatures()[0].type;
             }
+            // ?bug - feature may still have previous loop value
             String key = type2id(feature);
 
             if (key == null)
@@ -1067,21 +1067,19 @@ public class StockholmFile extends AlignFile
    * @param ann
    * @param sequenceI
    */
-  private char outputCharacter(String key, int k,
-          boolean isrna, Annotation[] ann, SequenceI sequenceI)
+  private char outputCharacter(String key, int k, boolean isrna,
+          Annotation[] ann, SequenceI sequenceI)
   {
     char seq = ' ';
     Annotation annot = ann[k];
     String ch = (annot == null) ? ((sequenceI == null) ? "-" : Character
-            .toString(sequenceI.getCharAt(k)))
-            : annot.displayCharacter;
+            .toString(sequenceI.getCharAt(k))) : annot.displayCharacter;
     if (key != null && key.equals("SS"))
     {
       if (annot == null)
       {
         // sensible gap character if one is available or make one up
-        return sequenceI == null ? '-' : sequenceI
-                .getCharAt(k);
+        return sequenceI == null ? '-' : sequenceI.getCharAt(k);
       }
       else
       {