001package org.kuali.ole.describe.bo;
002
003import org.kuali.ole.docstore.common.document.config.DocFieldConfig;
004import org.kuali.ole.docstore.common.document.config.DocFormatConfig;
005import org.kuali.ole.docstore.common.document.config.DocTypeConfig;
006import org.kuali.ole.docstore.common.document.content.enums.DocFormat;
007import org.kuali.ole.docstore.common.document.content.enums.DocType;
008
009import java.util.List;
010
011/**
012 * Created with IntelliJ IDEA.
013 * User: srirams
014 * Date: 3/15/14
015 * Time: 3:30 PM
016 * To change this template use File | Settings | File Templates.
017 */
018public class SearchResultDisplayFields {
019
020    private boolean localId = false;
021    private boolean title = false;
022    private boolean journalTitle = false;
023    private boolean author = false;
024    private boolean publisher = false;
025    private boolean isbn = false;
026    private boolean issn = false;
027    private boolean subject = false;
028    private boolean publicationPlace = false;
029    private boolean edition = false;
030    private boolean format = false;
031    private boolean formGenre = false;
032    private boolean language = false;
033    private boolean description = false;
034    private boolean publicationDate = false;
035    private boolean resourceType = false;
036    private boolean carrier = false;
037
038    private boolean location = false;
039    private boolean callNumber = false;
040    private boolean callNumberPrefix = false;
041    private boolean classificationPart = false;
042    private boolean shelvingOrder = false;
043    private boolean shelvingOrderCode = false;
044    private boolean shelvingSchemeCode = false;
045    private boolean shelvingSchemeValue = false;
046    private boolean uri = false;
047    private boolean receiptStatus = false;
048    private boolean copyNumber = false;
049    private boolean copyNumberLabel = false;
050    private boolean itemPart = false;
051    private boolean locationLevel = false;
052    private boolean locationLevelName = false;
053    private boolean itemIdentifier = false;
054    private boolean vendorLineItemIdentifier = false;
055
056    private boolean barcode = false;
057    private boolean barcodeArsl = false;
058    private boolean volumeNumber = false;
059    private boolean volumeNumberLabel = false;
060    private boolean enumeration = false;
061    private boolean chronology = false;
062    private boolean itemStatus = false;
063    private boolean itemTypeCodeValue = false;
064    private boolean itemTypeFullValue = false;
065
066    private boolean accessStatus = false;
067    private boolean platform = false;
068    private boolean imprint = false;
069    private boolean statisticalCode = false;
070    private boolean holdingsNote = false;
071    private boolean coverageDate = false;
072    private boolean perpetualAccess = false;
073    private boolean publicNote = false;
074    private boolean url = false;
075    private boolean numberOfSimultaneousUses =false;
076    private boolean persistLink =false;
077    private boolean accessLocation =false;
078    private boolean adminUserName =false;
079    private boolean accessUserName =false;
080    private boolean accessPassword =false;
081    private boolean adminUrl =false;
082    private boolean authentication =false;
083    private boolean proxied =false;
084    private boolean ill =false;
085    private boolean subscription =false;
086    private boolean linkText =false;
087    private boolean adminPassword =false;
088    private boolean donorPublic =false;
089    private boolean donorNote =false;
090    private boolean donorCode =false;
091    private boolean extentOfOwnershipNoteType = false;
092    private boolean extentOfOwnershipNoteValue = false;
093    private boolean extentOfOwnershipType = false;
094    private boolean holdingsLocation = false;
095    private boolean holdingsCallNumber = false;
096
097    private String sortFieldString = "";
098
099    public SearchResultDisplayFields() {
100    }
101
102    public boolean isLocalId() {
103        return localId;
104    }
105
106    public void setLocalId(boolean localId) {
107        this.localId = localId;
108    }
109
110    public boolean isTitle() {
111        return title;
112    }
113
114    public void setTitle(boolean title) {
115        this.title = title;
116    }
117
118    public boolean isJournalTitle() {
119        return journalTitle;
120    }
121
122    public void setJournalTitle(boolean journalTitle) {
123        this.journalTitle = journalTitle;
124    }
125
126    public boolean isAuthor() {
127        return author;
128    }
129
130    public void setAuthor(boolean author) {
131        this.author = author;
132    }
133
134    public boolean isPublisher() {
135        return publisher;
136    }
137
138    public void setPublisher(boolean publisher) {
139        this.publisher = publisher;
140    }
141
142    public boolean isIsbn() {
143        return isbn;
144    }
145
146    public void setIsbn(boolean isbn) {
147        this.isbn = isbn;
148    }
149
150    public boolean isIssn() {
151        return issn;
152    }
153
154    public void setIssn(boolean issn) {
155        this.issn = issn;
156    }
157
158    public boolean isSubject() {
159        return subject;
160    }
161
162    public void setSubject(boolean subject) {
163        this.subject = subject;
164    }
165
166    public boolean isPublicationPlace() {
167        return publicationPlace;
168    }
169
170    public void setPublicationPlace(boolean publicationPlace) {
171        this.publicationPlace = publicationPlace;
172    }
173
174    public boolean isEdition() {
175        return edition;
176    }
177
178    public void setEdition(boolean edition) {
179        this.edition = edition;
180    }
181
182    public boolean isFormat() {
183        return format;
184    }
185
186    public void setFormat(boolean format) {
187        this.format = format;
188    }
189
190    public boolean isFormGenre() {
191        return formGenre;
192    }
193
194    public void setFormGenre(boolean formGenre) {
195        this.formGenre = formGenre;
196    }
197
198    public boolean isLanguage() {
199        return language;
200    }
201
202    public void setLanguage(boolean language) {
203        this.language = language;
204    }
205
206    public boolean isDescription() {
207        return description;
208    }
209
210    public void setDescription(boolean description) {
211        this.description = description;
212    }
213
214    public boolean isPublicationDate() {
215        return publicationDate;
216    }
217
218    public void setPublicationDate(boolean publicationDate) {
219        this.publicationDate = publicationDate;
220    }
221
222    public boolean isLocation() {
223        return location;
224    }
225
226    public void setLocation(boolean location) {
227        this.location = location;
228    }
229
230    public boolean isCallNumber() {
231        return callNumber;
232    }
233
234    public void setCallNumber(boolean callNumber) {
235        this.callNumber = callNumber;
236    }
237
238    public boolean isCallNumberPrefix() {
239        return callNumberPrefix;
240    }
241
242    public void setCallNumberPrefix(boolean callNumberPrefix) {
243        this.callNumberPrefix = callNumberPrefix;
244    }
245
246    public boolean isClassificationPart() {
247        return classificationPart;
248    }
249
250    public void setClassificationPart(boolean classificationPart) {
251        this.classificationPart = classificationPart;
252    }
253
254    public boolean isShelvingOrder() {
255        return shelvingOrder;
256    }
257
258    public void setShelvingOrder(boolean shelvingOrder) {
259        this.shelvingOrder = shelvingOrder;
260    }
261
262    public boolean isUri() {
263        return uri;
264    }
265
266    public void setUri(boolean uri) {
267        this.uri = uri;
268    }
269
270    public boolean isReceiptStatus() {
271        return receiptStatus;
272    }
273
274    public void setReceiptStatus(boolean receiptStatus) {
275        this.receiptStatus = receiptStatus;
276    }
277
278    public boolean isBarcode() {
279        return barcode;
280    }
281
282    public void setBarcode(boolean barcode) {
283        this.barcode = barcode;
284    }
285
286    public boolean isVolumeNumber() {
287        return volumeNumber;
288    }
289
290    public void setVolumeNumber(boolean volumeNumber) {
291        this.volumeNumber = volumeNumber;
292    }
293
294    public boolean isEnumeration() {
295        return enumeration;
296    }
297
298    public void setEnumeration(boolean enumeration) {
299        this.enumeration = enumeration;
300    }
301
302    public boolean isChronology() {
303        return chronology;
304    }
305
306    public void setChronology(boolean chronology) {
307        this.chronology = chronology;
308    }
309
310    public boolean isAccessStatus() {
311        return accessStatus;
312    }
313
314    public void setAccessStatus(boolean accessStatus) {
315        this.accessStatus = accessStatus;
316    }
317
318    public boolean isPlatform() {
319        return platform;
320    }
321
322    public void setPlatform(boolean platform) {
323        this.platform = platform;
324    }
325
326    public boolean isImprint() {
327        return imprint;
328    }
329
330    public void setImprint(boolean imprint) {
331        this.imprint = imprint;
332    }
333
334    public boolean isStatisticalCode() {
335        return statisticalCode;
336    }
337
338    public void setStatisticalCode(boolean statisticalCode) {
339        this.statisticalCode = statisticalCode;
340    }
341
342    public boolean isItemStatus() {
343        return itemStatus;
344    }
345
346    public void setItemStatus(boolean itemStatus) {
347        this.itemStatus = itemStatus;
348    }
349
350    public boolean isCopyNumber() {
351        return copyNumber;
352    }
353
354    public void setCopyNumber(boolean copyNumber) {
355        this.copyNumber = copyNumber;
356    }
357
358    public boolean isItemPart() {
359        return itemPart;
360    }
361
362    public void setItemPart(boolean itemPart) {
363        this.itemPart = itemPart;
364    }
365
366    public boolean isLocationLevel() {
367        return locationLevel;
368    }
369
370    public void setLocationLevel(boolean locationLevel) {
371        this.locationLevel = locationLevel;
372    }
373
374    public boolean isLocationLevelName() {
375        return locationLevelName;
376    }
377
378    public void setLocationLevelName(boolean locationLevelName) {
379        this.locationLevelName = locationLevelName;
380    }
381
382    public boolean isShelvingOrderCode() {
383        return shelvingOrderCode;
384    }
385
386    public void setShelvingOrderCode(boolean shelvingOrderCode) {
387        this.shelvingOrderCode = shelvingOrderCode;
388    }
389
390    public boolean isShelvingSchemeCode() {
391        return shelvingSchemeCode;
392    }
393
394    public void setShelvingSchemeCode(boolean shelvingSchemeCode) {
395        this.shelvingSchemeCode = shelvingSchemeCode;
396    }
397
398
399    public boolean isShelvingSchemeValue() {
400        return shelvingSchemeValue;
401    }
402
403    public void setShelvingSchemeValue(boolean shelvingSchemeValue) {
404        this.shelvingSchemeValue = shelvingSchemeValue;
405    }
406
407    public boolean isHoldingsNote() {
408        return holdingsNote;
409    }
410
411    public void setHoldingsNote(boolean holdingsNote) {
412        this.holdingsNote = holdingsNote;
413    }
414
415    public boolean isCopyNumberLabel() {
416        return copyNumberLabel;
417    }
418
419    public void setCopyNumberLabel(boolean copyNumberLabel) {
420        this.copyNumberLabel = copyNumberLabel;
421    }
422
423    public boolean isItemIdentifier() {
424        return itemIdentifier;
425    }
426
427    public void setItemIdentifier(boolean itemIdentifier) {
428        this.itemIdentifier = itemIdentifier;
429    }
430
431    public boolean isVendorLineItemIdentifier() {
432        return vendorLineItemIdentifier;
433    }
434
435    public void setVendorLineItemIdentifier(boolean vendorLineItemIdentifier) {
436        this.vendorLineItemIdentifier = vendorLineItemIdentifier;
437    }
438
439    public boolean isBarcodeArsl() {
440        return barcodeArsl;
441    }
442
443    public void setBarcodeArsl(boolean barcodeArsl) {
444        this.barcodeArsl = barcodeArsl;
445    }
446
447    public boolean isVolumeNumberLabel() {
448        return volumeNumberLabel;
449    }
450
451    public void setVolumeNumberLabel(boolean volumeNumberLabel) {
452        this.volumeNumberLabel = volumeNumberLabel;
453    }
454
455    public boolean isItemTypeCodeValue() {
456        return itemTypeCodeValue;
457    }
458
459    public void setItemTypeCodeValue(boolean itemTypeCodeValue) {
460        this.itemTypeCodeValue = itemTypeCodeValue;
461    }
462
463    public boolean isItemTypeFullValue() {
464        return itemTypeFullValue;
465    }
466
467    public void setItemTypeFullValue(boolean itemTypeFullValue) {
468        this.itemTypeFullValue = itemTypeFullValue;
469    }
470
471    public boolean isNumberOfSimultaneousUses() {
472        return numberOfSimultaneousUses;
473    }
474
475    public void setNumberOfSimultaneousUses(boolean numberOfSimultaneousUses) {
476        this.numberOfSimultaneousUses = numberOfSimultaneousUses;
477    }
478
479    public boolean isPersistLink() {
480        return persistLink;
481    }
482
483    public void setPersistLink(boolean persistLink) {
484        this.persistLink = persistLink;
485    }
486
487    public boolean isAccessLocation() {
488        return accessLocation;
489    }
490
491    public void setAccessLocation(boolean accessLocation) {
492        this.accessLocation = accessLocation;
493    }
494
495    public boolean isAdminUserName() {
496        return adminUserName;
497    }
498
499    public void setAdminUserName(boolean adminUserName) {
500        this.adminUserName = adminUserName;
501    }
502
503    public boolean isAccessUserName() {
504        return accessUserName;
505    }
506
507    public void setAccessUserName(boolean accessUserName) {
508        this.accessUserName = accessUserName;
509    }
510
511    public boolean isAccessPassword() {
512        return accessPassword;
513    }
514
515    public void setAccessPassword(boolean accessPassword) {
516        this.accessPassword = accessPassword;
517    }
518
519    public boolean isAdminUrl() {
520        return adminUrl;
521    }
522
523    public void setAdminurl(boolean adminUrl) {
524        this.adminUrl = adminUrl;
525    }
526
527    public boolean isAuthentication() {
528        return authentication;
529    }
530
531    public void setAuthentication(boolean authentication) {
532        this.authentication = authentication;
533    }
534
535    public boolean isProxied() {
536        return proxied;
537    }
538
539    public void setProxied(boolean proxied) {
540        this.proxied = proxied;
541    }
542
543    public boolean isIll() {
544        return ill;
545    }
546
547    public void setIll(boolean ill) {
548        this.ill = ill;
549    }
550
551    public boolean isSubscription() {
552        return subscription;
553    }
554
555    public void setSubscription(boolean subscription) {
556        this.subscription = subscription;
557    }
558
559    public boolean isLinkText() {
560        return linkText;
561    }
562
563    public void setLinkText(boolean linkText) {
564        this.linkText = linkText;
565    }
566
567    public boolean isAdminPassword() {
568        return adminPassword;
569    }
570
571    public void setAdminPassword(boolean adminPassword) {
572        this.adminPassword = adminPassword;
573    }
574
575    public boolean isDonorPublic() {
576        return donorPublic;
577    }
578
579    public void setDonorPublic(boolean donorPublic) {
580        this.donorPublic = donorPublic;
581    }
582
583    public boolean isDonorNote() {
584        return donorNote;
585    }
586
587    public void setDonorNote(boolean donorNote) {
588        this.donorNote = donorNote;
589    }
590
591    public boolean isDonorCode() {
592        return donorCode;
593    }
594
595    public void setDonorCode(boolean donorCode) {
596        this.donorCode = donorCode;
597    }
598
599    public boolean isCoverageDate() {
600        return coverageDate;
601    }
602
603    public void setCoverageDate(boolean coverageDate) {
604        this.coverageDate = coverageDate;
605    }
606
607    public boolean isPerpetualAccess() {
608        return perpetualAccess;
609    }
610
611    public void setPerpetualAccess(boolean perpetualAccess) {
612        this.perpetualAccess = perpetualAccess;
613    }
614
615    public boolean isPublicNote() {
616        return publicNote;
617    }
618
619    public void setPublicNote(boolean publicNote) {
620        this.publicNote = publicNote;
621    }
622
623    public boolean isUrl() {
624        return url;
625    }
626
627    public void setUrl(boolean url) {
628        this.url = url;
629    }
630
631    public boolean isExtentOfOwnershipNoteType() {
632        return extentOfOwnershipNoteType;
633    }
634
635    public void setExtentOfOwnershipNoteType(boolean extentOfOwnershipNoteType) {
636        this.extentOfOwnershipNoteType = extentOfOwnershipNoteType;
637    }
638
639    public boolean isExtentOfOwnershipNoteValue() {
640        return extentOfOwnershipNoteValue;
641    }
642
643    public void setExtentOfOwnershipNoteValue(boolean extentOfOwnershipNoteValue) {
644        this.extentOfOwnershipNoteValue = extentOfOwnershipNoteValue;
645    }
646
647    public boolean isExtentOfOwnershipType() {
648        return extentOfOwnershipType;
649    }
650
651    public void setExtentOfOwnershipType(boolean extentOfOwnershipType) {
652        this.extentOfOwnershipType = extentOfOwnershipType;
653    }
654
655    public String getSortFieldString() {
656        return sortFieldString;
657    }
658
659    public void setSortFieldString(String sortFieldString) {
660        this.sortFieldString = sortFieldString;
661    }
662
663    public boolean isHoldingsLocation() {
664        return holdingsLocation;
665    }
666
667    public void setHoldingsLocation(boolean holdingsLocation) {
668        this.holdingsLocation = holdingsLocation;
669    }
670
671    public boolean isHoldingsCallNumber() {
672        return holdingsCallNumber;
673    }
674
675    public void setHoldingsCallNumber(boolean holdingsCallNumber) {
676        this.holdingsCallNumber = holdingsCallNumber;
677    }
678
679    public boolean isResourceType() {
680        return resourceType;
681    }
682
683    public void setResourceType(boolean resourceType) {
684        this.resourceType = resourceType;
685    }
686
687    public boolean isCarrier() {
688        return carrier;
689    }
690
691    public void setCarrier(boolean carrier) {
692        this.carrier = carrier;
693    }
694
695    public void buildSearchResultDisplayFields(List<DocTypeConfig> docTypeConfigs, String docType) {
696        StringBuffer boSortFieldForUI= new StringBuffer("{'bSortable':false, 'sWidth':'1%'},");
697        for (DocTypeConfig docTypeConfig : docTypeConfigs) {
698            if (docTypeConfig.getName().equals(docType)) {
699                for (DocFormatConfig docFormatConfig : docTypeConfig.getDocFormatConfigList()) {
700                    if (docFormatConfig.getDocTypeId().equals(docTypeConfig.getId())) {
701                        for (DocFieldConfig docFieldConfig : docFormatConfig.getDocFieldConfigList()) {
702                            if (docFieldConfig.isDisplayable() && docFieldConfig.getName().endsWith("_display") || ((docFormatConfig.getName().equalsIgnoreCase(DocFormat.MARC.getCode()) || docFormatConfig.getName().equalsIgnoreCase(DocFormat.OLEML.getCode())) && docFieldConfig.getName().equalsIgnoreCase("Title_display"))) {
703                                // Condition : If a field is displayable or if it is a title field of marc or oleml doc format. Renders title column for all doc types as default, independent of displayable flag.
704                                boolean boSortFlag = false;
705
706                                if(DocType.BIB.getCode().equalsIgnoreCase(docType)){
707                                    if (docFieldConfig.getName().equalsIgnoreCase("LocalId_display")) {
708                                        setLocalId(true);
709                                        boSortFieldForUI.insert(35,"{'sType':'numeric','bSortable':true, 'sWidth':'5%'},");
710                                    }
711                                    else if (docFieldConfig.getName().equalsIgnoreCase("Author_display")) {
712                                        setAuthor(true);
713                                        boSortFlag = true;
714                                    }
715                                    else if (docFieldConfig.getName().equalsIgnoreCase("Title_display")) {
716                                        setTitle(true);
717                                        boSortFlag = true;
718                                    }
719                                    else if (docFieldConfig.getName().equalsIgnoreCase("JournalTitle_display")) {
720                                        setJournalTitle(true);
721                                        boSortFieldForUI.append("{'bSortable':true, 'sWidth':'1%'},");
722                                        boSortFlag = false;
723                                    }
724                                    else if (docFieldConfig.getName().equalsIgnoreCase("Publisher_display")) {
725                                        setPublisher(true);
726                                        boSortFlag = true;
727                                    }
728                                    else if (docFieldConfig.getName().equalsIgnoreCase("Isbn_display")) {
729                                        setIsbn(true);
730                                        boSortFlag = true;
731                                    }
732                                    else if (docFieldConfig.getName().equalsIgnoreCase("Issn_display")) {
733                                        setIssn(true);
734                                        boSortFlag = true;
735                                    }
736                                    else if (docFieldConfig.getName().equalsIgnoreCase("Subject_display")) {
737                                        setSubject(true);
738                                        boSortFlag = true;
739                                    }
740                                    else if (docFieldConfig.getName().equalsIgnoreCase("PublicationPlace_display")) {
741                                        setPublicationPlace(true);
742                                        boSortFlag = true;
743                                    }
744                                    else if (docFieldConfig.getName().equalsIgnoreCase("Edition_display")) {
745                                        setEdition(true);
746                                        boSortFlag = true;
747                                    }
748                                    else if (docFieldConfig.getName().equalsIgnoreCase("Format_display")) {
749                                        setFormat(true);
750                                        boSortFlag = true;
751                                    }
752                                    else if (docFieldConfig.getName().equalsIgnoreCase("FormGenre_display")) {
753                                        setFormGenre(true);
754                                        boSortFlag = true;
755                                    }
756                                    else if (docFieldConfig.getName().equalsIgnoreCase("Language_display")) {
757                                        setLanguage(true);
758                                        boSortFlag = true;
759                                    }
760                                    else if (docFieldConfig.getName().equalsIgnoreCase("Description_display")) {
761                                        setDescription(true);
762                                        boSortFlag = true;
763                                    }
764                                    else if (docFieldConfig.getName().equalsIgnoreCase("PublicationDate_display")) {
765                                        setPublicationDate(true);
766                                        boSortFlag = true;
767                                    }
768                                    else if (docFieldConfig.getName().equalsIgnoreCase("ResourceType_display")) {
769                                        setResourceType(true);
770                                        boSortFlag = true;
771                                    }
772                                    else if (docFieldConfig.getName().equalsIgnoreCase("Carrier_display")) {
773                                        setCarrier(true);
774                                        boSortFlag = true;
775                                    }
776                                }
777                                else {
778
779                                    if (docFieldConfig.getName().equalsIgnoreCase("LocalId_display")) {
780                                        setLocalId(true);
781                                        boSortFieldForUI.insert(35,"{'sType':'numeric','bSortable':true, 'sWidth':'5%'},\n");
782                                    }
783                                    else if (docFieldConfig.getName().equalsIgnoreCase("Title_display")) {
784                                        setTitle(true);
785                                        boSortFlag = true;
786                                    }
787                                    else if (docFieldConfig.getName().equalsIgnoreCase("Location_display")) {
788                                        setLocation(true);
789                                        boSortFlag = true;
790                                    }
791                                    else if (docFieldConfig.getName().equalsIgnoreCase("Location_display")) {
792                                        setLocation(true);
793                                        boSortFlag = true;
794                                    }
795                                    else if (docFieldConfig.getName().equalsIgnoreCase("CallNumber_display")) {
796                                        setCallNumber(true);
797                                        boSortFlag = true;
798                                    }
799                                    else if (docFieldConfig.getName().equalsIgnoreCase("CallNumberPrefix_display")) {
800                                        setCallNumberPrefix(true);
801                                        boSortFlag = true;
802                                    }
803                                    else if (docFieldConfig.getName().equalsIgnoreCase("ClassificationPart_display")) {
804                                        setClassificationPart(true);
805                                        boSortFlag = true;
806                                    }
807                                    else if (docFieldConfig.getName().equalsIgnoreCase("ShelvingOrder_display")) {
808                                        setShelvingOrder(true);
809                                        boSortFlag = true;
810                                    }
811                                    else if (docFieldConfig.getName().equalsIgnoreCase("ShelvingOrderCode_display")) {
812                                        setShelvingOrderCode(true);
813                                        boSortFlag = true;
814                                    }
815                                    else if (docFieldConfig.getName().equalsIgnoreCase("Uri_display")) {
816                                        setUri(true);
817                                        boSortFlag = true;
818                                    }
819                                    else if (docFieldConfig.getName().equalsIgnoreCase("ReceiptStatus_display")) {
820                                        setReceiptStatus(true);
821                                        boSortFlag = true;
822                                    }
823                                    else if (docFieldConfig.getName().equalsIgnoreCase("CopyNumber_display")) {
824                                        setCopyNumber(true);
825                                        boSortFlag = true;
826                                    }
827                                    else if (docFieldConfig.getName().equalsIgnoreCase("CopyNumberLabel_display")) {
828                                        setCopyNumberLabel(true);
829                                        boSortFlag = true;
830                                    }
831                                    else if (docFieldConfig.getName().equalsIgnoreCase("HoldingsNote_display")) {
832                                        setHoldingsNote(true);
833                                        boSortFlag = true;
834                                    }
835
836                                    else if (docFieldConfig.getName().equalsIgnoreCase("ItemStatus_display")) {
837                                        setItemStatus(true);
838                                        boSortFlag = true;
839                                    }
840                                    else if (docFieldConfig.getName().equalsIgnoreCase("Barcode_display")) {
841                                        setBarcode(true);
842                                        boSortFlag = true;
843                                    }
844                                    else if (docFieldConfig.getName().equalsIgnoreCase("ItemBarcode_display")) {
845                                        setBarcode(true);
846                                        boSortFlag = true;
847                                    }
848                                    else if (docFieldConfig.getName().equalsIgnoreCase("BarcodeARSL_display")) {
849                                        setBarcode(true);
850                                        boSortFlag = true;
851                                    }
852
853                                    else if (docFieldConfig.getName().equalsIgnoreCase("VolumeNumber_display")) {
854                                        setVolumeNumber(true);
855                                        boSortFlag = true;
856                                    }
857                                    else if (docFieldConfig.getName().equalsIgnoreCase("VolumeNumberLabel_display")) {
858                                        setVolumeNumberLabel(true);
859                                        boSortFlag = true;
860                                    }
861                                    else if (docFieldConfig.getName().equalsIgnoreCase("Enumeration_display")) {
862                                        setEnumeration(true);
863                                        boSortFlag = true;
864                                    }
865                                    else if (docFieldConfig.getName().equalsIgnoreCase("Chronology_display")) {
866                                        setChronology(true);
867                                        boSortFlag = true;
868                                    }
869                                    else if (docFieldConfig.getName().equalsIgnoreCase("AccessStatus_display")) {
870                                        setAccessStatus(true);
871                                        boSortFlag = true;
872                                    }
873                                    else if (docFieldConfig.getName().equalsIgnoreCase("Platform_display")) {
874                                        setPlatform(true);
875                                        boSortFlag = true;
876                                    }
877                                    else if (docFieldConfig.getName().equalsIgnoreCase("Imprint_display")) {
878                                        setImprint(true);
879                                        boSortFlag = true;
880                                    }
881                                    else if (docFieldConfig.getName().equalsIgnoreCase("StatisticalSearchingCodeValue_display")) {
882                                        setStatisticalCode(true);
883                                        boSortFlag = true;
884                                    }
885                                    else if (docFieldConfig.getName().equalsIgnoreCase("ItemPart_display")) {
886                                        setItemPart(true);
887                                        boSortFlag = true;
888                                    }
889                                    else if (docFieldConfig.getName().equalsIgnoreCase("Location_display")) {
890                                        setLocationLevel(true);
891                                        boSortFlag = true;
892                                    }
893                                    else if (docFieldConfig.getName().equalsIgnoreCase("LocationLevelName_display")) {
894                                        setLocationLevelName(true);
895                                        boSortFlag = true;
896                                    }
897                                    else if (docFieldConfig.getName().equalsIgnoreCase("ShelvingSchemeCode_display")) {
898                                        setShelvingSchemeCode(true);
899                                        boSortFlag = true;
900                                    }
901                                    else if (docFieldConfig.getName().equalsIgnoreCase("ShelvingSchemeValue_display")) {
902                                        setShelvingSchemeValue(true);
903                                        boSortFlag = true;
904                                    }
905                                    else if (docFieldConfig.getName().equalsIgnoreCase("ItemTypeCodeValue_display")) {
906                                        setItemTypeCodeValue(true);
907                                        boSortFlag = true;
908                                    }
909                                    else if (docFieldConfig.getName().equalsIgnoreCase("ItemTypeFullValue_display")) {
910                                        setItemTypeFullValue(true);
911                                        boSortFlag = true;
912                                    }
913                                    else if (docFieldConfig.getName().equalsIgnoreCase("ItemIdentifier_display")) {
914                                        setItemIdentifier(true);
915                                        boSortFlag = true;
916                                    }
917                                    else if (docFieldConfig.getName().equalsIgnoreCase("ExtentOfOwnership_Note_Type_display")) {
918                                        setExtentOfOwnershipNoteType(true);
919                                        boSortFlag = true;
920                                    }
921                                    else if (docFieldConfig.getName().equalsIgnoreCase("ExtentOfOwnership_Note_Value_display")) {
922                                        setExtentOfOwnershipNoteValue(true);
923                                        boSortFlag = true;
924                                    }
925                                    else if (docFieldConfig.getName().equalsIgnoreCase("ExtentOfOwnership_Type_display")) {
926                                        setExtentOfOwnershipType(true);
927                                        boSortFlag = true;
928                                    }
929
930                                    else if (docFieldConfig.getName().equalsIgnoreCase("NumberOfSimultaneousUses_display")) {
931                                        setNumberOfSimultaneousUses(true);
932                                        boSortFlag = true;
933                                    }
934                                    else if (docFieldConfig.getName().equalsIgnoreCase("Persist_Link_display")) {
935                                        setPersistLink(true);
936                                        boSortFlag = true;
937                                    }
938                                    else if (docFieldConfig.getName().equalsIgnoreCase("AccessLocation_display")) {
939                                        setAccessLocation(true);
940                                        boSortFlag = true;
941                                    }
942                                    else if (docFieldConfig.getName().equalsIgnoreCase("Admin_UserName_display")) {
943                                        setAdminUserName(true);
944                                        boSortFlag = true;
945                                    }
946                                    else if (docFieldConfig.getName().equalsIgnoreCase("Access_UserName_display")) {
947                                        setAccessUserName(true);
948                                        boSortFlag = true;
949                                    }
950                                    else if (docFieldConfig.getName().equalsIgnoreCase("Access_Password_display")) {
951                                        setAccessPassword(true);
952                                        boSortFlag = true;
953                                    }
954                                    else if (docFieldConfig.getName().equalsIgnoreCase("Admin_url_display")) {
955                                        setAdminurl(true);
956                                        boSortFlag = true;
957                                    }
958                                    else if (docFieldConfig.getName().equalsIgnoreCase("Authentication_display")) {
959                                        setAuthentication(true);
960                                        boSortFlag = true;
961                                    }
962                                    else if (docFieldConfig.getName().equalsIgnoreCase("Proxied_display")) {
963                                        setProxied(true);
964                                        boSortFlag = true;
965                                    }
966                                    else if (docFieldConfig.getName().equalsIgnoreCase("ILL_display")) {
967                                        setIll(true);
968                                        boSortFlag = true;
969                                    }
970                                    else if (docFieldConfig.getName().equalsIgnoreCase("HoldingsNote_display")) {
971                                        setHoldingsNote(true);
972                                        boSortFlag = true;
973                                    }
974                                    else if (docFieldConfig.getName().equalsIgnoreCase("Subscription_display")) {
975                                        setSubscription(true);
976                                        boSortFlag = true;
977                                    }
978                                    else if (docFieldConfig.getName().equalsIgnoreCase("Link_Text_display")) {
979                                        setLinkText(true);
980                                        boSortFlag = true;
981                                    }
982                                    else if (docFieldConfig.getName().equalsIgnoreCase("Admin_Password_display")) {
983                                        setAdminPassword(true);
984                                        boSortFlag = true;
985                                    }
986                                    else if (docFieldConfig.getName().equalsIgnoreCase("DonorPublic_display")) {
987                                        setDonorPublic(true);
988                                        boSortFlag = true;
989                                    }
990                                    else if (docFieldConfig.getName().equalsIgnoreCase("DonorNote_display")) {
991                                        setDonorNote(true);
992                                        boSortFlag = true;
993                                    }
994                                    else if (docFieldConfig.getName().equalsIgnoreCase("DonorCode_display")) {
995                                        setDonorCode(true);
996                                        boSortFlag = true;
997                                    }
998
999                                    else if (docFieldConfig.getName().equalsIgnoreCase("CoverageDate_display")) {
1000                                        setCoverageDate(true);
1001                                        boSortFlag = true;
1002                                    }
1003                                    else if (docFieldConfig.getName().equalsIgnoreCase("PerpetualAccess_display")) {
1004                                        setPerpetualAccess(true);
1005                                        boSortFlag = true;
1006                                    }
1007                                    else if (docFieldConfig.getName().equalsIgnoreCase("Public_Note_display")) {
1008                                        setPublicNote(true);
1009                                        boSortFlag = true;
1010                                    }
1011                                    else if (docFieldConfig.getName().equalsIgnoreCase("Url_display")) {
1012                                        setUrl(true);
1013                                        boSortFlag = true;
1014                                    }
1015                                    else if (docFieldConfig.getName().equalsIgnoreCase("E_Publisher_display")) {
1016                                        setPublisher(true);
1017                                        boSortFlag = true;
1018                                    }
1019                                    else if (docFieldConfig.getName().equalsIgnoreCase("HoldingsLocation_display")) {
1020                                        setHoldingsLocation(true);
1021                                        boSortFlag = true;
1022                                    }
1023                                    else if (docFieldConfig.getName().equalsIgnoreCase("HoldingsCallNumber_display")) {
1024                                        setHoldingsCallNumber(true);
1025                                        boSortFlag = true;
1026                                    }
1027                                }
1028
1029                                if(boSortFlag){
1030                                    boSortFieldForUI.append("{'bSortable':true, 'sWidth':'10%'},\n");
1031                                    boSortFlag = false;
1032                                }
1033                            }
1034                        }
1035                    }
1036                }
1037            }
1038        }
1039        String sortField = "";
1040        if(docType.equalsIgnoreCase(DocType.ITEM.getCode()) || docType.equalsIgnoreCase(DocType.HOLDINGS.getCode())){
1041            boSortFieldForUI.insert(35,"{'bSortable':true, 'sWidth':'4%'},\n");
1042            sortField = "["+boSortFieldForUI+"]";
1043        } else{
1044            sortField = "["+boSortFieldForUI+"]";
1045        }
1046        this.setSortFieldString(sortField);
1047    }
1048}