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