JAL-2576 Proposed fix
[jalview.git] / src / jalview / io / FileFormat.java
index 5a95a9e..3354b88 100644 (file)
@@ -256,6 +256,21 @@ public enum FileFormat implements FileFormatI
       return new FeaturesFile();
     }
   },
+  ScoreMatrix("Substitution matrix", "", false, false)
+  {
+    @Override
+    public AlignmentFileReaderI getReader(FileParse source)
+            throws IOException
+    {
+      return new ScoreMatrixFile(source);
+    }
+
+    @Override
+    public AlignmentFileWriterI getWriter(AlignmentI al)
+    {
+      return null;
+    }
+  },
   PDB("PDB", "pdb,ent", true, false)
   {
     @Override
@@ -332,6 +347,12 @@ public enum FileFormat implements FileFormatI
     {
       return false;
     }
+
+    @Override
+    public boolean isIdentifiable()
+    {
+      return false;
+    }
   };
 
   private boolean writable;
@@ -405,4 +426,14 @@ public enum FileFormat implements FileFormatI
   {
     return false;
   }
+
+  /**
+   * By default, answers true, indicating the format is one that can be
+   * identified by IdentifyFile. Formats that cannot be identified should
+   * override this method to return false.
+   */
+  public boolean isIdentifiable()
+  {
+    return true;
+  }
 }