JAL-1191 configure full SO for desktop, SOLite for applet (without
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 5 Oct 2016 13:24:54 +0000 (14:24 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 5 Oct 2016 13:24:54 +0000 (14:24 +0100)
breaking the build)

build.xml
src/jalview/bin/Jalview.java
src/jalview/io/gff/SequenceOntologyFactory.java

index 184596c..d8f12e0 100755 (executable)
--- a/build.xml
+++ b/build.xml
 
 <target name="compileApplet" depends="init,clean">
   <mkdir dir="${outputDir}" />
-  <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="jalviewlite.deps" includes="jalview/appletgui/**" excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**,jalview/ext/ensembl/**,jalview/ext/so" />
+  <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="jalviewlite.deps" includes="jalview/appletgui/**" excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**,jalview/ext/ensembl/**,jalview/ext/so/**" />
 </target>
 
 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
index 3294c26..ce29f01 100755 (executable)
@@ -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();
index acf90e7..2053b86 100644 (file)
@@ -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 <br>
- * USE_SO_LITE = true <br>
- * 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;
   }