View Javadoc
1   package org.kuali.ole.service.impl;
2   
3   import org.apache.log4j.Logger;
4   import org.kuali.ole.OLEConstants;
5   import org.kuali.ole.docstore.common.document.content.bib.marc.SubField;
6   import org.kuali.ole.service.*;
7   import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
8   
9   import java.util.*;
10  
11  /**
12   * Created by IntelliJ IDEA.
13   * User: premkb
14   * Date: 2/2/13
15   * Time: 7:35 PM
16   * To change this template use File | Settings | File Templates.
17   */
18  public class OverlayLookupTableServiceImpl implements OverlayLookupTableService {
19  
20      private static final Logger LOG = Logger.getLogger(OverlayLookupTableServiceImpl.class);
21      private OverlayDataFieldService overlayDataFieldService;
22      @Override
23      public String getFieldValueFromSubField(String incomingField,LinkedHashMap<String,SubField> subFieldMap)throws Exception{
24          String incomingFieldValue = null;
25          SubField subField = subFieldMap.get(incomingField);
26          if(subField != null){
27              incomingFieldValue = subField.getValue();
28          }
29          return incomingFieldValue;
30      }
31      public OverlayDataFieldService getOverlayDataFieldService() {
32          if(overlayDataFieldService == null){
33              overlayDataFieldService = GlobalResourceLoader.getService(OLEConstants.OVERLAY_DATAFIELD_SERVICE);
34          }
35          return overlayDataFieldService;
36      }
37  
38      public void setOverlayDataFieldService(OverlayDataFieldService overlayDataFieldService) {
39          this.overlayDataFieldService = overlayDataFieldService;
40      }
41  }
42