Merge branch 'develop' into features/hmmer
[jalview.git] / src / jalview / io / StockholmFile.java
index e22ee0a..dc4fabd 100644 (file)
@@ -195,7 +195,7 @@ public class StockholmFile extends AlignFile
     String version;
     // String id;
     Hashtable seqAnn = new Hashtable(); // Sequence related annotations
-    LinkedHashMap<String, String> seqs = new LinkedHashMap<String, String>();
+    LinkedHashMap<String, String> seqs = new LinkedHashMap<>();
     Regex p, r, rend, s, x;
     // Temporary line for processing RNA annotation
     // String RNAannot = "";
@@ -656,7 +656,7 @@ public class StockholmFile extends AlignFile
               strucAnn = new Hashtable();
             }
 
-            Vector<AlignmentAnnotation> newStruc = new Vector<AlignmentAnnotation>();
+            Vector<AlignmentAnnotation> newStruc = new Vector<>();
             parseAnnotationRow(newStruc, type, ns);
             for (AlignmentAnnotation alan : newStruc)
             {
@@ -708,7 +708,7 @@ public class StockholmFile extends AlignFile
   private void guessDatabaseFor(Sequence seqO, String dbr, String dbsource)
   {
     DBRefEntry dbrf = null;
-    List<DBRefEntry> dbrs = new ArrayList<DBRefEntry>();
+    List<DBRefEntry> dbrs = new ArrayList<>();
     String seqdb = "Unknown", sdbac = "" + dbr;
     int st = -1, en = -1, p;
     if ((st = sdbac.indexOf("/")) > -1)
@@ -997,6 +997,7 @@ public class StockholmFile extends AlignFile
       }
     }
 
+
     // output annotations
     while (i < s.length && s[i] != null)
     {
@@ -1009,7 +1010,6 @@ public class StockholmFile extends AlignFile
 
           String key = type2id(alAnot[j].label);
           boolean isrna = alAnot[j].isValidStruc();
-
           if (isrna)
           {
             // hardwire to secondary structure if there is RNA secondary
@@ -1030,7 +1030,8 @@ public class StockholmFile extends AlignFile
           for (int k = 0; k < ann.length; k++)
           {
             seq += outputCharacter(key, k, isrna, ann, s[i]);
-          }
+
+        }
           out.append(seq);
           out.append(newline);
         }
@@ -1090,6 +1091,8 @@ public class StockholmFile extends AlignFile
         out.append(newline);
       }
     }
+    
+
 
     out.append("//");
     out.append(newline);
@@ -1154,7 +1157,7 @@ public class StockholmFile extends AlignFile
     out.append("# STOCKHOLM 1.0");
     out.append(newline);
     print(getSeqsAsArray(), false);
-
+    
     out.append("//");
     out.append(newline);
     return out.toString();