Merge branch 'develop' of https://source.jalview.org/git/jalview.git into develop
[jalview.git] / src / jalview / fts / core / FTSRestRequest.java
similarity index 78%
rename from src/jalview/ws/uimodel/PDBRestRequest.java
rename to src/jalview/fts/core/FTSRestRequest.java
index 7bfc226..68068d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
 
-package jalview.ws.uimodel;
+package jalview.fts.core;
 
 import jalview.bin.Cache;
 import jalview.datamodel.SequenceI;
-import jalview.ws.dbsources.PDBRestClient.PDBDocField;
+import jalview.fts.api.FTSDataColumnI;
 
 import java.util.Collection;
 
 /**
- * Represents the PDB request to be consumed by the PDBRestClient
+ * Represents the FTS request to be consumed by the FTSRestClient
  * 
  * @author tcnofoegbu
  *
  */
-public class PDBRestRequest
+public class FTSRestRequest
 {
   private String fieldToSearchBy;
 
@@ -58,7 +58,7 @@ public class PDBRestRequest
 
   private boolean isSortAscending;
 
-  private Collection<PDBDocField> wantedFields;
+  private Collection<FTSDataColumnI> wantedFields;
 
   public String getFieldToSearchBy()
   {
@@ -100,12 +100,13 @@ public class PDBRestRequest
     this.responseSize = responseSize;
   }
 
-  public Collection<PDBDocField> getWantedFields()
+  public Collection<FTSDataColumnI> getWantedFields()
   {
     return wantedFields;
   }
 
-  public void setWantedFields(Collection<PDBDocField> wantedFields)
+  public void setWantedFields(
+          Collection<FTSDataColumnI> wantedFields)
   {
     this.wantedFields = wantedFields;
   }
@@ -136,21 +137,6 @@ public class PDBRestRequest
     this.associatedSequence = associatedSequence;
   }
 
-  public String getQuery()
-  {
-    return fieldToSearchBy + searchTerm
-            + (isAllowEmptySeq() ? "" : " AND molecule_sequence:['' TO *]")
-            + (isAllowUnpublishedEntries() ? "" : " AND status:REL");
-  }
-
-  @Override
-  public String toString()
-  {
-    return "Query : " + getQuery() + " sort field: " + fieldToSortBy
-            + " isAsc: " + isAscending() + " Associated Seq : "
-            + associatedSequence;
-  }
-
   public boolean isAllowUnpublishedEntries()
   {
     return allowUnpublishedEntries;