View Javadoc
1   package org.kuali.ole.docstore.common.document;
2   
3   import org.kuali.ole.docstore.common.document.content.bib.marc.BibMarcRecords;
4   import org.kuali.ole.docstore.common.document.content.bib.marc.xstream.BibMarcRecordProcessor;
5   
6   /**
7    * Created with IntelliJ IDEA.
8    * User: jayabharathreddy
9    * Date: 12/27/13
10   * Time: 4:35 PM
11   * To change this template use File | Settings | File Templates.
12   */
13  public class BibMarcMapping {
14  
15      public Object getDocument(Bib bib) {
16  
17          BibMarcRecordProcessor bibMarcRecordProcessor = new BibMarcRecordProcessor();
18  
19          BibMarcRecords bibMarcRecords = bibMarcRecordProcessor.fromXML(bib.getContent());
20  
21          BibMarcMapper bibMarcMapper = BibMarcMapper.getInstance();
22  
23          bibMarcMapper.extractFields(bibMarcRecords.getRecords().get(0), bib);
24  
25          return bib;
26      }
27  
28  }