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.ManyToOne;
|
15
|
import javax.persistence.Transient;
|
16
|
|
17
|
import org.apache.log4j.Logger;
|
18
|
import org.hibernate.annotations.Cascade;
|
19
|
import org.hibernate.annotations.CascadeType;
|
20
|
|
21
|
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
|
22
|
import eu.etaxonomy.cdm.model.common.TimePeriod;
|
23
|
import eu.etaxonomy.cdm.strategy.cache.reference.ArticleDefaultCacheStrategy;
|
24
|
import eu.etaxonomy.cdm.strategy.cache.reference.BookDefaultCacheStrategy;
|
25
|
import eu.etaxonomy.cdm.strategy.cache.reference.BookSectionDefaultCacheStrategy;
|
26
|
import eu.etaxonomy.cdm.strategy.cache.reference.INomenclaturalReferenceCacheStrategy;
|
27
|
|
28
|
/**
|
29
|
* @author m.doering
|
30
|
* @version 1.0
|
31
|
* @created 08-Nov-2007 13:06:10
|
32
|
*/
|
33
|
@Entity
|
34
|
public class Article extends StrictReferenceBase implements INomenclaturalReference {
|
35
|
static Logger logger = Logger.getLogger(Article.class);
|
36
|
private String series;
|
37
|
private String volume;
|
38
|
private String pages;
|
39
|
private Journal inJournal;
|
40
|
private NomenclaturalReferenceHelper nomRefBase = NomenclaturalReferenceHelper.NewInstance(this);
|
41
|
|
42
|
|
43
|
public static Article NewInstance(){
|
44
|
Article result = new Article();
|
45
|
return result;
|
46
|
}
|
47
|
|
48
|
public static Article NewInstance(Journal inJournal, TeamOrPersonBase authorTeam, String articleTitle, String pages, String series, TimePeriod datePublished ){
|
49
|
Article result = new Article();
|
50
|
result.setInJournal(inJournal);
|
51
|
result.setTitle(articleTitle);
|
52
|
result.setPages(pages);
|
53
|
result.setAuthorTeam(authorTeam);
|
54
|
result.setSeries(series);
|
55
|
result.setDatePublished(datePublished);
|
56
|
return result;
|
57
|
}
|
58
|
|
59
|
protected Article(){
|
60
|
super();
|
61
|
this.cacheStrategy = ArticleDefaultCacheStrategy.NewInstance();
|
62
|
}
|
63
|
|
64
|
|
65
|
|
66
|
@ManyToOne
|
67
|
@Cascade({CascadeType.SAVE_UPDATE})
|
68
|
public Journal getInJournal(){
|
69
|
return this.inJournal;
|
70
|
}
|
71
|
public void setInJournal(Journal inJournal){
|
72
|
this.inJournal = inJournal;
|
73
|
}
|
74
|
|
75
|
public String getSeries(){
|
76
|
return this.series;
|
77
|
}
|
78
|
|
79
|
/**
|
80
|
*
|
81
|
* @param series series
|
82
|
*/
|
83
|
public void setSeries(String series){
|
84
|
this.series = series;
|
85
|
}
|
86
|
|
87
|
public String getVolume(){
|
88
|
return this.volume;
|
89
|
}
|
90
|
|
91
|
/**
|
92
|
*
|
93
|
* @param volume volume
|
94
|
*/
|
95
|
public void setVolume(String volume){
|
96
|
this.volume = volume;
|
97
|
}
|
98
|
|
99
|
public String getPages(){
|
100
|
return this.pages;
|
101
|
}
|
102
|
|
103
|
/**
|
104
|
*
|
105
|
* @param pages pages
|
106
|
*/
|
107
|
public void setPages(String pages){
|
108
|
this.pages = pages;
|
109
|
}
|
110
|
|
111
|
|
112
|
/* (non-Javadoc)
|
113
|
* @see eu.etaxonomy.cdm.model.reference.StrictReferenceBase#getCitation()
|
114
|
*/
|
115
|
@Transient
|
116
|
public String getCitation(){
|
117
|
return nomRefBase.getCitation();
|
118
|
}
|
119
|
|
120
|
/* (non-Javadoc)
|
121
|
* @see eu.etaxonomy.cdm.model.reference.INomenclaturalReference#getNomenclaturalCitation(java.lang.String)
|
122
|
*/
|
123
|
@Transient
|
124
|
public String getNomenclaturalCitation(String microReference) {
|
125
|
return nomRefBase.getNomenclaturalCitation(microReference);
|
126
|
}
|
127
|
|
128
|
|
129
|
/* (non-Javadoc)
|
130
|
* @see eu.etaxonomy.cdm.model.reference.ReferenceBase#generateTitle()
|
131
|
*/
|
132
|
@Override
|
133
|
public String generateTitle(){
|
134
|
return nomRefBase.generateTitle();
|
135
|
}
|
136
|
|
137
|
}
|