Project

General

Profile

Download (7.88 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.cdm.model.reference;
11

    
12

    
13
import javax.persistence.Entity;
14
import javax.persistence.Inheritance;
15
import javax.persistence.InheritanceType;
16
import javax.persistence.ManyToOne;
17
import javax.persistence.Transient;
18

    
19
import org.apache.log4j.Logger;
20
import org.hibernate.annotations.Cascade;
21
import org.hibernate.annotations.CascadeType;
22

    
23
import eu.etaxonomy.cdm.strategy.cache.reference.BibtexDefaultCacheStrategy;
24

    
25
/**
26
 * publisher for Report is "institution" in BibTex ???
27
 * @author m.doering
28
 * @version 1.0
29
 * @created 08-Nov-2007 13:06:12
30
 */
31
@Entity
32
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
33
public class BibtexReference extends ReferenceBase implements INomenclaturalReference {
34
	private static final Logger logger = Logger.getLogger(BibtexReference.class);
35
	
36
	private BibtexEntryType type;
37
	//The journal or magazine the work was published in
38
	private String journal;
39
	//The title of the book, if only part of it is being cited
40
	private String booktitle;
41
	//The chapter number
42
	private String chapter;
43
	//The title of the work
44
	private String title;
45
	//The series of books the book was published in (e.g. "The Hardy Boys")
46
	private String series;
47
	//The edition of a book, long form (such as "first" or "second")
48
	private String edition;
49
	//The volume of a journal or multi-volume book
50
	private String volume;
51
	//The "number" of a journal, magazine, or tech-report, if applicable. (Most publications have a "volume", but no "number"
52
	//field.)
53
	private String number;
54
	//Page numbers, separated either by commas or double-hyphens
55
	private String pages;
56
	//An annotation for annotated bibliography styles (not typical)
57
	private String annote;
58
	//The name(s) of the editor(s)
59
	private String editor;
60
	//The institution that was involved in the publishing, but not necessarily the publisher
61
	private String institution;
62
	//The school where the thesis was written
63
	private String school;
64
	//The conference sponsor
65
	private String organization;
66
	//The publisher's name
67
	private String publisher;
68
	//Publisher's address (usually just the city, but can be the full address for lesser-known publishers)
69
	private String address;
70
	//How it was published, if the publishing method is nonstandard
71
	private String howpublished;
72
	//The type of tech-report, for example, "Research Note"
73
	private String reportType;
74
	//The month of publication (or, if unpublished, the month of creation)
75
	private String month;
76
	//The year of publication (or, if unpublished, the year of creation)
77
	private String year;
78
	//A specification of an electronic publication, often a preprint or a technical report
79
	private String eprint;
80
	//Miscellaneous extra information
81
	private String note;
82
	private BibtexReference crossref;
83

    
84
	private NomenclaturalReferenceHelper nomRefBase = NomenclaturalReferenceHelper.NewInstance(this);
85

    
86
	public static BibtexReference NewInstance(){
87
		BibtexReference result = new BibtexReference();
88
		return result;
89
	}
90
	
91
	protected BibtexReference(){
92
		super();
93
		this.cacheStrategy = BibtexDefaultCacheStrategy.NewInstance();
94
	}
95

    
96
	@ManyToOne
97
	@Cascade({CascadeType.SAVE_UPDATE})
98
	public BibtexReference getCrossref(){
99
		return this.crossref;
100
	}
101
	public void setCrossref(BibtexReference crossref){
102
		this.crossref = crossref;
103
	}
104

    
105
	public String getJournal(){
106
		return this.journal;
107
	}
108

    
109
	/**
110
	 * 
111
	 * @param journal    journal
112
	 */
113
	public void setJournal(String journal){
114
		this.journal = journal;
115
	}
116

    
117
	public String getBooktitle(){
118
		return this.booktitle;
119
	}
120

    
121
	/**
122
	 * 
123
	 * @param booktitle    booktitle
124
	 */
125
	public void setBooktitle(String booktitle){
126
		this.booktitle = booktitle;
127
	}
128

    
129
	public String getChapter(){
130
		return this.chapter;
131
	}
132

    
133
	/**
134
	 * 
135
	 * @param chapter    chapter
136
	 */
137
	public void setChapter(String chapter){
138
		this.chapter = chapter;
139
	}
140

    
141
	public String getTitle(){
142
		return this.title;
143
	}
144

    
145
	/**
146
	 * 
147
	 * @param title    title
148
	 */
149
	public void setTitle(String title){
150
		this.title = title;
151
	}
152

    
153
	public String getSeries(){
154
		return this.series;
155
	}
156

    
157
	/**
158
	 * 
159
	 * @param series    series
160
	 */
161
	public void setSeries(String series){
162
		this.series = series;
163
	}
164

    
165
	public String getEdition(){
166
		return this.edition;
167
	}
168

    
169
	/**
170
	 * 
171
	 * @param edition    edition
172
	 */
173
	public void setEdition(String edition){
174
		this.edition = edition;
175
	}
176

    
177
	public String getVolume(){
178
		return this.volume;
179
	}
180

    
181
	/**
182
	 * 
183
	 * @param volume    volume
184
	 */
185
	public void setVolume(String volume){
186
		this.volume = volume;
187
	}
188

    
189
	public String getNumber(){
190
		return this.number;
191
	}
192

    
193
	/**
194
	 * 
195
	 * @param number    number
196
	 */
197
	public void setNumber(String number){
198
		this.number = number;
199
	}
200

    
201
	public String getPages(){
202
		return this.pages;
203
	}
204

    
205
	/**
206
	 * 
207
	 * @param pages    pages
208
	 */
209
	public void setPages(String pages){
210
		this.pages = pages;
211
	}
212

    
213
	public String getAnnote(){
214
		return this.annote;
215
	}
216

    
217
	/**
218
	 * 
219
	 * @param annote    annote
220
	 */
221
	public void setAnnote(String annote){
222
		this.annote = annote;
223
	}
224

    
225
	public String getEditor(){
226
		return this.editor;
227
	}
228

    
229
	/**
230
	 * 
231
	 * @param editor    editor
232
	 */
233
	public void setEditor(String editor){
234
		this.editor = editor;
235
	}
236

    
237
	public String getInstitution(){
238
		return this.institution;
239
	}
240

    
241
	/**
242
	 * 
243
	 * @param institution    institution
244
	 */
245
	public void setInstitution(String institution){
246
		this.institution = institution;
247
	}
248

    
249
	public String getSchool(){
250
		return this.school;
251
	}
252

    
253
	/**
254
	 * 
255
	 * @param school    school
256
	 */
257
	public void setSchool(String school){
258
		this.school = school;
259
	}
260

    
261
	public String getOrganization(){
262
		return this.organization;
263
	}
264

    
265
	/**
266
	 * 
267
	 * @param organization    organization
268
	 */
269
	public void setOrganization(String organization){
270
		this.organization = organization;
271
	}
272

    
273
	public String getPublisher(){
274
		return this.publisher;
275
	}
276

    
277
	/**
278
	 * 
279
	 * @param publisher    publisher
280
	 */
281
	public void setPublisher(String publisher){
282
		this.publisher = publisher;
283
	}
284

    
285
	public String getAddress(){
286
		return this.address;
287
	}
288

    
289
	/**
290
	 * 
291
	 * @param address    address
292
	 */
293
	public void setAddress(String address){
294
		this.address = address;
295
	}
296

    
297
	public String getHowpublished(){
298
		return this.howpublished;
299
	}
300

    
301
	/**
302
	 * 
303
	 * @param howpublished    howpublished
304
	 */
305
	public void setHowpublished(String howpublished){
306
		this.howpublished = howpublished;
307
	}
308

    
309
	public String getReportType(){
310
		return this.reportType;
311
	}
312

    
313
	/**
314
	 * 
315
	 * @param type    type
316
	 */
317
	public void setReportType(String type){
318
		this.reportType = type;
319
	}
320

    
321
	public String getMonth(){
322
		return this.month;
323
	}
324

    
325
	/**
326
	 * 
327
	 * @param month    month
328
	 */
329
	public void setMonth(String month){
330
		this.month = month;
331
	}
332

    
333
	public String getYear(){
334
		return this.year;
335
	}
336

    
337
	/**
338
	 * 
339
	 * @param year    year
340
	 */
341
	public void setYear(String year){
342
		this.year = year;
343
	}
344

    
345
	public String getEprint(){
346
		return this.eprint;
347
	}
348

    
349
	/**
350
	 * 
351
	 * @param eprint    eprint
352
	 */
353
	public void setEprint(String eprint){
354
		this.eprint = eprint;
355
	}
356

    
357
	public String getNote(){
358
		return this.note;
359
	}
360

    
361
	/**
362
	 * 
363
	 * @param note    note
364
	 */
365
	public void setNote(String note){
366
		this.note = note;
367
	}
368

    
369
	@ManyToOne
370
	public BibtexEntryType getType() {
371
		return type;
372
	}
373

    
374
	public void setType(BibtexEntryType type) {
375
		this.type = type;
376
	}
377
	
378

    
379
	/* (non-Javadoc)
380
	 * @see eu.etaxonomy.cdm.model.reference.StrictReferenceBase#getCitation()
381
	 */
382
	@Transient
383
	public String getCitation(){
384
		return nomRefBase.getCitation();
385
	}
386

    
387
	/* (non-Javadoc)
388
	 * @see eu.etaxonomy.cdm.model.reference.INomenclaturalReference#getNomenclaturalCitation(java.lang.String)
389
	 */
390
	@Transient
391
	public String getNomenclaturalCitation(String microReference) {
392
		return nomRefBase.getNomenclaturalCitation(microReference);
393
	}
394

    
395

    
396
	/* (non-Javadoc)
397
	 * @see eu.etaxonomy.cdm.model.reference.ReferenceBase#generateTitle()
398
	 */
399
	@Override
400
	public String generateTitle(){
401
		return nomRefBase.generateTitle();
402
	}
403

    
404
}
(3-3/26)