JAL-1191 use full SO in desktop application
[jalview.git] / src / jalview / io / gff / SequenceOntologyFactory.java
index 3eaa5d1..acf90e7 100644 (file)
@@ -1,5 +1,18 @@
 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).
+ * 
+ * @author gmcarstairs
+ *
+ */
 public class SequenceOntologyFactory
 {
   private static SequenceOntologyI instance;
@@ -8,8 +21,14 @@ public class SequenceOntologyFactory
   {
     if (instance == null)
     {
-      // instance = new SequenceOntology();
-      instance = new SequenceOntologyLite();
+      if (Cache.getDefault("USE_SO_LITE", false))
+      {
+        instance = new SequenceOntologyLite();
+      }
+      else
+      {
+        instance = new SequenceOntology();
+      }
     }
     return instance;
   }