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