retrieve URL for datasource of packed set
[jalview.git] / src / jalview / ws / rest / HttpResultSet.java
index 1c87196..c360287 100644 (file)
@@ -197,4 +197,19 @@ public class HttpResultSet extends FileParse
     super.finalize();
   }
 
+  /**
+   * 
+   * @return the URL that this result set read data from.
+   */
+  public String getUrl()
+  {
+    try {
+      return cachedRequest.getURI().toURL().toString();
+    }  catch (Exception x)
+    {
+      x.printStackTrace();
+      return null;
+    }
+  }
+
 }