From: kjvdheide Date: Wed, 17 Jan 2018 16:03:51 +0000 (+0000) Subject: JAL-281 added isTreeFile() boolean X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f78ed45ce8d7bea36c116bba236061365c58dd88;p=jalview.git JAL-281 added isTreeFile() boolean --- diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index 2b0122b..3b54f38 100644 --- a/src/jalview/io/FileFormat.java +++ b/src/jalview/io/FileFormat.java @@ -399,6 +399,12 @@ public enum FileFormat implements FileFormatI return true; } + @Override + public boolean isTreeFile() + { + return true; + } + }, PhyloXML("PhyloXML", "phyloxml,phylo.xml,pxml", true, true) { @@ -423,6 +429,12 @@ public enum FileFormat implements FileFormatI return true; } + @Override + public boolean isTreeFile() + { + return true; + } + }; private boolean writable; @@ -496,6 +508,12 @@ public enum FileFormat implements FileFormatI return false; } + @Override + public boolean isTreeFile() + { + return false; + } + /** * By default, answers true, indicating the format is one that can be * identified by IdentifyFile. Formats that cannot be identified should diff --git a/src/jalview/io/FileFormatI.java b/src/jalview/io/FileFormatI.java index f7b6076..1e8ab1d 100644 --- a/src/jalview/io/FileFormatI.java +++ b/src/jalview/io/FileFormatI.java @@ -80,4 +80,11 @@ public interface FileFormatI * @return */ boolean isStructureFile(); + + /** + * Answers true if the file format can contain a phylogenetic tree. + * + * @return + */ + boolean isTreeFile(); }