JAL-2805 allow for non-xsd validating phyloxml parsing
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 9 Jan 2018 15:31:44 +0000 (15:31 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 9 Jan 2018 15:31:44 +0000 (15:31 +0000)
src/jalview/ext/forester/io/ForesterParser.java

index 4cd84b1..469463e 100644 (file)
@@ -41,9 +41,16 @@ public class ForesterParser
   public static ForesterParser createPhyloXmlParser(File file)
           throws PhylogenyParserException, IOException
   {
-    // support non-xsd validating?
+    if (AptxInit.APTX_CONFIG.isValidatePhyloXmlAgainstSchema())
+    {
     return new ForesterParser(
-            PhyloXmlParser.createPhyloXmlParserXsdValidating(), file);
+              PhyloXmlParser.createPhyloXmlParserXsdValidating(), file);
+    }
+    else
+    {
+      return new ForesterParser(PhyloXmlParser.createPhyloXmlParser(),
+              file);
+    }
   }
 
   // ParserBasedPhylogenyFactory.getInstance().create(foresterParser, source)