*/
package jalview.ws.dbsources.das.datamodel;
+import jalview.bin.Cache;
+import jalview.ws.dbsources.das.api.DasSourceRegistryI;
+import jalview.ws.dbsources.das.api.jalviewSourceI;
+
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import org.biodas.jdas.schema.sources.SOURCES;
import org.biodas.jdas.schema.sources.VERSION;
-import jalview.bin.Cache;
-import jalview.ws.dbsources.das.api.DasSourceRegistryI;
-import jalview.ws.dbsources.das.api.jalviewSourceI;
-
/**
*
*/
private Hashtable<String, jalviewSourceI> localSources = null;
- public static String DEFAULT_REGISTRY = "http://www.dasregistry.org/das/";
+ // This is the EBI DAS registry archive - temporary fix
+ public static String DEFAULT_REGISTRY = "http://www.ebi.ac.uk/das-srv/registry/das";
+ private static String[] blackList = new String[]
+ { "http://www.dasregistry.org", "sanger.ac.uk/registry/das1/sources/" };
/**
* true if thread is running and we are talking to DAS registry service
*/
{
String registry = jalview.bin.Cache.getDefault("DAS_REGISTRY_URL",
DEFAULT_REGISTRY);
-
- if (registry.indexOf("/registry/das1/sources/") > -1)
+ // replace and update old entries
+ for (String blacklisted : blackList)
{
- jalview.bin.Cache.setProperty(jalview.bin.Cache.DAS_REGISTRY_URL,
- DEFAULT_REGISTRY);
- registry = DEFAULT_REGISTRY;
+ if (registry.indexOf(blacklisted) > -1)
+ {
+ jalview.bin.Cache.setProperty(jalview.bin.Cache.DAS_REGISTRY_URL,
+ DEFAULT_REGISTRY);
+ registry = DEFAULT_REGISTRY;
+ break;
+ }
}
if (registry.lastIndexOf("sources.xml") == registry.length() - 11)
{