001package org.kuali.ole.service.impl; 002 003import org.apache.log4j.Logger; 004import org.kuali.ole.OLEConstants; 005import org.kuali.ole.docstore.common.document.content.bib.marc.SubField; 006import org.kuali.ole.service.*; 007import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; 008 009import java.util.*; 010 011/** 012 * Created by IntelliJ IDEA. 013 * User: premkb 014 * Date: 2/2/13 015 * Time: 7:35 PM 016 * To change this template use File | Settings | File Templates. 017 */ 018public class OverlayLookupTableServiceImpl implements OverlayLookupTableService { 019 020 private static final Logger LOG = Logger.getLogger(OverlayLookupTableServiceImpl.class); 021 private OverlayDataFieldService overlayDataFieldService; 022 @Override 023 public String getFieldValueFromSubField(String incomingField,LinkedHashMap<String,SubField> subFieldMap)throws Exception{ 024 String incomingFieldValue = null; 025 SubField subField = subFieldMap.get(incomingField); 026 if(subField != null){ 027 incomingFieldValue = subField.getValue(); 028 } 029 return incomingFieldValue; 030 } 031 public OverlayDataFieldService getOverlayDataFieldService() { 032 if(overlayDataFieldService == null){ 033 overlayDataFieldService = GlobalResourceLoader.getService(OLEConstants.OVERLAY_DATAFIELD_SERVICE); 034 } 035 return overlayDataFieldService; 036 } 037 038 public void setOverlayDataFieldService(OverlayDataFieldService overlayDataFieldService) { 039 this.overlayDataFieldService = overlayDataFieldService; 040 } 041} 042