*/
protected void loadOntologyZipFile(String ontologyFile)
{
+ long now = System.currentTimeMillis();
ZipInputStream zipStream = null;
try
{
String zipFile = ontologyFile + ".zip";
- System.out.println("Loading Sequence Ontology from " + zipFile);
InputStream inStream = this.getClass().getResourceAsStream(
"/" + zipFile);
zipStream = new ZipInputStream(new BufferedInputStream(inStream));
loadOboFile(zipStream);
}
}
+ long elapsed = System.currentTimeMillis() - now;
+ System.out.println("Loaded Sequence Ontology from " + zipFile + " ("
+ + elapsed + "ms)");
} catch (Exception e)
{
e.printStackTrace();
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;
{
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;
}