JAL-1705 include stop codons in derived CDS; support ensemblgenomes
[jalview.git] / src / jalview / ext / ensembl / EnsemblLookup.java
index cd792b5..c5945ae 100644 (file)
@@ -13,9 +13,34 @@ import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
 
+/**
+ * A client for the Ensembl lookup REST endpoint; used to find the Parent gene
+ * identifier given a transcript identifier.
+ * 
+ * @author gmcarstairs
+ *
+ */
 public class EnsemblLookup extends EnsemblRestClient
 {
 
+  /**
+   * Default constructor (to use rest.ensembl.org)
+   */
+  public EnsemblLookup()
+  {
+    super();
+  }
+
+  /**
+   * Constructor given the target domain to fetch data from
+   * 
+   * @param
+   */
+  public EnsemblLookup(String d)
+  {
+    super(d);
+  }
+
   @Override
   public String getDbName()
   {
@@ -41,7 +66,7 @@ public class EnsemblLookup extends EnsemblRestClient
    */
   protected URL getUrl(String identifier)
   {
-    String url = ENSEMBL_REST + "/lookup/id/" + identifier
+    String url = getDomain() + "/lookup/id/" + identifier
             + "?content-type=application/json";
     try
     {