View Javadoc
1   package org.kuali.ole.describe.form;
2   
3   import org.kuali.ole.describe.bo.BibDocumentSearchResult;
4   import org.kuali.ole.describe.bo.ImportBibConfirmReplace;
5   import org.kuali.ole.describe.bo.ImportBibSearch;
6   import org.kuali.ole.describe.bo.ImportBibUserPreferences;
7   import org.kuali.ole.describe.service.ImportBibService;
8   import org.kuali.ole.docstore.common.document.content.bib.marc.BibMarcRecord;
9   import org.kuali.ole.docstore.common.document.content.instance.InstanceCollection;
10  import org.kuali.ole.docstore.common.search.SearchCondition;
11  import org.kuali.ole.docstore.common.search.SearchParams;
12  import org.kuali.ole.docstore.model.bo.WorkInstanceDocument;
13  import org.kuali.ole.docstore.model.xmlpojo.ingest.Request;
14  import org.kuali.rice.krad.web.form.UifFormBase;
15  
16  import java.util.*;
17  
18  /**
19   * Created with IntelliJ IDEA.
20   * User: pj7789
21   * Date: 26/11/12
22   * Time: 11:49 AM
23   * To change this template use File | Settings | File Templates.
24   */
25  public class ImportBibForm
26          extends UifFormBase {
27  
28      private List<BibMarcRecord> bibMarcRecordList = new ArrayList<BibMarcRecord>();
29      private ImportBibUserPreferences importBibUserPreferences;
30      private ImportBibSearch importBibSearch;
31      private ImportBibConfirmReplace importBibConfirmReplace;
32      private SearchParams searchParams;
33      private BibMarcRecord newBibMarcRecord;
34      private BibMarcRecord existingBibMarcRecord;
35  //    private WorkInstanceDocument neWorkInstanceOlemlRecord;
36      private InstanceCollection newInstanceCollection;
37      private String message;
38      private String displayField;
39      private String uuid;
40      private List<BibDocumentSearchResult> bibUuidsList;
41      private String requestString;
42      private Request request;
43      private SortedMap<BibDocumentSearchResult, BibMarcRecord> marcDocRecMap;
44  
45  
46      public ImportBibForm() {
47          List<SearchCondition> searchConditions = getSearchParams().getSearchConditions();
48          if (null == searchConditions) {
49              searchConditions = new ArrayList<SearchCondition>();
50          }
51          searchConditions.add(new SearchCondition());
52          searchConditions.add(new SearchCondition());
53      }
54  
55      public SearchParams getSearchParams() {
56          if (null == searchParams) {
57              searchParams = new SearchParams();
58          }
59          return searchParams;
60      }
61  
62      public void setSearchParams(SearchParams searchParams) {
63          this.searchParams = searchParams;
64      }
65  
66      public ImportBibUserPreferences getImportBibUserPreferences() {
67          return importBibUserPreferences;
68      }
69  
70      public void setImportBibUserPreferences(ImportBibUserPreferences importBibUserPreferences) {
71          this.importBibUserPreferences = importBibUserPreferences;
72      }
73  
74      public List<BibMarcRecord> getBibMarcRecordList() {
75          return bibMarcRecordList;
76      }
77  
78      public void setBibMarcRecordList(List<BibMarcRecord> bibMarcRecordList) {
79          this.bibMarcRecordList = bibMarcRecordList;
80      }
81  
82      public ImportBibSearch getImportBibSearch() {
83          if (null == importBibSearch) {
84              importBibSearch = new ImportBibSearch();
85          }
86          return importBibSearch;
87      }
88  
89      public void setImportBibSearch(ImportBibSearch importBibSearch) {
90          this.importBibSearch = importBibSearch;
91      }
92  
93      public ImportBibConfirmReplace getImportBibConfirmReplace() {
94          if (null == importBibConfirmReplace) {
95              importBibConfirmReplace = new ImportBibConfirmReplace();
96          }
97          return importBibConfirmReplace;
98      }
99  
100     public void setImportBibConfirmReplace(ImportBibConfirmReplace importBibConfirmReplace) {
101         this.importBibConfirmReplace = importBibConfirmReplace;
102     }
103 
104     public BibMarcRecord getNewBibMarcRecord() {
105         return newBibMarcRecord;
106     }
107 
108     public void setNewBibMarcRecord(BibMarcRecord newBibMarcRecord) {
109         this.newBibMarcRecord = newBibMarcRecord;
110     }
111 
112     public BibMarcRecord getExistingBibMarcRecord() {
113         return existingBibMarcRecord;
114     }
115 
116     public void setExistingBibMarcRecord(BibMarcRecord existingBibMarcRecord) {
117         this.existingBibMarcRecord = existingBibMarcRecord;
118     }
119 
120 //    public WorkInstanceDocument getNeWorkInstanceOlemlRecord() {
121 //        return neWorkInstanceOlemlRecord;
122 //    }
123 //
124 //    public void setNeWorkInstanceOlemlRecord(WorkInstanceDocument neWorkInstanceOlemlRecord) {
125 //        this.neWorkInstanceOlemlRecord = neWorkInstanceOlemlRecord;
126 //    }
127 
128     public String getMessage() {
129         return message;
130     }
131 
132     public void setMessage(String message) {
133         this.message = message;
134     }
135 
136     public String getDisplayField() {
137         return displayField;
138     }
139 
140     public void setDisplayField(String displayField) {
141         this.displayField = displayField;
142     }
143 
144     public String getUuid() {
145         return uuid;
146     }
147 
148     public void setUuid(String uuid) {
149         this.uuid = uuid;
150     }
151 
152     public List<BibDocumentSearchResult> getBibUuidsList() {
153         if (null == bibUuidsList) {
154             bibUuidsList = new ArrayList<BibDocumentSearchResult>();
155         }
156         return bibUuidsList;
157     }
158 
159     public void setBibUuidsList(List<BibDocumentSearchResult> bibUuidsList) {
160         this.bibUuidsList = bibUuidsList;
161     }
162 
163     public String getRequestString() {
164         return requestString;
165     }
166 
167     public void setRequestString(String requestString) {
168         this.requestString = requestString;
169     }
170 
171     public Request getRequest() {
172         return request;
173     }
174 
175     public void setRequest(Request request) {
176         this.request = request;
177     }
178 
179     public InstanceCollection getNewInstanceCollection() {
180         return newInstanceCollection;
181     }
182 
183     public void setNewInstanceCollection(InstanceCollection newInstanceCollection) {
184         this.newInstanceCollection = newInstanceCollection;
185     }
186 
187     public SortedMap<BibDocumentSearchResult, BibMarcRecord> getMarcDocRecMap() {
188         if (null == marcDocRecMap) {
189             marcDocRecMap = new TreeMap<BibDocumentSearchResult, BibMarcRecord>(new ImportBibService());
190         }
191         return marcDocRecMap;
192     }
193 
194     public void setMarcDocRecMap(SortedMap<BibDocumentSearchResult, BibMarcRecord> marcDocRecMap) {
195         this.marcDocRecMap = marcDocRecMap;
196     }
197 }
198