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;
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, boolean isSortAscending)
122 this.fieldToSortBy = fieldToSortBy;
123 this.isSortAscending = isSortAscending;
126 public boolean isAscending()
128 return isSortAscending;
131 public SequenceI getAssociatedSequence()
133 return associatedSequence;
136 public void setAssociatedSequence(SequenceI associatedSequence)
138 this.associatedSequence = associatedSequence;
141 public boolean isAllowUnpublishedEntries()
143 return allowUnpublishedEntries;
146 public void setAllowUnpublishedEntries(boolean allowUnpublishedEntries)
148 this.allowUnpublishedEntries = allowUnpublishedEntries;
151 public boolean isFacet()
156 public void setFacet(boolean facet)
161 public String getFacetPivot()
166 public void setFacetPivot(String facetPivot)
168 this.facetPivot = facetPivot;
171 public int getFacetPivotMinCount()
173 return facetPivotMinCount;
176 public void setFacetPivotMinCount(int facetPivotMinCount)
178 this.facetPivotMinCount = facetPivotMinCount;
181 public int getOffSet()
186 public void setOffSet(int offSet)
188 this.offSet = offSet;