1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package org.kuali.ole.select.document;
17  
18  import org.apache.commons.lang.StringEscapeUtils;
19  import org.kuali.ole.docstore.common.client.*;
20  import org.kuali.ole.docstore.common.document.Bib;
21  import org.kuali.ole.docstore.common.document.BibMarc;
22  import org.kuali.ole.docstore.common.document.BibTree;
23  import org.kuali.ole.DocumentUniqueIDPrefix;
24  import org.kuali.ole.docstore.model.bo.WorkBibDocument;
25  import org.kuali.ole.docstore.model.bo.WorkInstanceDocument;
26  import org.kuali.ole.docstore.model.bo.WorkItemDocument;
27  import org.kuali.ole.docstore.model.enums.DocType;
28  import org.kuali.ole.module.purap.document.LineItemReceivingDocument;
29  import org.kuali.ole.module.purap.document.PurchaseOrderDocument;
30  import org.kuali.ole.select.OleSelectConstant;
31  import org.kuali.ole.select.businessobject.*;
32  import org.kuali.ole.select.document.service.OleLineItemReceivingService;
33  import org.kuali.ole.select.document.service.OlePurchaseOrderDocumentHelperService;
34  import org.kuali.ole.select.service.BibInfoService;
35  import org.kuali.ole.select.service.BibInfoWrapperService;
36  import org.kuali.ole.select.service.FileProcessingService;
37  import org.kuali.ole.select.service.impl.BibInfoServiceImpl;
38  import org.kuali.ole.select.service.impl.exception.DocStoreConnectionException;
39  import org.kuali.ole.sys.OLEConstants;
40  import org.kuali.ole.sys.context.SpringContext;
41  import org.kuali.ole.sys.service.impl.OleParameterConstants;
42  import org.kuali.rice.core.api.config.property.ConfigurationService;
43  import org.kuali.rice.core.api.util.RiceKeyConstants;
44  import org.kuali.rice.core.api.util.type.KualiDecimal;
45  import org.kuali.rice.core.api.util.type.KualiInteger;
46  import org.kuali.rice.coreservice.framework.parameter.ParameterConstants.COMPONENT;
47  import org.kuali.rice.coreservice.framework.parameter.ParameterConstants.NAMESPACE;
48  import org.kuali.rice.krad.util.GlobalVariables;
49  import org.kuali.rice.krad.util.ObjectUtils;
50  import java.util.*;
51  
52  
53  
54  
55  @NAMESPACE(namespace = OleParameterConstants.PURCHASING_NAMESPACE)
56  @COMPONENT(component = "LineItemReceivingDocument")
57  public class OleLineItemReceivingDocument extends LineItemReceivingDocument {
58  
59      private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(OleLineItemReceivingDocument.class);
60  
61      private static transient ConfigurationService kualiConfigurationService;
62      private static transient BibInfoWrapperService bibInfoWrapperService;
63      private static transient FileProcessingService fileProcessingService;
64      private static transient OleLineItemReceivingService oleLineItemReceivingService;
65      
66      private static transient BibInfoService bibInfoService;
67      private DocstoreClientLocator docstoreClientLocator;
68  
69      public DocstoreClientLocator getDocstoreClientLocator() {
70          if (docstoreClientLocator == null) {
71              docstoreClientLocator = SpringContext.getBean(DocstoreClientLocator.class);
72          }
73          return docstoreClientLocator;
74      }
75  
76      public static BibInfoService getBibInfoService() {
77          if (bibInfoService == null) {
78              bibInfoService = SpringContext.getBean(BibInfoServiceImpl.class);
79          }
80          return bibInfoService;
81      }
82  
83      public static OleLineItemReceivingService getOleLineItemReceivingService() {
84          if (oleLineItemReceivingService == null) {
85              oleLineItemReceivingService = SpringContext.getBean(OleLineItemReceivingService.class);
86          }
87          return oleLineItemReceivingService;
88      }
89  
90      public static void setOleLineItemReceivingService(OleLineItemReceivingService oleLineItemReceivingService) {
91          OleLineItemReceivingDocument.oleLineItemReceivingService = oleLineItemReceivingService;
92      }
93  
94  
95      public static ConfigurationService getConfigurationService() {
96          if (kualiConfigurationService == null) {
97              kualiConfigurationService = SpringContext.getBean(ConfigurationService.class);
98          }
99          return kualiConfigurationService;
100     }
101 
102     public static void setConfigurationService(ConfigurationService kualiConfigurationService) {
103         OleLineItemReceivingDocument.kualiConfigurationService = kualiConfigurationService;
104     }
105 
106     public static BibInfoWrapperService getBibInfoWrapperService() {
107         if (bibInfoWrapperService == null) {
108             bibInfoWrapperService = SpringContext.getBean(BibInfoWrapperService.class);
109         }
110         return bibInfoWrapperService;
111     }
112 
113     public static void setBibInfoWrapperService(BibInfoWrapperService bibInfoWrapperService) {
114         OleLineItemReceivingDocument.bibInfoWrapperService = bibInfoWrapperService;
115     }
116 
117     public static FileProcessingService getFileProcessingService() {
118         if (fileProcessingService == null) {
119             fileProcessingService = SpringContext.getBean(FileProcessingService.class);
120         }
121         return fileProcessingService;
122     }
123 
124     public static void setFileProcessingService(FileProcessingService fileProcessingService) {
125         OleLineItemReceivingDocument.fileProcessingService = fileProcessingService;
126     }
127 
128     public boolean getIsFinalReqs() {
129         if (this.getDocumentHeader().getWorkflowDocument().isFinal()) {
130             return true;
131         }
132         return false;
133     }
134 
135     
136 
137 
138     public void initiateDocument() {
139         super.initiateDocument();
140         getOleLineItemReceivingService().getInitialCollapseSections(this);
141     }
142 
143     
144 
145 
146 
147 
148     @Override
149     public void populateReceivingLineFromPurchaseOrder(PurchaseOrderDocument po) {
150         LOG.debug("Inside populateReceivingLineFromPurchaseOrder of OleLineItemReceivingDocument");
151         
152         this.setPurchaseOrderIdentifier(po.getPurapDocumentIdentifier());
153         this.getDocumentHeader().setOrganizationDocumentNumber(po.getDocumentHeader().getOrganizationDocumentNumber());
154         this.setAccountsPayablePurchasingDocumentLinkIdentifier(po.getAccountsPayablePurchasingDocumentLinkIdentifier());
155 
156         
157         this.setVendorHeaderGeneratedIdentifier(po.getVendorHeaderGeneratedIdentifier());
158         this.setVendorDetailAssignedIdentifier(po.getVendorDetailAssignedIdentifier());
159         this.setVendorName(po.getVendorName());
160         this.setVendorNumber(po.getVendorNumber());
161         this.setVendorAddressGeneratedIdentifier(po.getVendorAddressGeneratedIdentifier());
162         this.setVendorLine1Address(po.getVendorLine1Address());
163         this.setVendorLine2Address(po.getVendorLine2Address());
164         this.setVendorCityName(po.getVendorCityName());
165         this.setVendorStateCode(po.getVendorStateCode());
166         this.setVendorPostalCode(po.getVendorPostalCode());
167         this.setVendorCountryCode(po.getVendorCountryCode());
168 
169         
170         this.setAlternateVendorName(po.getAlternateVendorName());
171         this.setAlternateVendorNumber(po.getAlternateVendorNumber());
172         this.setAlternateVendorDetailAssignedIdentifier(po.getAlternateVendorDetailAssignedIdentifier());
173         this.setAlternateVendorHeaderGeneratedIdentifier(po.getAlternateVendorHeaderGeneratedIdentifier());
174 
175         
176         this.setDeliveryBuildingCode(po.getDeliveryBuildingCode());
177         this.setDeliveryBuildingLine1Address(po.getDeliveryBuildingLine1Address());
178         this.setDeliveryBuildingLine2Address(po.getDeliveryBuildingLine2Address());
179         this.setDeliveryBuildingName(po.getDeliveryBuildingName());
180         this.setDeliveryBuildingRoomNumber(po.getDeliveryBuildingRoomNumber());
181         this.setDeliveryCampusCode(po.getDeliveryCampusCode());
182         this.setDeliveryCityName(po.getDeliveryCityName());
183         this.setDeliveryCountryCode(po.getDeliveryCountryCode());
184         this.setDeliveryInstructionText(po.getDeliveryInstructionText());
185         this.setDeliveryPostalCode(po.getDeliveryPostalCode());
186         this.setDeliveryRequiredDate(po.getDeliveryRequiredDate());
187         this.setDeliveryRequiredDateReasonCode(po.getDeliveryRequiredDateReasonCode());
188         this.setDeliveryStateCode(po.getDeliveryStateCode());
189         this.setDeliveryToEmailAddress(po.getDeliveryToEmailAddress());
190         this.setDeliveryToName(po.getDeliveryToName());
191         this.setDeliveryToPhoneNumber(po.getDeliveryToPhoneNumber());
192 
193         
194         for (OlePurchaseOrderItem poi : (List<OlePurchaseOrderItem>) po.getItems()) {
195             
196             if (poi.isItemActiveIndicator() && poi.getItemType().isQuantityBasedGeneralLedgerIndicator() && poi.getItemType().isLineItemIndicator()) {
197                 this.getItems().add(new OleLineItemReceivingItem(poi, this));
198             }
199         }
200 
201         populateDocumentDescription(po);
202         LOG.debug("Leaving populateReceivingLineFromPurchaseOrder of OleLineItemReceivingDocument");
203     }
204 
205     @Override
206     public void prepareForSave() {
207         try {
208             String titleId = null;
209             List<OleLineItemReceivingItem> items = new ArrayList<OleLineItemReceivingItem>();
210             items = this.getItems();
211 
212             Iterator iterator = items.iterator();
213             HashMap dataMap = new HashMap();
214             int itemCount = 0;
215             while (iterator.hasNext()) {
216                 LOG.debug("###########inside prepareForSave item loop###########");
217                 Object object = iterator.next();
218                 if (object instanceof OleLineItemReceivingItem) {
219                     LOG.debug("###########inside prepareForSave ole requisition item###########");
220                     OleLineItemReceivingItem singleItem = (OleLineItemReceivingItem) object;
221                     if (singleItem.getItemTitleId() != null) {
222                         titleId = singleItem.getItemTitleId();
223                     } else if (singleItem.getBibInfoBean() != null) {
224                         titleId = singleItem.getBibInfoBean().getTitleId();
225                     }
226                     if (ObjectUtils.isNull(singleItem.getItemReceivedTotalParts())) {
227                         singleItem.setItemReceivedTotalParts(KualiDecimal.ZERO);
228                     } else if (ObjectUtils.isNull(singleItem.getItemReceivedTotalQuantity())) {
229                         singleItem.setItemReceivedTotalQuantity(KualiDecimal.ZERO);
230                     } else if (ObjectUtils.isNull(singleItem.getItemReturnedTotalParts())) {
231                         singleItem.setItemReturnedTotalParts(KualiDecimal.ZERO);
232                     } else if (ObjectUtils.isNull(singleItem.getItemReturnedTotalQuantity())) {
233                         singleItem.setItemReturnedTotalQuantity(KualiDecimal.ZERO);
234                     } else if (ObjectUtils.isNull(singleItem.getItemDamagedTotalParts())) {
235                         singleItem.setItemDamagedTotalParts(KualiDecimal.ZERO);
236                     } else if (ObjectUtils.isNull(singleItem.getItemDamagedTotalQuantity())) {
237                         singleItem.setItemDamagedTotalQuantity(KualiDecimal.ZERO);
238                     }
239                 }
240             }
241             super.prepareForSave();
242         } catch (DocStoreConnectionException dsce) {
243             GlobalVariables.getMessageMap().putError("error.requisition.docstore.connectionError", RiceKeyConstants.ERROR_CUSTOM, "Error while connecting to document storage server, contact system administrator.");
244         } catch (Exception e) {
245             LOG.error("Exception during prepareForSave() in OleLineItemReceivingDocument"+e);
246             throw new RuntimeException(e);
247         }
248     }
249 
250     
251 
252 
253 
254     @Override
255     public void processAfterRetrieve() {
256         try {
257             LOG.debug("Inside processAfterRetrieve of OleLineItemReceivingDocument");
258 
259             String itemDescription = "";
260             List<OleLineItemReceivingItem> items = new ArrayList<OleLineItemReceivingItem>();
261             items = this.getItems();
262             Iterator iterator = items.iterator();
263             String titleId = null;
264             int itemCount = 0;
265             boolean isBibFileExist = false;
266             boolean isBibEdit = false;
267             List receiptNoteList;
268             List specialHandlingNoteList;
269             for (OleLineItemReceivingItem item : items) {
270                 receiptNoteList = new ArrayList();
271                 specialHandlingNoteList = new ArrayList();
272                 List<OleLineItemReceivingReceiptNotes> notes = new ArrayList<OleLineItemReceivingReceiptNotes>();
273                 notes = item.getNoteList();
274                 for (OleLineItemReceivingReceiptNotes note : notes) {
275                     String noteType = note.getNoteType().getNoteType();
276                     if (noteType.equalsIgnoreCase(OLEConstants.SPECIAL_PROCESSING_INSTRUCTION_NOTE)) {
277                         specialHandlingNoteList.add(note);
278                     } else {
279                         receiptNoteList.add(note);
280                     }
281                     item.setSpecialHandlingNoteList(specialHandlingNoteList);
282                     item.setReceiptNoteList(receiptNoteList);
283                     item.setReceiptNoteListSize(receiptNoteList.size());
284                 }
285             }
286             while (iterator.hasNext()) {
287                 LOG.debug("###########inside processAfterRetrieve item loop###########");
288                 Object object = iterator.next();
289                 if (object instanceof OleLineItemReceivingItem) {
290                     LOG.debug("###########inside processAfterRetrieve ole requisition item###########");
291                     OleLineItemReceivingItem singleItem = (OleLineItemReceivingItem) object;
292                     if (LOG.isDebugEnabled()) {
293                         LOG.debug("Title id while retriving ------>" + singleItem.getItemTitleId());
294                     }
295                     BibInfoBean xmlBibInfoBean = new BibInfoBean();
296                     HashMap<String, String> dataMap = new HashMap<String, String>();
297                     
298 
299 
300 
301 
302                     if (singleItem.getItemTitleId() == null) {
303                         singleItem.setItemTitleId(getOleLineItemReceivingService().getLineItemDocItemTitleId(singleItem));
304                     }
305 
306                     if (singleItem.getItemTitleId() != null) {
307                         Bib bib = new BibMarc();
308                         if (singleItem.getItemTitleId() != null && singleItem.getItemTitleId() != "") {
309                             bib = getDocstoreClientLocator().getDocstoreClient().retrieveBib(singleItem.getItemTitleId());
310                             singleItem.setBibUUID(bib.getId());
311                         }
312                         singleItem.setDocFormat(DocumentUniqueIDPrefix.getBibFormatType(singleItem.getItemTitleId()));
313                         itemDescription = ((bib.getTitle() != null && !bib.getTitle().isEmpty()) ? bib.getTitle().trim() + ", " : "") +
314                                 ((bib.getAuthor() != null && !bib.getAuthor().isEmpty()) ? bib.getAuthor().trim() + ", " : "") +
315                                 ((bib.getPublisher() != null && !bib.getPublisher().isEmpty()) ? bib.getPublisher().trim() + ", " : "") +
316                                 ((bib.getIsbn() != null && !bib.getIsbn().isEmpty()) ? bib.getIsbn().trim() + ", " : "");
317                         if (itemDescription != null && !(itemDescription.equals(""))) {
318                             itemDescription = itemDescription.lastIndexOf(",") < 0 ? itemDescription :
319                                     itemDescription.substring(0, itemDescription.lastIndexOf(","));
320                             StringEscapeUtils stringEscapeUtils = new StringEscapeUtils();
321                             itemDescription = stringEscapeUtils.unescapeXml(itemDescription);
322                             singleItem.setItemDescription(itemDescription);
323                         }
324                     }
325                     Map cpySection = new HashMap();
326                     cpySection.put("itemIdentifier", singleItem.getPurchaseOrderIdentifier());
327 
328                     List<OlePurchaseOrderItem> olePurchaseOrderItems = (List<OlePurchaseOrderItem>) getBusinessObjectService().findMatching(OlePurchaseOrderItem.class, cpySection);
329                     if (olePurchaseOrderItems.size() > 0) {
330                         for (OlePurchaseOrderItem item : olePurchaseOrderItems) {
331                             singleItem.setCopyList(item.getCopyList());
332                         }
333                     }
334                 }
335             }
336             LOG.debug("Leaving processAfterRetrieve of OleLineItemReceivingDocument");
337         } catch (Exception e) {
338             LOG.error("Exception during processAfterRetrieve() in OleLineItemReceivingDocument"+e);
339             throw new RuntimeException(e);
340         }
341     }
342 
343     
344 
345 
346     public void setEnumerationToCopies(OleLineItemReceivingItem singleItem) {
347         String partEnumerationCopy = getConfigurationService().getPropertyValueAsString(
348                 OLEConstants.PART_ENUMERATION_COPY);
349         String partEnumerationVolume = getConfigurationService().getPropertyValueAsString(
350                 OLEConstants.PART_ENUMERATION_VOLUME);
351         List<OleCopies> itemCopies = singleItem.getCopies();
352         List<OleCopies> copiesList = new ArrayList<OleCopies>();
353         for (int copies = 0; copies < itemCopies.size(); copies++) {
354             itemCopies.get(copies).setParts(new KualiInteger(singleItem.getItemReceivedTotalParts().intValue()));
355             int startingCopyNumber = itemCopies.get(copies).getStartingCopyNumber().intValue();
356             StringBuffer enumeration = new StringBuffer();
357             for (int noOfCopies = 0; noOfCopies < singleItem.getItemCopies().intValue(); noOfCopies++) {
358                 for (int noOfParts = 0; noOfParts < singleItem.getItemReceivedTotalParts().intValue(); noOfParts++) {
359                     int newNoOfCopies = startingCopyNumber + noOfCopies;
360                     int newNoOfParts = noOfParts + 1;
361                     if (noOfCopies + 1 == singleItem.getItemCopies().intValue()
362                             && newNoOfParts == singleItem.getItemReceivedTotalParts().intValue()) {
363                         enumeration = enumeration.append(
364                                 partEnumerationCopy + newNoOfCopies + OLEConstants.DOT_TO_SEPARATE_COPIES_PARTS)
365                                 .append(
366                                         partEnumerationVolume + newNoOfParts);
367                     } else {
368                         enumeration = enumeration.append(
369                                 partEnumerationCopy + newNoOfCopies + OLEConstants.DOT_TO_SEPARATE_COPIES_PARTS)
370                                 .append(partEnumerationVolume + newNoOfParts
371                                         + OLEConstants.COMMA_TO_SEPARATE_ENUMERATION);
372                     }
373                 }
374             }
375             itemCopies.get(copies).setPartEnumeration(enumeration.toString());
376         }
377     }
378 
379     
380 
381 
382 
383 
384 
385 
386     public List<OleCopies> setCopiesToLineItem(OleLineItemReceivingItem singleItem, WorkBibDocument workBibDocument) {
387         List<WorkInstanceDocument> instanceDocuments = workBibDocument.getWorkInstanceDocumentList();
388         List<OleCopies> copies = new ArrayList<OleCopies>();
389         for (WorkInstanceDocument workInstanceDocument : instanceDocuments) {
390             List<WorkItemDocument> itemDocuments = workInstanceDocument.getItemDocumentList();
391             StringBuffer enumeration = new StringBuffer();
392             for (int itemDocs = 0; itemDocs < itemDocuments.size(); itemDocs++) {
393                 if (itemDocs + 1 == itemDocuments.size()) {
394                     enumeration = enumeration.append(itemDocuments.get(itemDocs).getEnumeration());
395                 } else {
396                     enumeration = enumeration.append(itemDocuments.get(itemDocs).getEnumeration() + ",");
397                 }
398 
399             }
400             int startingCopy = 0;
401             if (singleItem.getItemReceivedTotalParts().intValue() != 0 && null != enumeration) {
402                 String enumerationSplit = enumeration.substring(1, 2);
403                 boolean isint = checkIsEnumerationSplitIsIntegerOrNot(enumerationSplit);
404                 if (isint) {
405                     startingCopy = Integer.parseInt(enumerationSplit);
406                 }
407             }
408 
409             
410 
411 
412 
413             boolean isValid = checkForEnumeration(enumeration);
414             if (isValid) {
415                 OleRequisitionCopies copy = new OleRequisitionCopies();
416                 int noOfCopies = 0;
417                 if (null != singleItem.getItemOrderedQuantity() && null != singleItem.getItemOrderedParts()) {
418                     noOfCopies = workInstanceDocument.getItemDocumentList().size()
419                             / singleItem.getItemOrderedParts().intValue();
420                     copy.setParts(new KualiInteger(singleItem.getItemOrderedParts().intValue()));
421                 } else {
422                     noOfCopies = workInstanceDocument.getItemDocumentList().size()
423                             / singleItem.getItemReceivedTotalParts().intValue();
424                     copy.setParts(new KualiInteger(singleItem.getItemReceivedTotalParts().intValue()));
425                 }
426 
427                 copy.setLocationCopies(workInstanceDocument.getHoldingsDocument().getLocationName());
428                 copy.setItemCopies(new KualiDecimal(noOfCopies));
429                 copy.setPartEnumeration(enumeration.toString());
430                 copy.setStartingCopyNumber(new KualiInteger(startingCopy));
431                 copies.add(copy);
432                 
433             }
434         }
435         return copies;
436     }
437 
438     public boolean checkForEnumeration(StringBuffer enumeration) {
439         if (null != enumeration && !(enumeration.equals("")) && !(enumeration.toString().equals("null"))) {
440             return true;
441         } else {
442             return false;
443         }
444     }
445 
446     public boolean checkIsEnumerationSplitIsIntegerOrNot(String enumerationSplit) {
447         try {
448             int startingCopy = Integer.parseInt(enumerationSplit);
449         } catch (NumberFormatException e) {
450             return false;
451         }
452         return true;
453     }
454 
455     
456 
457 
458 
459 
460 
461 
462 
463 
464 
465 
466 
467 
468 
469 
470 
471 
472 
473 
474 
475 
476 
477 
478 
479 
480 
481     
482 
483 
484     
485 
486 
487 
488 
489     public String getBibeditorCreateURL() {
490         String bibeditorCreateURL = getConfigurationService().getPropertyValueAsString(OLEConstants.BIBEDITOR_CREATE_URL_KEY);
491         return bibeditorCreateURL;
492     }
493 
494     public String getBibSearchURL() {
495         String bibSearchURL = getConfigurationService().getPropertyValueAsString(OLEConstants.BIBEDITOR_SEARCH_URL_KEY);
496         return bibSearchURL;
497     }
498 
499     
500 
501 
502 
503 
504     public String getBibeditorEditURL() {
505         String bibeditorEditURL = getConfigurationService().getPropertyValueAsString(OLEConstants.BIBEDITOR_URL_KEY);
506         return bibeditorEditURL;
507     }
508     
509 
510 
511 
512 
513     public String getDublinEditorEditURL() {
514         return SpringContext.getBean(OlePurchaseOrderDocumentHelperService.class).getDublinEditorEditURL();
515     }
516 
517     
518 
519 
520 
521 
522     public String getBibeditorViewURL() {
523         String bibeditorViewURL = getConfigurationService().getPropertyValueAsString(OLEConstants.DOCSTORE_APP_URL_KEY);
524         return bibeditorViewURL;
525     }
526     
527 
528 
529 
530 
531     public String getDublinEditorViewURL() {
532         return SpringContext.getBean(OlePurchaseOrderDocumentHelperService.class).getDublinEditorViewURL();
533 
534     }
535     
536 
537 
538 
539 
540     public String getMarcXMLFileDirLocation() throws Exception {
541         String externaleDirectory = getFileProcessingService().getMarcXMLFileDirLocation();
542         return externaleDirectory;
543     }
544 
545 
546     
547 
548 
549 
550 
551     public boolean getIsSaved() {
552         if (this.getDocumentHeader().getWorkflowDocument().isSaved() || this.getDocumentHeader().getWorkflowDocument().isInitiated()) {
553             return true;
554         }
555         return false;
556     }
557 
558     private void setItemDescription(OleLineItemReceivingItem singleItem) throws Exception {
559         if (singleItem.getOleOrderRecord() != null) {
560             Map<String, ?> bibAssociatedFieldValuesMap = singleItem.getOleOrderRecord().getOleBibRecord().getBibAssociatedFieldsValueMap();
561             List titleList = (List) bibAssociatedFieldValuesMap.get("Title_search");
562             String title = titleList != null && !titleList.isEmpty() ? (String) (titleList).get(0) : null;
563             List authorList = (List) bibAssociatedFieldValuesMap.get("Author_search");
564             String author = authorList != null && !authorList.isEmpty() ? (String) (authorList).get(0) : null;
565             List publisherList = (List) bibAssociatedFieldValuesMap.get("Publisher_search");
566             String publisher = publisherList != null && !publisherList.isEmpty() ? (String) (publisherList).get(0) : null;
567             List isbnList = (List) bibAssociatedFieldValuesMap.get("020a");
568             String isbn = isbnList != null && !isbnList.isEmpty() ? (String) (isbnList).get(0) : null;
569 
570             singleItem.setBibUUID(singleItem.getOleOrderRecord().getOleBibRecord().getBibUUID());
571             singleItem.setItemDescription(title + "," + author + "," + publisher + "," + isbn);
572         }
573     }
574 
575     public boolean getIsATypeOfRCVGDoc() {
576         return true;
577     }
578 
579     public boolean getIsATypeOfCORRDoc() {
580         return false;
581     }
582 
583 }