Revision 2773
Added by Duane Costa about 19 years ago
src/edu/ucsb/nceas/metacat/advancedsearch/AdvancedSearchBean.java | ||
---|---|---|
75 | 75 |
* @return Returns the creatorOrganization. |
76 | 76 |
*/ |
77 | 77 |
public String getCreatorOrganization() { |
78 |
return creatorOrganization; |
|
78 |
return creatorOrganization == null ? null : creatorOrganization.trim();
|
|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
|
... | ... | |
91 | 91 |
* @return Returns the creatorSurname. |
92 | 92 |
*/ |
93 | 93 |
public String getCreatorSurname() { |
94 |
return creatorSurname; |
|
94 |
return creatorSurname == null ? null : creatorSurname.trim();
|
|
95 | 95 |
} |
96 | 96 |
|
97 | 97 |
|
... | ... | |
107 | 107 |
* @return Returns the dateField. Possible values: "PUBLICATION", "COLLECTION" |
108 | 108 |
*/ |
109 | 109 |
public String getDateField() { |
110 |
return dateField; |
|
110 |
return dateField == null ? null : dateField.trim();
|
|
111 | 111 |
} |
112 | 112 |
|
113 | 113 |
|
... | ... | |
123 | 123 |
* @return Returns the endDate. |
124 | 124 |
*/ |
125 | 125 |
public String getEndDate() { |
126 |
return endDate; |
|
126 |
return endDate == null ? null : endDate.trim();
|
|
127 | 127 |
} |
128 | 128 |
|
129 | 129 |
|
... | ... | |
139 | 139 |
* @return Returns the locationName. |
140 | 140 |
*/ |
141 | 141 |
public String getLocationName() { |
142 |
return locationName; |
|
142 |
return locationName == null ? null : locationName.trim();
|
|
143 | 143 |
} |
144 | 144 |
|
145 | 145 |
|
... | ... | |
147 | 147 |
* @return Returns the namedTimescale. |
148 | 148 |
*/ |
149 | 149 |
public String getNamedTimescale() { |
150 |
return namedTimescale; |
|
150 |
return namedTimescale == null ? null : namedTimescale.trim();
|
|
151 | 151 |
} |
152 | 152 |
|
153 | 153 |
|
... | ... | |
187 | 187 |
* @return Returns the startDate. |
188 | 188 |
*/ |
189 | 189 |
public String getStartDate() { |
190 |
return startDate; |
|
190 |
return startDate == null ? null : startDate.trim();
|
|
191 | 191 |
} |
192 | 192 |
|
193 | 193 |
|
... | ... | |
221 | 221 |
* @return Returns the subjectValue. |
222 | 222 |
*/ |
223 | 223 |
public String getSubjectValue() { |
224 |
return subjectValue; |
|
224 |
return subjectValue == null ? null : subjectValue.trim();
|
|
225 | 225 |
} |
226 | 226 |
|
227 | 227 |
|
... | ... | |
229 | 229 |
* @return Returns the taxon. |
230 | 230 |
*/ |
231 | 231 |
public String getTaxon() { |
232 |
return taxon; |
|
232 |
return taxon == null ? null : taxon.trim();
|
|
233 | 233 |
} |
234 | 234 |
|
235 | 235 |
|
Also available in: Unified diff
Modify the bean's get() methods that return String values to trim white space off the string prior to returning it. This is so that input fields that contain only white space will not be treated as valid search values.