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;
27 import jalview.gui.Preferences;
29 import java.util.Collection;
32 * Represents the FTS request to be consumed by the FTSRestClient
37 public class FTSRestRequest
39 private String fieldToSearchBy;
41 private String searchTerm;
43 private String fieldToSortBy;
45 private SequenceI associatedSequence;
47 private boolean allowEmptySequence;
49 private boolean allowUnpublishedEntries = Cache
50 .getDefault(Preferences.ALLOW_UNPUBLISHED_PDB_QUERYING, false);
52 private boolean facet;
54 private String facetPivot;
56 private int facetPivotMinCount;
58 private int responseSize;
62 private boolean isSortAscending;
64 private Collection<FTSDataColumnI> wantedFields;
66 public String getFieldToSearchBy()
68 return fieldToSearchBy;
71 public void setFieldToSearchBy(String fieldToSearchBy)
73 this.fieldToSearchBy = fieldToSearchBy;
76 public String getSearchTerm()
81 public void setSearchTerm(String searchTerm)
83 this.searchTerm = searchTerm;
86 public boolean isAllowEmptySeq()
88 return allowEmptySequence;
91 public void setAllowEmptySeq(boolean allowEmptySeq)
93 this.allowEmptySequence = allowEmptySeq;
96 public int getResponseSize()
101 public void setResponseSize(int responseSize)
103 this.responseSize = responseSize;
106 public Collection<FTSDataColumnI> getWantedFields()
111 public void setWantedFields(Collection<FTSDataColumnI> wantedFields)
113 this.wantedFields = wantedFields;
116 public String getFieldToSortBy()
118 return fieldToSortBy;
121 public void setFieldToSortBy(String fieldToSortBy,
122 boolean isSortAscending)
124 this.fieldToSortBy = fieldToSortBy;
125 this.isSortAscending = isSortAscending;
128 public boolean isAscending()
130 return isSortAscending;
133 public SequenceI getAssociatedSequence()
135 return associatedSequence;
138 public void setAssociatedSequence(SequenceI associatedSequence)
140 this.associatedSequence = associatedSequence;
143 public boolean isAllowUnpublishedEntries()
145 return allowUnpublishedEntries;
148 public void setAllowUnpublishedEntries(boolean allowUnpublishedEntries)
150 this.allowUnpublishedEntries = allowUnpublishedEntries;
153 public boolean isFacet()
158 public void setFacet(boolean facet)
163 public String getFacetPivot()
168 public void setFacetPivot(String facetPivot)
170 this.facetPivot = facetPivot;
173 public int getFacetPivotMinCount()
175 return facetPivotMinCount;
178 public void setFacetPivotMinCount(int facetPivotMinCount)
180 this.facetPivotMinCount = facetPivotMinCount;
183 public int getOffSet()
188 public void setOffSet(int offSet)
190 this.offSet = offSet;