001/*
002 * Copyright 2011 The Kuali Foundation.
003 * 
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 * 
008 * http://www.opensource.org/licenses/ecl2.php
009 * 
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.ole.select.service.impl;
017
018import org.apache.log4j.Logger;
019import org.kuali.ole.select.CitationParser;
020import org.kuali.ole.select.businessobject.BibInfoBean;
021import org.w3c.dom.Document;
022
023import javax.xml.parsers.DocumentBuilder;
024import javax.xml.parsers.DocumentBuilderFactory;
025import java.util.ArrayList;
026
027public class BuildFormBibInfoBean {
028
029
030    private Logger LOG = org.apache.log4j.Logger.getLogger(BuildFormBibInfoBean.class);
031    private DocumentBuilderFactory domFactory;
032    private DocumentBuilder builder;
033    private Document doc;
034    private String responseXmlString;
035    private CitationParser ciatationParser;
036    //private BibInfoBean bibInfoBean;
037    private ArrayList<String> authorList;
038    
039
040/*    public  BibInfoBean getBean(String title,String author,String edition,String series,
041            String publisher,String placeOfPublication,String yearOfPublication,
042            String standardNumber,String typeOfStandardNumber,String routeRequesterReceipt,
043            String requestorsContactInfo,String requestorsNote)throws Exception{
044*/
045/*    public  BibInfoBean getBean(String title,String author,String edition,String series,
046            String publisher,String placeOfPublication,String yearOfPublication,
047            String standardNumber,String typeOfStandardNumber,
048            String routeRequesterReceipt, String requestorsNote,String requestorsFirstName, 
049            String requestorsLastName, String requestorsAddress1, String requestorsAddress2, String requestorsCity, String requestorsState, 
050            String requestorsZipCode, String requestorsCountryCode, String requestorsPhone, String requestorsEmail,
051            String requestorsSMS)throws Exception{
052        BibInfoBean bibInfoBean = new BibInfoBean();
053        bibInfoBean.setTitle(title);
054        bibInfoBean.setAuthor(author);
055        bibInfoBean.setEdition(edition);
056        bibInfoBean.setSeries(series);
057        bibInfoBean.setPublisher(publisher);
058        bibInfoBean.setPlaceOfPublication(placeOfPublication);
059        bibInfoBean.setYearOfPublication(yearOfPublication);
060        bibInfoBean.setStandardNumber(standardNumber);
061        bibInfoBean.setTypeOfStandardNumber(typeOfStandardNumber);
062        bibInfoBean.setRequestorsFirstName(requestorsFirstName);
063        bibInfoBean.setRequestorsLastName(requestorsLastName);
064        bibInfoBean.setRequestorsAddress1(requestorsAddress1);
065        bibInfoBean.setRequestorsAddress2(requestorsAddress2);
066        bibInfoBean.setRequestorsCity(requestorsCity);
067        bibInfoBean.setRequestorsState(requestorsState);
068        bibInfoBean.setRequestorsZipCode(requestorsZipCode);
069        bibInfoBean.setRequestorsCountryCode(requestorsCountryCode);
070        bibInfoBean.setRequestorsPhone(requestorsPhone);
071        bibInfoBean.setRequestorsEmail(requestorsEmail);
072        bibInfoBean.setRequestorsSMS(requestorsSMS);
073        return bibInfoBean;
074    }*/
075
076    public BibInfoBean getBean(BibInfoBean bibInfoBean, String title, String author, String edition, String series,
077                               String publisher, String placeOfPublication, String yearOfPublication,
078                               String standardNumber, String typeOfStandardNumber,
079                               String routeRequesterReceipt) throws Exception {
080        bibInfoBean.setTitle(title);
081        bibInfoBean.setAuthor(author);
082        bibInfoBean.setEdition(edition);
083        bibInfoBean.setSeries(series);
084        bibInfoBean.setPublisher(publisher);
085        bibInfoBean.setPlaceOfPublication(placeOfPublication);
086        bibInfoBean.setYearOfPublication(yearOfPublication);
087        bibInfoBean.setStandardNumber(standardNumber);
088        bibInfoBean.setTypeOfStandardNumber(typeOfStandardNumber);
089        bibInfoBean.setIsbn(standardNumber);
090/*        bibInfoBean.setRequestorsFirstName(requestorsFirstName);
091        bibInfoBean.setRequestorsLastName(requestorsLastName);
092        bibInfoBean.setRequestorsAddress1(requestorsAddress1);
093        bibInfoBean.setRequestorsAddress2(requestorsAddress2);
094        bibInfoBean.setRequestorsCity(requestorsCity);
095        bibInfoBean.setRequestorsState(requestorsState);
096        bibInfoBean.setRequestorsZipCode(requestorsZipCode);
097        bibInfoBean.setRequestorsCountryCode(requestorsCountryCode);
098        bibInfoBean.setRequestorsPhone(requestorsPhone);
099        bibInfoBean.setRequestorsEmail(requestorsEmail);
100        bibInfoBean.setRequestorsSMS(requestorsSMS);*/
101        return bibInfoBean;
102    }
103
104}