JAL-3193 removal of rest.ensemblgenomes.org
[jalview.git] / src / jalview / ext / ensembl / EnsemblFeatures.java
index 9a45dda..859251b 100644 (file)
@@ -65,16 +65,6 @@ class EnsemblFeatures extends EnsemblRestClient
     super();
   }
 
-  /**
-   * Constructor given the target domain to fetch data from
-   * 
-   * @param d
-   */
-  public EnsemblFeatures(String d)
-  {
-    super(d);
-  }
-
   @Override
   public String getDbName()
   {
@@ -176,7 +166,9 @@ class EnsemblFeatures extends EnsemblRestClient
   }
 
   /**
-   * Returns the first non-null attribute found (if any) as a string
+   * Returns the first non-null attribute found (if any) as a string, formatted
+   * suitably for display as feature description or tooltip. Answers null if
+   * none of the attribute keys is present.
    * 
    * @param obj
    * @param keys
@@ -191,7 +183,9 @@ class EnsemblFeatures extends EnsemblRestClient
       Object val = obj.get(key);
       if (val != null)
       {
-        String s = val.toString();
+        String s = val instanceof JSONArray
+                ? JSONUtils.arrayToList((JSONArray) val)
+                : val.toString();
         if (!s.isEmpty())
         {
           return s;