3 import jalview.gui.AlignFrame;
4 import jalview.schemes.ColourSchemeI;
6 import java.io.IOException;
8 import org.jsoup.Jsoup;
9 import org.jsoup.nodes.Document;
10 import org.jsoup.nodes.Element;
12 public class HtmlFile extends AlignFile
14 public static final String FILE_EXT = "html";
16 public static final String FILE_DESC = "HTML";
18 private ColourSchemeI cs;
25 public HtmlFile(FileParse source) throws IOException
30 public HtmlFile(String inFile, String type) throws IOException
36 public void parse() throws IOException
40 StringBuilder htmlData = new StringBuilder();
42 while ((currentLine = nextLine()) != null)
44 htmlData.append(currentLine);
47 Document doc = Jsoup.parse(htmlData.toString());
48 Element content = doc.getElementById("seqData");
49 String alignmentJsonString = content.val();
51 JSONFile jsonFile = new JSONFile().parse(alignmentJsonString);
53 seqGroups = jsonFile.seqGroups;
54 annotations = jsonFile.annotations;
61 public void LoadAlignmentFeatures(AlignFrame af)
63 af.setShowSeqFeatures(JSONFile.isSeqFeaturesEnabled());
64 af.changeColour(JSONFile.getColourScheme());
65 af.setMenusForViewport();
72 throw new UnsupportedOperationException(
73 "Print method of HtmlFile not yet supported!");