From f78ed45ce8d7bea36c116bba236061365c58dd88 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Wed, 17 Jan 2018 16:03:51 +0000 Subject: [PATCH] JAL-281 added isTreeFile() boolean --- src/jalview/io/FileFormat.java | 18 ++++++++++++++++++ src/jalview/io/FileFormatI.java | 7 +++++++ 2 files changed, 25 insertions(+) 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(); } -- 1.7.10.2