View Javadoc

1   package org.kuali.ole.docstore.model.bo;
2   
3   import org.apache.commons.collections.CollectionUtils;
4   import org.kuali.ole.docstore.model.enums.DocCategory;
5   import org.kuali.ole.docstore.model.enums.DocType;
6   
7   import java.util.ArrayList;
8   import java.util.List;
9   
10  /**
11   * Class for logical representation of OLE documents of category:Work and type:Bibliographic.
12   * User: tirumalesh.b
13   * Date: 1/2/12 Time: 2:59 PM
14   */
15  public class WorkBibDocument
16          extends OleDocument {
17  
18      protected List<String> titles;
19      protected List<String> authors;
20      protected List<String> subjects;
21      protected List<String> issns;
22      protected List<String> isbns;
23      protected List<String> publicationPlaces;
24      protected List<String> publishers;
25      protected List<String> descriptions;
26      protected List<String> publicationDates;
27      protected List<String> editions;
28      protected List<String> formGenres;
29      protected List<String> languages;
30      protected List<String> formats;
31      protected WorkInstanceDocument instanceDocument;
32  
33      public WorkInstanceDocument getInstanceDocument() {
34          return instanceDocument;
35      }
36  
37      public void setInstanceDocument(WorkInstanceDocument instanceDocument) {
38          this.instanceDocument = instanceDocument;
39      }
40  
41      public WorkBibDocument() {
42          docCategory = DocCategory.WORK;
43          docType = DocType.BIB;
44      }
45  
46      /* Getters and Setters */
47      public List<String> getTitles() {
48          return titles;
49      }
50  
51      public void setTitles(List<String> titles) {
52          this.titles = titles;
53      }
54  
55      public List<String> getAuthors() {
56          return authors;
57      }
58  
59      public void setAuthors(List<String> authors) {
60          this.authors = authors;
61      }
62  
63      public List<String> getSubjects() {
64          return subjects;
65      }
66  
67      public void setSubjects(List<String> subjects) {
68          this.subjects = subjects;
69      }
70  
71      public List<String> getIssns() {
72  		return issns;
73  	}
74  
75  	public void setIssns(List<String> issns) {
76  		this.issns = issns;
77  	}
78  
79  	public List<String> getIsbns() {
80  		return isbns;
81  	}
82  
83  	public void setIsbns(List<String> isbns) {
84  		this.isbns = isbns;
85  	}
86  
87  	public List<String> getPublicationPlaces() {
88  		return publicationPlaces;
89  	}
90  
91  	public void setPublicationPlaces(List<String> publicationPlaces) {
92  		this.publicationPlaces = publicationPlaces;
93  	}
94  
95  	public List<String> getPublishers() {
96  		return publishers;
97  	}
98  
99  	public void setPublishers(List<String> publishers) {
100 		this.publishers = publishers;
101 	}
102 
103 	public List<String> getDescriptions() {
104 		return descriptions;
105 	}
106 
107 	public void setDescriptions(List<String> descriptions) {
108 		this.descriptions = descriptions;
109 	}
110 
111 	public List<String> getPublicationDates() {
112 		return publicationDates;
113 	}
114 
115 	public void setPublicationDates(List<String> publicationDates) {
116 		this.publicationDates = publicationDates;
117 	}
118 
119 	public List<String> getEditions() {
120 		return editions;
121 	}
122 
123 	public void setEditions(List<String> editions) {
124 		this.editions = editions;
125 	}
126 
127 	public List<String> getFormGenres() {
128 		return formGenres;
129 	}
130 
131 	public void setFormGenres(List<String> formGenres) {
132 		this.formGenres = formGenres;
133 	}
134 
135 	public List<String> getLanguages() {
136 		return languages;
137 	}
138 
139 	public void setLanguages(List<String> languages) {
140 		this.languages = languages;
141 	}
142 
143 	public List<String> getFormats() {
144 		return formats;
145 	}
146 
147 	public void setFormats(List<String> formats) {
148 		this.formats = formats;
149 	}
150 
151 
152 	/* Convenience methods */
153     public String getTitle() {
154         if (!CollectionUtils.isEmpty(titles)) {
155             return titles.get(0);
156         }
157         else {
158             return null;
159         }
160     }
161 
162     public void setTitle(String title) {
163         if (null == titles) {
164             titles = new ArrayList<String>();
165             titles.add(title);
166         }
167         else {
168             titles.add(title);
169         }
170     }
171     
172     public String getAuthor() {
173         if (!CollectionUtils.isEmpty(authors)) {
174             return authors.get(0);
175         }
176         else {
177             return null;
178         }
179     }
180 
181     public void setAuthor(String author) {
182         if (null == authors) {
183         	authors = new ArrayList<String>();
184         	authors.add(author);
185         }
186         else {
187         	authors.add(author);
188         }
189     }
190 
191     public String getPublicationDate() {
192         if (!CollectionUtils.isEmpty(publicationDates)) {
193             return publicationDates.get(0);
194         }
195         else {
196             return null;
197         }
198     }
199 
200     public void setPublicationDate(String publicationDate) {
201         if (null == publicationDates) {
202         	publicationDates = new ArrayList<String>();
203         	publicationDates.add(publicationDate);
204         }
205         else {
206         	publicationDates.add(publicationDate);
207         }
208     }
209 
210     public String getIsbn() {
211         if (!CollectionUtils.isEmpty(isbns)) {
212             return isbns.get(0);
213         }
214         else {
215             return null;
216         }
217     }
218 
219     public void setIsbn(String isbn) {
220         if (null == isbns) {
221         	isbns = new ArrayList<String>();
222         	isbns.add(isbn);
223         }
224         else {
225         	isbns.add(isbn);
226         }
227     }
228 
229     public String getPublisher() {
230         if (!CollectionUtils.isEmpty(publishers)) {
231             return publishers.get(0);
232         }
233         else {
234             return null;
235         }
236     }
237 
238     public void setPublisher(String publisher) {
239         if (null == publishers) {
240         	publishers = new ArrayList<String>();
241         	publishers.add(publisher);
242         }
243         else {
244         	publishers.add(publisher);
245         }
246     }
247 
248  /*   public String getItemLink() {
249         if (!CollectionUtils.isEmpty(itemLinks)) {
250             return itemLinks.get(0);
251         }
252         else {
253             return null;
254         }
255     }
256 
257     public void setItemLink(String itemLink) {
258         if (null == itemLinks) {
259         	itemLinks = new ArrayList<String>();
260         	itemLinks.add(itemLink);
261         }
262         else {
263         	itemLinks.add(itemLink);
264         }
265     }*/
266     
267 }