- * On first request only, populate the lookup map by fetching the list of
- * divisions known to EnsemblGenomes
- *
- */
- private static EnsemblInfo getInstance()
- {
- return (EnsemblInfo) ApplicationSingletonProvider.getInstance(EnsemblInfo.class);
- }
-
- private EnsemblInfo()
- {
- // use getInstance()
-
- /*
- * for convenience, pre-fill ensembl.org as the domain for "ENSEMBL"
- */
- divisions.put(DBRefSource.ENSEMBL.toUpperCase(), ensemblDomain);
- try
- {
- @SuppressWarnings("unchecked")
- Iterator<Object> rvals = (Iterator<Object>) getJSON(
- getDivisionsUrl(ensemblGenomesDomain), null, -1,
- MODE_ITERATOR, null);
- if (rvals == null)
- {
- return;
- }
- while (rvals.hasNext())
- {
- String division = rvals.next().toString();
- divisions.put(division.toUpperCase(), ensemblGenomesDomain);
- }
- } catch (IOException | ParseException | NumberFormatException e)
- {
- // ignore
- }
- }
-
- /*