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). * * @author gmcarstairs * */ public class SequenceOntologyFactory { private static SequenceOntologyI instance; public static synchronized SequenceOntologyI getInstance() { if (instance == null) { if (Cache.getDefault("USE_SO_LITE", false)) { instance = new SequenceOntologyLite(); } else { instance = new SequenceOntology(); } } return instance; } public static void setInstance(SequenceOntologyI so) { instance = so; } }