JAL-972 migration from dasobert to jdas registry URLs
[jalview.git] / src / jalview / ws / dbsources / das / datamodel / DasSourceRegistry.java
index 3ed597e..777c4a4 100644 (file)
@@ -70,6 +70,12 @@ public class DasSourceRegistry implements DasSourceRegistryI,
               DEFAULT_REGISTRY);
       registry = DEFAULT_REGISTRY;
     }
+    if (registry.lastIndexOf("sources.xml") == registry.length() - 11)
+    {
+      // no trailing sources.xml document for registry in JDAS
+      jalview.bin.Cache.setProperty(jalview.bin.Cache.DAS_REGISTRY_URL,
+              registry=registry.substring(0, registry.lastIndexOf("sources.xml")));
+    }
     return registry;
   }