update spikes/mungo from JAL-3076 patch branch
[jalview.git] / src / jalview / ext / ensembl / EnsemblLookup.java
index 5f353f8..c6b794a 100644 (file)
@@ -117,21 +117,9 @@ public class EnsemblLookup extends EnsemblRestClient
     return true;
   }
 
-  @Override
-  protected String getRequestMimeType(boolean multipleIds)
-  {
-    return "application/json";
-  }
-
-  @Override
-  protected String getResponseMimeType()
-  {
-    return "application/json";
-  }
-
   /**
    * Returns the gene id related to the given identifier (which may be for a
-   * gene, transcript or protein)
+   * gene, transcript or protein), or null if none is found
    * 
    * @param identifier
    * @return
@@ -143,7 +131,7 @@ public class EnsemblLookup extends EnsemblRestClient
 
   /**
    * Returns the gene id related to the given identifier (which may be for a
-   * gene, transcript or protein)
+   * gene, transcript or protein), or null if none is found
    * 
    * @param identifier
    * @param objectType
@@ -165,6 +153,10 @@ public class EnsemblLookup extends EnsemblRestClient
    */
   protected String parseGeneId(JSONObject val)
   {
+    if (val == null)
+    {
+      return null;
+    }
     String geneId = null;
     String type = val.get(OBJECT_TYPE).toString();
     if (OBJECT_TYPE_GENE.equalsIgnoreCase(type))