2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
22 package jalview.fts.core;
24 import jalview.bin.Cache;
25 import jalview.datamodel.SequenceI;
26 import jalview.fts.api.FTSDataColumnI;
28 import java.util.Collection;
31 * Represents the FTS request to be consumed by the FTSRestClient
36 public class FTSRestRequest
38 private String fieldToSearchBy;
40 private String searchTerm;
42 private String fieldToSortBy;
44 private SequenceI associatedSequence;
46 private boolean allowEmptySequence;
48 private boolean allowUnpublishedEntries = Cache
49 .getDefault("ALLOW_UNPUBLISHED_PDB_QUERYING", false);
51 private boolean facet;
53 private String facetPivot;
55 private int facetPivotMinCount;
57 private int responseSize;
61 private boolean isSortAscending;
63 private Collection<FTSDataColumnI> wantedFields;
65 public String getFieldToSearchBy()
67 return fieldToSearchBy;
70 public void setFieldToSearchBy(String fieldToSearchBy)
72 this.fieldToSearchBy = fieldToSearchBy;
75 public String getSearchTerm()
80 public void setSearchTerm(String searchTerm)
82 this.searchTerm = searchTerm;
85 public boolean isAllowEmptySeq()
87 return allowEmptySequence;
90 public void setAllowEmptySeq(boolean allowEmptySeq)
92 this.allowEmptySequence = allowEmptySeq;
95 public int getResponseSize()
100 public void setResponseSize(int responseSize)
102 this.responseSize = responseSize;
105 public Collection<FTSDataColumnI> getWantedFields()
110 public void setWantedFields(Collection<FTSDataColumnI> wantedFields)
112 this.wantedFields = wantedFields;
115 public String getFieldToSortBy()
117 return fieldToSortBy;
120 public void setFieldToSortBy(String fieldToSortBy,
121 boolean isSortAscending)
123 this.fieldToSortBy = fieldToSortBy;
124 this.isSortAscending = isSortAscending;
127 public boolean isAscending()
129 return isSortAscending;
132 public SequenceI getAssociatedSequence()
134 return associatedSequence;
137 public void setAssociatedSequence(SequenceI associatedSequence)
139 this.associatedSequence = associatedSequence;
142 public boolean isAllowUnpublishedEntries()
144 return allowUnpublishedEntries;
147 public void setAllowUnpublishedEntries(boolean allowUnpublishedEntries)
149 this.allowUnpublishedEntries = allowUnpublishedEntries;
152 public boolean isFacet()
157 public void setFacet(boolean facet)
162 public String getFacetPivot()
167 public void setFacetPivot(String facetPivot)
169 this.facetPivot = facetPivot;
172 public int getFacetPivotMinCount()
174 return facetPivotMinCount;
177 public void setFacetPivotMinCount(int facetPivotMinCount)
179 this.facetPivotMinCount = facetPivotMinCount;
182 public int getOffSet()
187 public void setOffSet(int offSet)
189 this.offSet = offSet;