JAL-3143 fetch Ensembl(Genomes) features as JSON not GFF
[jalview.git] / src / jalview / ext / ensembl / EnsemblSeqProxy.java
index 19065f2..7a37c8a 100644 (file)
@@ -62,8 +62,6 @@ import org.json.simple.parser.ParseException;
  */
 public abstract class EnsemblSeqProxy extends EnsemblRestClient
 {
-  protected static final String NAME = "Name";
-
   protected static final String DESCRIPTION = "description";
 
   /*
@@ -442,10 +440,10 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
   }
 
   /**
-   * Parses a JSON response into a list of sequences
+   * Parses a JSON response for a single sequence ID query
    * 
    * @param br
-   * @return
+   * @return a single jalview.datamodel.Sequence
    * @see http://rest.ensembl.org/documentation/info/sequence_id
    */
   protected List<SequenceI> parseSequenceJson(BufferedReader br)
@@ -867,9 +865,8 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
   protected boolean featureMayBelong(SequenceFeature sf, String identifier)
   {
     String parent = (String) sf.getValue(PARENT);
-    // using contains to allow for prefix "gene:", "transcript:" etc
     if (parent != null
-            && !parent.toUpperCase().contains(identifier.toUpperCase()))
+            && !parent.equalsIgnoreCase(identifier))
     {
       // this genomic feature belongs to a different transcript
       return false;
@@ -877,6 +874,9 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
     return true;
   }
 
+  /**
+   * Answers a short description of the sequence fetcher
+   */
   @Override
   public String getDescription()
   {