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.getDefault(
49 "ALLOW_UNPUBLISHED_PDB_QUERYING", false);
51 private boolean facet;
53 private String facetPivot;
55 private int facetPivotMinCount;
57 private int responseSize;
59 private boolean isSortAscending;
61 private Collection<FTSDataColumnI> wantedFields;
63 public String getFieldToSearchBy()
65 return fieldToSearchBy;
68 public void setFieldToSearchBy(String fieldToSearchBy)
70 this.fieldToSearchBy = fieldToSearchBy;
73 public String getSearchTerm()
78 public void setSearchTerm(String searchTerm)
80 this.searchTerm = searchTerm;
83 public boolean isAllowEmptySeq()
85 return allowEmptySequence;
88 public void setAllowEmptySeq(boolean allowEmptySeq)
90 this.allowEmptySequence = allowEmptySeq;
93 public int getResponseSize()
98 public void setResponseSize(int responseSize)
100 this.responseSize = responseSize;
103 public Collection<FTSDataColumnI> getWantedFields()
108 public void setWantedFields(
109 Collection<FTSDataColumnI> wantedFields)
111 this.wantedFields = wantedFields;
114 public String getFieldToSortBy()
116 return fieldToSortBy;
119 public void setFieldToSortBy(String fieldToSortBy, boolean isSortAscending)
121 this.fieldToSortBy = fieldToSortBy;
122 this.isSortAscending = isSortAscending;
125 public boolean isAscending()
127 return isSortAscending;
130 public SequenceI getAssociatedSequence()
132 return associatedSequence;
135 public void setAssociatedSequence(SequenceI associatedSequence)
137 this.associatedSequence = associatedSequence;
140 public boolean isAllowUnpublishedEntries()
142 return allowUnpublishedEntries;
145 public void setAllowUnpublishedEntries(boolean allowUnpublishedEntries)
147 this.allowUnpublishedEntries = allowUnpublishedEntries;
150 public boolean isFacet()
155 public void setFacet(boolean facet)
160 public String getFacetPivot()
165 public void setFacetPivot(String facetPivot)
167 this.facetPivot = facetPivot;
170 public int getFacetPivotMinCount()
172 return facetPivotMinCount;
175 public void setFacetPivotMinCount(int facetPivotMinCount)
177 this.facetPivotMinCount = facetPivotMinCount;