*
* The values for EnsemblGenomes are retrieved by a REST call, that for
* Ensembl is added programmatically for convenience of lookup
*/
private static Map divisions;
@Override
public String getDbName()
{
return "ENSEMBL";
}
@Override
public AlignmentI getSequenceRecords(String queries) throws Exception
{
return null;
}
@Override
protected URL getUrl(List ids) throws MalformedURLException
{
return null;
}
@Override
protected boolean useGetRequest()
{
return true;
}
/**
* Answers the domain (http://rest.ensembl.org or
* http://rest.ensemblgenomes.org) for the given division, or null if not
* recognised by Ensembl.
*
* @param division
* @return
*/
public String getDomain(String division)
{
if (divisions == null)
{
fetchDivisions();
}
return divisions.get(division.toUpperCase());
}
/**
* On first request only, populate the lookup map by fetching the list of
* divisions known to EnsemblGenomes.
*/
void fetchDivisions()
{
divisions = new HashMap<>();
/*
* for convenience, pre-fill ensembl.org as the domain for "ENSEMBL"
*/
divisions.put(DBRefSource.ENSEMBL.toUpperCase(), ensemblDomain);
try
{
@SuppressWarnings("unchecked")
Iterator