From: gmungoc Date: Wed, 5 Oct 2016 13:24:54 +0000 (+0100) Subject: JAL-1191 configure full SO for desktop, SOLite for applet (without X-Git-Tag: Release_2_10_0~13 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bfe4fa22a61ee595f0d6595a3ee625c966000c6d;p=jalview.git JAL-1191 configure full SO for desktop, SOLite for applet (without breaking the build) --- diff --git a/build.xml b/build.xml index 184596c..d8f12e0 100755 --- a/build.xml +++ b/build.xml @@ -573,7 +573,7 @@ - + diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 3294c26..ce29f01 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -23,6 +23,7 @@ package jalview.bin; import groovy.lang.Binding; import groovy.util.GroovyScriptEngine; +import jalview.ext.so.SequenceOntology; import jalview.gui.AlignFrame; import jalview.gui.Desktop; import jalview.gui.PromptUserConfig; @@ -33,6 +34,7 @@ import jalview.io.FormatAdapter; import jalview.io.HtmlSvgOutput; import jalview.io.IdentifyFile; import jalview.io.NewickFile; +import jalview.io.gff.SequenceOntologyFactory; import jalview.schemes.ColourSchemeI; import jalview.schemes.ColourSchemeProperty; import jalview.schemes.UserColourScheme; @@ -288,6 +290,14 @@ public class Jalview } } + /* + * configure 'full' SO model unless preferences say not to + */ + if (!Cache.getDefault("USE_SO_LITE", false)) + { + SequenceOntologyFactory.setInstance(new SequenceOntology()); + } + if (!headless) { desktop = new Desktop(); diff --git a/src/jalview/io/gff/SequenceOntologyFactory.java b/src/jalview/io/gff/SequenceOntologyFactory.java index acf90e7..2053b86 100644 --- a/src/jalview/io/gff/SequenceOntologyFactory.java +++ b/src/jalview/io/gff/SequenceOntologyFactory.java @@ -1,14 +1,10 @@ package jalview.io.gff; -import jalview.bin.Cache; -import jalview.ext.so.SequenceOntology; /** - * A factory class that returns a model of the Sequence Ontology. If the user's - * Jalview properties file has the line
- * USE_SO_LITE = true
- * then a hard-coded subset will be used, otherwise the full ontology (as - * downloaded at a point in time). + * A factory class that returns a model of the Sequence Ontology. By default a + * hard-coded subset is used (for the applet, or testing), or setInstance() can + * be used to set full Ontology data. * * @author gmcarstairs * @@ -21,14 +17,7 @@ public class SequenceOntologyFactory { if (instance == null) { - if (Cache.getDefault("USE_SO_LITE", false)) - { - instance = new SequenceOntologyLite(); - } - else - { - instance = new SequenceOntology(); - } + instance = new SequenceOntologyLite(); } return instance; }