JAL-1881 Bugfix for annotation import from BioJS
[jalview.git] / src / jalview / io / JSONFile.java
index a0a8cb1..0c0f395 100644 (file)
@@ -503,8 +503,9 @@ public class JSONFile extends AlignFile implements ComplexAlignFile
                     .valueOf(annot.get("value").toString());
             String desc = annot.get("description") == null ? null : annot
                     .get("description").toString();
-
-            char ss = annot.get("secondaryStructure") == null ? ' ' : annot
+            char ss = annot.get("secondaryStructure") == null
+                    || annot.get("secondaryStructure").toString()
+                            .equalsIgnoreCase("u0000") ? ' ' : annot
                     .get("secondaryStructure").toString().charAt(0);
             String displayChar = annot.get("displayCharacter") == null ? ""
                     : annot.get("displayCharacter").toString();
@@ -606,7 +607,9 @@ public class JSONFile extends AlignFile implements ComplexAlignFile
     for (JalviewBioJsColorSchemeMapper cs : JalviewBioJsColorSchemeMapper
             .values())
     {
-      if (cs.getBioJsName().equalsIgnoreCase(bioJsColourSchemeName))
+      if (cs.getBioJsName().equalsIgnoreCase(bioJsColourSchemeName)
+              || cs.getJalviewName()
+                      .equalsIgnoreCase(bioJsColourSchemeName))
       {
         jalviewColor = cs.getJvColourScheme();
         break;