*/
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
*/
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;
}
}