ensure successive matches to a regex have distinct annotation name (indice suffix...
[jalview.git] / src / jalview / io / StockholmFile.java
index 945b8c5..ccbe818 100644 (file)
@@ -53,7 +53,10 @@ public class StockholmFile extends AlignFile
   {\r
     super(inFile, type);\r
   }\r
-\r
+  public StockholmFile(FileParse source) throws IOException\r
+  {\r
+    super(source);\r
+  }\r
   public void initData()\r
   {\r
     super.initData();\r
@@ -221,6 +224,7 @@ public class StockholmFile extends AlignFile
           // + ": " + seq);\r
           this.seqs.addElement(seqO);\r
         }\r
+        return; // finished parsing this segment of source\r
       }\r
       else if (!r.search(line))\r
       {\r
@@ -476,18 +480,18 @@ public class StockholmFile extends AlignFile
     {\r
       String pos = annots.substring(i, i + 1);\r
       Annotation ann;\r
-      ann = new Annotation(pos, "", ' ', Float.NaN);\r
+      ann = new Annotation(pos, "", ' ', 0f); // 0f is 'valid' null - will not be written out \r
       if (ss)\r
       {\r
         ann.secondaryStructure = jalview.schemes.ResidueProperties\r
                 .getDssp3state(pos).charAt(0);\r
         if (ann.secondaryStructure == pos.charAt(0) || pos.charAt(0) == 'C')\r
         {\r
-          ann.displayCharacter = "";\r
+          ann.displayCharacter = ""; // null; // " ";\r
         }\r
         else\r
         {\r
-          ann.displayCharacter += " ";\r
+          ann.displayCharacter = " "+ann.displayCharacter;\r
         }\r
       }\r
 \r