1 package org.kuali.ole.describe.form;
2
3 import org.kuali.ole.describe.bo.*;
4 import org.kuali.ole.docstore.common.document.Bib;
5 import org.kuali.ole.docstore.common.document.Holdings;
6 import org.kuali.ole.docstore.common.document.Item;
7 import org.kuali.ole.docstore.common.document.content.enums.DocType;
8 import org.kuali.ole.docstore.common.search.*;
9 import org.kuali.rice.krad.web.form.UifFormBase;
10
11 import java.util.ArrayList;
12 import java.util.List;
13
14
15
16
17
18
19
20
21 public class OLESearchForm extends UifFormBase {
22 public boolean closeBtnShowFlag;
23 protected List<SearchCondition> searchConditions = new ArrayList<SearchCondition>();
24 private SearchParams searchParams;
25 private SearchResponse searchResponse;
26 private String docType;
27 private String searchType;
28 private int pageSize = 10;
29 private String browseField;
30 private String browseText;
31 private String location;
32 private String classificationScheme;
33 private String callNumberBrowseText;
34 private List<Holdings> holdingsList;
35 private List<Item> itemList;
36 private String requestXMLTextArea;
37 private int facetLimit;
38 private String searchTypeField;
39 private String showPageSize;
40 private String showFieldSort;
41 private boolean isMoreFacets = false;
42 private int start;
43 private String linkExistingInstance;
44 private String sortOrder;
45 private List<OleWorkItemDocument> workItemDocumentList;
46 private String sortField;
47 private String sortFlag;
48 private boolean nextFlag;
49 private boolean previousFlag;
50 private String message;
51 private String pageShowEntries;
52 private SearchResultDisplayFields searchResultDisplayFields;
53 private List<SearchResultDisplayRow> selectedFacet;
54 private List<SearchResultDisplayRow> searchResultDisplayRowList;
55 private List<FacetResultField> facetResultFields;
56 private boolean showRequestXml;
57 private String successMessage;
58 private String errorMessage;
59 private String tokenId;
60 private String holdingsFlag="false";
61 private String eHoldingsFlag="false";
62 private String holdings;
63 private List<SearchResultDisplayRow> bibSearchResultDisplayRowList;
64 private List<SearchResultDisplayRow> holdingSearchResultDisplayRowList;
65 private List<OleWorkBibDocument> workBibDocumentList;
66 private List<OleWorkHoldingsDocument> workHoldingsDocumentList;
67 private List<OleWorkEHoldingsDocument> workEHoldingsDocumentList;
68 private String linkToOrderOption;
69
70 private int totalRecordCount;
71 private String pageNumber;
72
73 private boolean showMoreFacetNext = false;
74 private boolean showMoreFacetPrevious = false;
75 private String facetPageEntries;
76 private String totalTime;
77 private String solrTime;
78 private String serverTime;
79 private boolean showTime = false;
80 private boolean selectAllRecords= false;
81 private String idsToBeOpened;
82
83 public String getIdsToBeOpened() {
84 return idsToBeOpened;
85 }
86
87 public void setIdsToBeOpened(String idsToBeOpened) {
88 this.idsToBeOpened = idsToBeOpened;
89 }
90
91 public boolean isSelectAllRecords() {
92 return selectAllRecords;
93 }
94
95 public void setSelectAllRecords(boolean selectAllRecords) {
96 this.selectAllRecords = selectAllRecords;
97 }
98
99 public OLESearchForm() {
100 searchResultDisplayFields = new SearchResultDisplayFields();
101 }
102
103 public List<SearchCondition> getSearchConditions() {
104 if (searchConditions == null) {
105 searchConditions = new ArrayList<SearchCondition>();
106 }
107 return this.searchConditions;
108 }
109
110
111 public String getHoldings() {
112 return holdings;
113 }
114
115 public void setHoldings(String holdings) {
116 this.holdings = holdings;
117 }
118
119 public List<OleWorkBibDocument> getWorkBibDocumentList() {
120 return workBibDocumentList;
121 }
122
123 public void setWorkBibDocumentList(List<OleWorkBibDocument> workBibDocumentList) {
124 this.workBibDocumentList = workBibDocumentList;
125 }
126
127 public List<OleWorkHoldingsDocument> getWorkHoldingsDocumentList() {
128 return workHoldingsDocumentList;
129 }
130
131 public List<OleWorkItemDocument> getWorkItemDocumentList() {
132 return workItemDocumentList;
133 }
134
135 public void setWorkItemDocumentList(List<OleWorkItemDocument> workItemDocumentList) {
136 this.workItemDocumentList = workItemDocumentList;
137 }
138
139 public void setWorkHoldingsDocumentList(List<OleWorkHoldingsDocument> workHoldingsDocumentList) {
140 this.workHoldingsDocumentList = workHoldingsDocumentList;
141 }
142
143 public List<OleWorkEHoldingsDocument> getWorkEHoldingsDocumentList() {
144 return workEHoldingsDocumentList;
145 }
146
147 public void setWorkEHoldingsDocumentList(List<OleWorkEHoldingsDocument> workEHoldingsDocumentList) {
148 this.workEHoldingsDocumentList = workEHoldingsDocumentList;
149 }
150
151 public String getHoldingsFlag() {
152 return holdingsFlag;
153 }
154
155 public void setHoldingsFlag(String holdingsFlag) {
156 this.holdingsFlag = holdingsFlag;
157 }
158
159 public String geteHoldingsFlag() {
160 return eHoldingsFlag;
161 }
162
163 public void seteHoldingsFlag(String eHoldingsFlag) {
164 this.eHoldingsFlag = eHoldingsFlag;
165 }
166
167
168 public String getTokenId() {
169 return tokenId;
170 }
171
172 public void setTokenId(String tokenId) {
173 this.tokenId = tokenId;
174 }
175
176 public String getMessage() {
177 return message;
178 }
179
180 public String getErrorMessage() {
181 return errorMessage;
182 }
183
184 public void setErrorMessage(String errorMessage) {
185 this.errorMessage = errorMessage;
186 }
187
188 public void setMessage(String message) {
189 this.message = message;
190 }
191
192 public String getSuccessMessage() {
193 return successMessage;
194 }
195
196 public String getLinkExistingInstance() {
197 return linkExistingInstance;
198 }
199
200 public void setLinkExistingInstance(String linkExistingInstance) {
201 this.linkExistingInstance = linkExistingInstance;
202 }
203
204 public List<SearchResultDisplayRow> getHoldingSearchResultDisplayRowList() {
205 return holdingSearchResultDisplayRowList;
206 }
207
208 public void setHoldingSearchResultDisplayRowList(List<SearchResultDisplayRow> holdingSearchResultDisplayRowList) {
209 this.holdingSearchResultDisplayRowList = holdingSearchResultDisplayRowList;
210 }
211
212 public List<SearchResultDisplayRow> getBibSearchResultDisplayRowList() {
213 return bibSearchResultDisplayRowList;
214 }
215
216 public void setBibSearchResultDisplayRowList(List<SearchResultDisplayRow> bibSearchResultDisplayRowList) {
217 this.bibSearchResultDisplayRowList = bibSearchResultDisplayRowList;
218 }
219
220 public void setSuccessMessage(String successMessage) {
221 this.successMessage = successMessage;
222 }
223
224 public void setShowFieldSort(String showFieldSort) {
225 this.showFieldSort = showFieldSort;
226 }
227
228 public List<Holdings> getHoldingsList() {
229 return holdingsList;
230 }
231
232 public void setHoldingsList(List<Holdings> holdingsList) {
233 this.holdingsList = holdingsList;
234 }
235
236 public List<Item> getItemList() {
237 return itemList;
238 }
239
240 public void setItemList(List<Item> itemList) {
241 this.itemList = itemList;
242 }
243
244 public boolean isCloseBtnShowFlag() {
245 return closeBtnShowFlag;
246 }
247
248 public void setCloseBtnShowFlag(boolean closeBtnShowFlag) {
249 this.closeBtnShowFlag = closeBtnShowFlag;
250 }
251
252 public int getPageSize() {
253 return pageSize;
254 }
255
256 public void setPageSize(int pageSize) {
257 this.pageSize = pageSize;
258 }
259
260 public String getPageNumber() {
261 return pageNumber;
262 }
263
264 public void setPageNumber(String pageNumber) {
265 this.pageNumber = pageNumber;
266 }
267
268 public int getTotalRecordCount() {
269 return totalRecordCount;
270 }
271
272 public void setTotalRecordCount(int totalRecordCount) {
273 this.totalRecordCount = totalRecordCount;
274 }
275
276 public int getFacetLimit() {
277 return facetLimit;
278 }
279
280 public void setFacetLimit(int facetLimit) {
281 this.facetLimit = facetLimit;
282 }
283
284 public String getSearchTypeField() {
285 return searchTypeField;
286 }
287
288 public void setSearchTypeField(String searchTypeField) {
289 this.searchTypeField = searchTypeField;
290 }
291
292 public SearchParams getSearchParams() {
293 return searchParams;
294 }
295
296 public void setSearchParams(SearchParams searchParams) {
297 this.searchParams = searchParams;
298 }
299
300 public SearchResponse getSearchResponse() {
301 return searchResponse;
302 }
303
304 public void setSearchResponse(SearchResponse searchResponse) {
305 this.searchResponse = searchResponse;
306 }
307
308 public int getStart() {
309 return start;
310 }
311
312 public void setStart(int start) {
313 this.start = start;
314 }
315
316 public String getSortOrder() {
317 return sortOrder;
318 }
319
320 public void setSortOrder(String sortOrder) {
321 this.sortOrder = sortOrder;
322 }
323
324 public String getSortField() {
325 return sortField;
326 }
327
328 public void setSortField(String sortField) {
329 this.sortField = sortField;
330 }
331
332 public String getSortFlag() {
333 return sortFlag;
334 }
335
336 public void setSortFlag(String sortFlag) {
337 this.sortFlag = sortFlag;
338 }
339
340 public boolean getNextFlag() {
341 return nextFlag;
342 }
343
344 public void setNextFlag(boolean nextFlag) {
345 this.nextFlag = nextFlag;
346 }
347
348 public boolean getPreviousFlag() {
349 return previousFlag;
350 }
351
352 public void setPreviousFlag(boolean previousFlag) {
353 this.previousFlag = previousFlag;
354 }
355
356 public String getPageShowEntries() {
357 return pageShowEntries;
358 }
359
360 public void setPageShowEntries(String pageShowEntries) {
361 this.pageShowEntries = pageShowEntries;
362 }
363
364 public String getDocType() {
365 return docType;
366 }
367
368 public void setDocType(String docType) {
369 if (docType != null && docType.contains(","))
370 this.docType = docType.substring(0, docType.indexOf(","));
371 else
372 this.docType = docType;
373
374 }
375
376 public boolean isFilterBibSearch() {
377 return !"bibliographic".equals(getDocType());
378 }
379
380 public boolean isFilterHoldingsSearch() {
381 return !"holdings".equals(getDocType());
382 }
383
384 public boolean isFilterEHoldingsSearch() {
385 return !"eHoldings".equals(getDocType());
386 }
387
388 public boolean isFilterItemSearch() {
389 return !"item".equals(getDocType());
390 }
391
392 public String getSearchType() {
393 return searchType;
394 }
395
396 public void setSearchType(String searchType) {
397 this.searchType = searchType;
398 }
399
400 public List<SearchResultDisplayRow> getSelectedFacet() {
401 return selectedFacet;
402 }
403
404 public void setSelectedFacet(List<SearchResultDisplayRow> selectedFacet) {
405 this.selectedFacet = selectedFacet;
406 }
407
408 public List<SearchResultDisplayRow> getSearchResultDisplayRowList() {
409 return searchResultDisplayRowList;
410 }
411
412 public void setSearchResultDisplayRowList(List<SearchResultDisplayRow> searchResultDisplayRowList) {
413 this.searchResultDisplayRowList = searchResultDisplayRowList;
414 }
415
416 public boolean isShowRequestXml() {
417 return showRequestXml;
418 }
419
420 public void setShowRequestXml(boolean showRequestXml) {
421 this.showRequestXml = showRequestXml;
422 }
423
424 public List<FacetResultField> getFacetResultFields() {
425 return facetResultFields;
426 }
427
428 public void setFacetResultFields(List<FacetResultField> facetResultFields) {
429 this.facetResultFields = facetResultFields;
430 }
431
432 public String getBrowseField() {
433 return browseField;
434 }
435
436 public void setBrowseField(String browseField) {
437 this.browseField = browseField;
438 }
439
440 public String getBrowseText() {
441 return browseText;
442 }
443
444 public void setBrowseText(String browseText) {
445 this.browseText = browseText;
446 }
447
448 public String getLocation() {
449 return location;
450 }
451
452 public void setLocation(String location) {
453 this.location = location;
454 }
455
456 public String getClassificationScheme() {
457 return classificationScheme;
458 }
459
460 public void setClassificationScheme(String classificationScheme) {
461 this.classificationScheme = classificationScheme;
462 }
463
464 public String getCallNumberBrowseText() {
465 return callNumberBrowseText;
466 }
467
468 public void setCallNumberBrowseText(String callNumberBrowseText) {
469 this.callNumberBrowseText = callNumberBrowseText;
470 }
471
472 public SearchResultDisplayFields getSearchResultDisplayFields() {
473 return searchResultDisplayFields;
474 }
475
476 public void setSearchResultDisplayFields(SearchResultDisplayFields searchResultDisplayFields) {
477 this.searchResultDisplayFields = searchResultDisplayFields;
478 }
479
480 public String getRequestXMLTextArea() {
481 return requestXMLTextArea;
482 }
483
484 public void setRequestXMLTextArea(String requestXMLTextArea) {
485 this.requestXMLTextArea = requestXMLTextArea;
486 }
487
488 public String getShowPageSize() {
489 return showPageSize;
490 }
491
492 public void setShowPageSize(String showPageSize) {
493 this.showPageSize = showPageSize;
494 }
495
496 public boolean isMoreFacets() {
497 return isMoreFacets;
498 }
499
500 public void setMoreFacets(boolean moreFacets) {
501 isMoreFacets = moreFacets;
502 }
503
504 public String getLinkToOrderOption() {
505 return linkToOrderOption;
506 }
507
508 public void setLinkToOrderOption(String linkToOrderOption) {
509 this.linkToOrderOption = linkToOrderOption;
510 }
511
512 public boolean isShowMoreFacetNext() {
513 return showMoreFacetNext;
514 }
515
516 public void setShowMoreFacetNext(boolean showMoreFacetNext) {
517 this.showMoreFacetNext = showMoreFacetNext;
518 }
519
520 public boolean isShowMoreFacetPrevious() {
521 return showMoreFacetPrevious;
522 }
523
524 public void setShowMoreFacetPrevious(boolean showMoreFacetPrevious) {
525 this.showMoreFacetPrevious = showMoreFacetPrevious;
526 }
527
528 public String getFacetPageEntries() {
529 return facetPageEntries;
530 }
531
532 public void setFacetPageEntries(String facetPageEntries) {
533 this.facetPageEntries = facetPageEntries;
534 }
535
536 public String getTotalTime() {
537 return totalTime;
538 }
539
540 public void setTotalTime(String totalTime) {
541 this.totalTime = totalTime;
542 }
543
544 public String getSolrTime() {
545 return solrTime;
546 }
547
548 public void setSolrTime(String solrTime) {
549 this.solrTime = solrTime;
550 }
551
552 public String getServerTime() {
553 return serverTime;
554 }
555
556 public void setServerTime(String serverTime) {
557 this.serverTime = serverTime;
558 }
559
560 public boolean isShowTime() {
561 return showTime;
562 }
563
564 public void setShowTime(boolean showTime) {
565 this.showTime = showTime;
566 }
567 }