JAL-1667 updated test and internationalization messages
[jalview.git] / src / jalview / ws / uimodel / PDBRestRequest.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
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.
11  *  
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.
16  * 
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.
20  */
21
22 package jalview.ws.uimodel;
23
24
25 import jalview.ws.dbsources.PDBRestClient.PDBDocField;
26
27 import java.util.ArrayList;
28 import java.util.List;
29
30 /**
31  * Represents the PDB request to be consumed by the PDBRestClient
32  * 
33  * @author tcnofoegbu
34  *
35  */
36 public class PDBRestRequest
37 {
38   private String fieldToSearchBy;
39
40   private String searchTerm;
41
42   private String fieldToSortBy;
43
44   private String associatedSequence;
45
46   private boolean allowEmptySequence;
47
48   private int responseSize;
49
50   private boolean isSortAscending;
51
52   private List<PDBDocField> wantedFields = new ArrayList<PDBDocField>();
53
54   public String getFieldToSearchBy()
55   {
56     return fieldToSearchBy;
57   }
58
59   public void setFieldToSearchBy(String fieldToSearchBy)
60   {
61     this.fieldToSearchBy = fieldToSearchBy;
62   }
63
64   public String getSearchTerm()
65   {
66     return searchTerm;
67   }
68
69   public void setSearchTerm(String searchTerm)
70   {
71     this.searchTerm = searchTerm;
72   }
73
74   public boolean isAllowEmptySeq()
75   {
76     return allowEmptySequence;
77   }
78
79   public void setAllowEmptySeq(boolean allowEmptySeq)
80   {
81     this.allowEmptySequence = allowEmptySeq;
82   }
83
84   public int getResponseSize()
85   {
86     return responseSize;
87   }
88
89   public void setResponseSize(int responseSize)
90   {
91     this.responseSize = responseSize;
92   }
93
94   public List<PDBDocField> getWantedFields()
95   {
96     return wantedFields;
97   }
98
99   public void setWantedFields(List<PDBDocField> wantedFields)
100   {
101     this.wantedFields = wantedFields;
102   }
103
104   public String getFieldToSortBy()
105   {
106     return fieldToSortBy;
107   }
108
109   public void setFieldToSortBy(String fieldToSortBy, boolean isSortAscending)
110   {
111     this.fieldToSortBy = fieldToSortBy;
112     this.isSortAscending = isSortAscending;
113   }
114
115   public boolean isAscending()
116   {
117     return isSortAscending;
118   }
119
120   public String getAssociatedSequence()
121   {
122     return associatedSequence;
123   }
124
125   public void setAssociatedSequence(String associatedSequence)
126   {
127     this.associatedSequence = associatedSequence;
128   }
129
130 }