1 /* 2 * Copyright 2011 The Kuali Foundation. 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.ole.select.service.impl; 17 18 import org.apache.log4j.Logger; 19 import org.kuali.ole.select.CitationParser; 20 import org.kuali.ole.select.businessobject.BibInfoBean; 21 import org.w3c.dom.Document; 22 23 import javax.xml.parsers.DocumentBuilder; 24 import javax.xml.parsers.DocumentBuilderFactory; 25 import java.util.ArrayList; 26 27 public class BuildFormBibInfoBean { 28 29 30 private Logger LOG = org.apache.log4j.Logger.getLogger(BuildFormBibInfoBean.class); 31 private DocumentBuilderFactory domFactory; 32 private DocumentBuilder builder; 33 private Document doc; 34 private String responseXmlString; 35 private CitationParser ciatationParser; 36 //private BibInfoBean bibInfoBean; 37 private ArrayList<String> authorList; 38 39 40 /* public BibInfoBean getBean(String title,String author,String edition,String series, 41 String publisher,String placeOfPublication,String yearOfPublication, 42 String standardNumber,String typeOfStandardNumber,String routeRequesterReceipt, 43 String requestorsContactInfo,String requestorsNote)throws Exception{ 44 */ 45 /* public BibInfoBean getBean(String title,String author,String edition,String series, 46 String publisher,String placeOfPublication,String yearOfPublication, 47 String standardNumber,String typeOfStandardNumber, 48 String routeRequesterReceipt, String requestorsNote,String requestorsFirstName, 49 String requestorsLastName, String requestorsAddress1, String requestorsAddress2, String requestorsCity, String requestorsState, 50 String requestorsZipCode, String requestorsCountryCode, String requestorsPhone, String requestorsEmail, 51 String requestorsSMS)throws Exception{ 52 BibInfoBean bibInfoBean = new BibInfoBean(); 53 bibInfoBean.setTitle(title); 54 bibInfoBean.setAuthor(author); 55 bibInfoBean.setEdition(edition); 56 bibInfoBean.setSeries(series); 57 bibInfoBean.setPublisher(publisher); 58 bibInfoBean.setPlaceOfPublication(placeOfPublication); 59 bibInfoBean.setYearOfPublication(yearOfPublication); 60 bibInfoBean.setStandardNumber(standardNumber); 61 bibInfoBean.setTypeOfStandardNumber(typeOfStandardNumber); 62 bibInfoBean.setRequestorsFirstName(requestorsFirstName); 63 bibInfoBean.setRequestorsLastName(requestorsLastName); 64 bibInfoBean.setRequestorsAddress1(requestorsAddress1); 65 bibInfoBean.setRequestorsAddress2(requestorsAddress2); 66 bibInfoBean.setRequestorsCity(requestorsCity); 67 bibInfoBean.setRequestorsState(requestorsState); 68 bibInfoBean.setRequestorsZipCode(requestorsZipCode); 69 bibInfoBean.setRequestorsCountryCode(requestorsCountryCode); 70 bibInfoBean.setRequestorsPhone(requestorsPhone); 71 bibInfoBean.setRequestorsEmail(requestorsEmail); 72 bibInfoBean.setRequestorsSMS(requestorsSMS); 73 return bibInfoBean; 74 }*/ 75 76 public BibInfoBean getBean(BibInfoBean bibInfoBean, String title, String author, String edition, String series, 77 String publisher, String placeOfPublication, String yearOfPublication, 78 String standardNumber, String typeOfStandardNumber, 79 String routeRequesterReceipt) throws Exception { 80 bibInfoBean.setTitle(title); 81 bibInfoBean.setAuthor(author); 82 bibInfoBean.setEdition(edition); 83 bibInfoBean.setSeries(series); 84 bibInfoBean.setPublisher(publisher); 85 bibInfoBean.setPlaceOfPublication(placeOfPublication); 86 bibInfoBean.setYearOfPublication(yearOfPublication); 87 bibInfoBean.setStandardNumber(standardNumber); 88 bibInfoBean.setTypeOfStandardNumber(typeOfStandardNumber); 89 bibInfoBean.setIsbn(standardNumber); 90 /* bibInfoBean.setRequestorsFirstName(requestorsFirstName); 91 bibInfoBean.setRequestorsLastName(requestorsLastName); 92 bibInfoBean.setRequestorsAddress1(requestorsAddress1); 93 bibInfoBean.setRequestorsAddress2(requestorsAddress2); 94 bibInfoBean.setRequestorsCity(requestorsCity); 95 bibInfoBean.setRequestorsState(requestorsState); 96 bibInfoBean.setRequestorsZipCode(requestorsZipCode); 97 bibInfoBean.setRequestorsCountryCode(requestorsCountryCode); 98 bibInfoBean.setRequestorsPhone(requestorsPhone); 99 bibInfoBean.setRequestorsEmail(requestorsEmail); 100 bibInfoBean.setRequestorsSMS(requestorsSMS);*/ 101 return bibInfoBean; 102 } 103 104 }