X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fgff%2FSequenceOntologyFactory.java;fp=src%2Fjalview%2Fio%2Fgff%2FSequenceOntologyFactory.java;h=cd5a22cf4a8db201707c83a5909d5d09dd6899a8;hb=208f2c3de82e3327c4f930ab7d04f5b812ccd277;hp=90cae7abb2b9d0f1cff8bf7dc81e8616a35a0df8;hpb=5721b73c6d5de84b21a989a8734e4c161f5dc630;p=jalview.git diff --git a/src/jalview/io/gff/SequenceOntologyFactory.java b/src/jalview/io/gff/SequenceOntologyFactory.java index 90cae7a..cd5a22c 100644 --- a/src/jalview/io/gff/SequenceOntologyFactory.java +++ b/src/jalview/io/gff/SequenceOntologyFactory.java @@ -20,6 +20,8 @@ */ package jalview.io.gff; +import jalview.bin.Jalview; + /** * 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 @@ -30,19 +32,21 @@ package jalview.io.gff; */ public class SequenceOntologyFactory { - private static SequenceOntologyI instance; + // private static SequenceOntologyI instance; // moved to Jalview.instance for + // JavaScript public static synchronized SequenceOntologyI getInstance() { - if (instance == null) + Jalview j = Jalview.getInstance(); + if (j.sequenceOntology == null) { - instance = new SequenceOntologyLite(); + j.sequenceOntology = new SequenceOntologyLite(); } - return instance; + return j.sequenceOntology; } public static void setInstance(SequenceOntologyI so) { - instance = so; + Jalview.getInstance().sequenceOntology = so; } }