X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FFormatAdapter.java;h=74410a186d56b127812138108093f65b46073e8e;hb=refs%2Fheads%2Ffeatures%2FJAL-1641_JSON;hp=dfbdf86f14dc01f4460b06cb3ce7d6cfcc38b04b;hpb=ad15cff29620f960119f80176f1fd443da9f6763;p=jalview.git diff --git a/src/jalview/io/FormatAdapter.java b/src/jalview/io/FormatAdapter.java index dfbdf86..74410a1 100755 --- a/src/jalview/io/FormatAdapter.java +++ b/src/jalview/io/FormatAdapter.java @@ -259,17 +259,20 @@ public class FormatAdapter extends AppletFormatAdapter throws java.io.IOException { Alignment al; - if (format.equals("HTML")) + if (format.equals(JSONFile.FILE_DESC)) { - afile = new HtmlFile(inFile, type); + afile = new JSONFile(inFile, type); al = new Alignment(afile.getSeqsAsArray()); afile.addAnnotations(al); + for (SequenceGroup sg : afile.getSeqGroups()) + { + al.addGroup(sg); + } } else { al = super.readFile(inFile, type, format); } - return al; } @@ -277,11 +280,12 @@ public class FormatAdapter extends AppletFormatAdapter throws java.io.IOException { Alignment al; - if (format.equals("HTML")) + if (format.equals(JSONFile.FILE_DESC)) { - afile = new HtmlFile(source); + afile = new JSONFile(source); al = new Alignment(afile.getSeqsAsArray()); afile.addAnnotations(al); + afile.addSeqGroups(al); } else { @@ -323,4 +327,5 @@ public class FormatAdapter extends AppletFormatAdapter return formatSequences(format, getCacheSuffixDefault(format), av, selectedOnly); } + }