JAL-2426 JAL-1270 report Xfam download URL used if debug enabled
authorJim Procter <jprocter@issues.jalview.org>
Wed, 9 Aug 2017 18:32:05 +0000 (19:32 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 9 Aug 2017 19:21:02 +0000 (20:21 +0100)
src/jalview/ws/dbsources/Xfam.java

index 3554f01..b0bea88 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.ws.dbsources;
 
+import jalview.bin.Cache;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.DBRefEntry;
 import jalview.io.DataSourceType;
@@ -56,9 +57,17 @@ public abstract class Xfam extends DbSourceProxyImpl
     // retrieved.
     startQuery();
     // TODO: trap HTTP 404 exceptions and return null
-    AlignmentI rcds = new FormatAdapter().readFile(getXFAMURL()
-            + queries.trim().toUpperCase() + getXFAMURLSUFFIX(),
+    String xfamUrl = getXFAMURL()
+            + queries.trim().toUpperCase() + getXFAMURLSUFFIX();
+
+    if (Cache.log != null)
+    {
+      Cache.log.debug("XFAM URL for retrieval is: " + xfamUrl);
+    }
+
+    AlignmentI rcds = new FormatAdapter().readFile(xfamUrl  ,
             DataSourceType.URL, FileFormat.Stockholm);
+
     for (int s = 0, sNum = rcds.getHeight(); s < sNum; s++)
     {
       rcds.getSequenceAt(s).addDBRef(new DBRefEntry(getXfamSource(),