JAL-1541 Modified BioJs exporter to take advantage of the abstracted JSONFile export...
[jalview.git] / src / jalview / io / IdentifyFile.java
index 4fb2516..f1089ec 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  *
  * This file is part of Jalview.
  *
@@ -133,23 +133,26 @@ public class IdentifyFile
         if ((data.indexOf("# STOCKHOLM") > -1))
         {
           reply = "STH";
-
           break;
         }
         // if (data.matches("<(\"[^\"]*\"|'[^']*'|[^'\">])*>"))
         if (data.matches("<(?i)html(\"[^\"]*\"|'[^']*'|[^'\">])*>"))
         {
-          reply = "HTML";
+          reply = HtmlFile.FILE_DESC;
           break;
         }
 
         if (data.matches("<(?i)rnaml (\"[^\"]*\"|'[^']*'|[^'\">])*>"))
         {
           reply = "RNAML";
-
           break;
         }
 
+         if (data.indexOf("{\"") > -1)
+         {
+         reply = JSONFile.FILE_DESC;
+         break;
+         }
         if ((data.length() < 1) || (data.indexOf("#") == 0))
         {
           lineswereskipped = true;