Merge branch 'develop' into bug/JAL-2323disulfideOverview
[jalview.git] / src / jalview / io / SequenceAnnotationReport.java
index 850b1dc..6c8f40f 100644 (file)
@@ -141,8 +141,7 @@ public class SequenceAnnotationReport
   void appendFeature(final StringBuilder sb, int rpos,
           Map<String, float[][]> minmax, SequenceFeature feature)
   {
-    String tmpString;
-    if (feature.getType().equals("disulfide bond"))
+    if (feature.isContactFeature())
     {
       if (feature.getBegin() == rpos || feature.getEnd() == rpos)
       {
@@ -150,7 +149,8 @@ public class SequenceAnnotationReport
         {
           sb.append("<br>");
         }
-        sb.append("disulfide bond ").append(feature.getBegin()).append(":")
+        sb.append(feature.getType()).append(" ").append(feature.getBegin())
+                .append(":")
                 .append(feature.getEnd());
       }
     }
@@ -178,7 +178,7 @@ public class SequenceAnnotationReport
         if (feature.getDescription() != null
                 && !feature.description.equals(feature.getType()))
         {
-          tmpString = feature.getDescription();
+          String tmpString = feature.getDescription();
           String tmp2up = tmpString.toUpperCase();
           int startTag = tmp2up.indexOf("<HTML>");
           if (startTag > -1)
@@ -223,11 +223,11 @@ public class SequenceAnnotationReport
         // check score should be shown
         if (!Float.isNaN(feature.getScore()))
         {
-          float[][] rng = (minmax == null) ? null : ((float[][]) minmax
-                  .get(feature.getType()));
+          float[][] rng = (minmax == null) ? null : minmax.get(feature
+                  .getType());
           if (rng != null && rng[0] != null && rng[0][0] != rng[0][1])
           {
-            sb.append(" Score=" + feature.getScore());
+            sb.append(" Score=").append(String.valueOf(feature.getScore()));
           }
         }
         String status = (String) feature.getValue("status");