1
|
package eu.dnetlib.goldoa.domain;
|
2
|
|
3
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
4
|
|
5
|
import java.io.Serializable;
|
6
|
import javax.persistence.*;
|
7
|
|
8
|
import java.util.ArrayList;
|
9
|
import java.util.Date;
|
10
|
import java.util.List;
|
11
|
|
12
|
|
13
|
/**
|
14
|
* The persistent class for the publication database table.
|
15
|
*
|
16
|
*/
|
17
|
@Entity
|
18
|
public class Publication implements Serializable {
|
19
|
private static final long serialVersionUID = 1L;
|
20
|
|
21
|
public enum Type implements IsSerializable {
|
22
|
ARTICLE("article"),
|
23
|
MONOGRAPH("monograph"),
|
24
|
BOOK_CHAPTER("book chapter"),
|
25
|
CONFERENCE_PROCS("Conference Procs");
|
26
|
|
27
|
private String type;
|
28
|
|
29
|
Type(String type) {
|
30
|
this.type = type;
|
31
|
}
|
32
|
|
33
|
public String getType() {
|
34
|
return type;
|
35
|
}
|
36
|
}
|
37
|
|
38
|
|
39
|
@Temporal(TemporalType.DATE)
|
40
|
private Date acceptancedate;
|
41
|
|
42
|
//@Column(columnDefinition = "text")
|
43
|
private String alternativedoi;
|
44
|
//@Column(columnDefinition = "text")
|
45
|
private String alternativetitle;
|
46
|
|
47
|
@Temporal(TemporalType.DATE)
|
48
|
private Date date;
|
49
|
//@Column(columnDefinition = "text")
|
50
|
private String doi;
|
51
|
//@Column(columnDefinition = "text")
|
52
|
private String eventdetails;
|
53
|
|
54
|
@Id
|
55
|
//@Column(columnDefinition = "text")
|
56
|
private String id;
|
57
|
|
58
|
@OneToOne
|
59
|
@JoinColumn(name = "journal")
|
60
|
private Journal journal;
|
61
|
|
62
|
//@Column(columnDefinition = "text")
|
63
|
private String languages;
|
64
|
|
65
|
//@Column(columnDefinition = "text")
|
66
|
private String license;
|
67
|
|
68
|
@OneToOne
|
69
|
@JoinColumn(name = "publisher")
|
70
|
private Publisher publisher;
|
71
|
|
72
|
//@Column(columnDefinition = "text")
|
73
|
private String repository;
|
74
|
|
75
|
//@Column(columnDefinition = "text")
|
76
|
private String source;
|
77
|
|
78
|
//@Column(columnDefinition = "text")
|
79
|
private String subjects;
|
80
|
|
81
|
//@Column(columnDefinition = "text")
|
82
|
private String title;
|
83
|
|
84
|
//@Column(columnDefinition = "text")
|
85
|
@Basic
|
86
|
@Convert(converter=PublicationConverter.class)
|
87
|
private Type type;
|
88
|
|
89
|
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "publications")
|
90
|
private List<Affiliation> affiliations = new ArrayList<>();
|
91
|
|
92
|
@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
|
93
|
@JoinTable(name = "publication_author", joinColumns = {
|
94
|
@JoinColumn(name = "publication", nullable = false, updatable = false)
|
95
|
},
|
96
|
inverseJoinColumns = { @JoinColumn(name = "author",
|
97
|
nullable = false, updatable = false) })
|
98
|
private List<Author> authors = new ArrayList<>();
|
99
|
|
100
|
@OneToMany(mappedBy = "publication",cascade=CascadeType.ALL)
|
101
|
private List<Identifier> publicationIdentifiers = new ArrayList<>();
|
102
|
|
103
|
public Publication() {
|
104
|
}
|
105
|
|
106
|
public Date getAcceptancedate() {
|
107
|
return this.acceptancedate;
|
108
|
}
|
109
|
|
110
|
public void setAcceptancedate(Date acceptancedate) {
|
111
|
this.acceptancedate = acceptancedate;
|
112
|
}
|
113
|
|
114
|
public String getAlternativedoi() {
|
115
|
return this.alternativedoi;
|
116
|
}
|
117
|
|
118
|
public void setAlternativedoi(String alternativedoi) {
|
119
|
this.alternativedoi = alternativedoi;
|
120
|
}
|
121
|
|
122
|
public String getAlternativetitle() {
|
123
|
return this.alternativetitle;
|
124
|
}
|
125
|
|
126
|
public void setAlternativetitle(String alternativetitle) {
|
127
|
this.alternativetitle = alternativetitle;
|
128
|
}
|
129
|
|
130
|
public Date getDate() {
|
131
|
return this.date;
|
132
|
}
|
133
|
|
134
|
public void setDate(Date date) {
|
135
|
this.date = date;
|
136
|
}
|
137
|
|
138
|
public String getDoi() {
|
139
|
return this.doi;
|
140
|
}
|
141
|
|
142
|
public void setDoi(String doi) {
|
143
|
this.doi = doi;
|
144
|
}
|
145
|
|
146
|
public String getEventdetails() {
|
147
|
return this.eventdetails;
|
148
|
}
|
149
|
|
150
|
public void setEventdetails(String eventdetails) {
|
151
|
this.eventdetails = eventdetails;
|
152
|
}
|
153
|
|
154
|
public String getId() {
|
155
|
return this.id;
|
156
|
}
|
157
|
|
158
|
public void setId(String id) {
|
159
|
this.id = id;
|
160
|
}
|
161
|
|
162
|
public Journal getJournal() {
|
163
|
return this.journal;
|
164
|
}
|
165
|
|
166
|
public void setJournal(Journal journal) {
|
167
|
this.journal = journal;
|
168
|
}
|
169
|
|
170
|
public String getLanguages() {
|
171
|
return this.languages;
|
172
|
}
|
173
|
|
174
|
public void setLanguages(String languages) {
|
175
|
this.languages = languages;
|
176
|
}
|
177
|
|
178
|
public String getLicense() {
|
179
|
return this.license;
|
180
|
}
|
181
|
|
182
|
public void setLicense(String license) {
|
183
|
this.license = license;
|
184
|
}
|
185
|
|
186
|
public Publisher getPublisher() {
|
187
|
return this.publisher;
|
188
|
}
|
189
|
|
190
|
public void setPublisher(Publisher publisher) {
|
191
|
this.publisher = publisher;
|
192
|
}
|
193
|
|
194
|
public String getRepository() {
|
195
|
return this.repository;
|
196
|
}
|
197
|
|
198
|
public void setRepository(String repository) {
|
199
|
this.repository = repository;
|
200
|
}
|
201
|
|
202
|
public String getSource() {
|
203
|
return this.source;
|
204
|
}
|
205
|
|
206
|
public void setSource(String source) {
|
207
|
this.source = source;
|
208
|
}
|
209
|
|
210
|
public String getSubjects() {
|
211
|
return this.subjects;
|
212
|
}
|
213
|
|
214
|
public void setSubjects(String subjects) {
|
215
|
this.subjects = subjects;
|
216
|
}
|
217
|
|
218
|
public String getTitle() {
|
219
|
return this.title;
|
220
|
}
|
221
|
|
222
|
public void setTitle(String title) {
|
223
|
this.title = title;
|
224
|
}
|
225
|
|
226
|
public Type getType() {
|
227
|
return this.type;
|
228
|
}
|
229
|
|
230
|
public void setType(Type type) {
|
231
|
this.type = type;
|
232
|
}
|
233
|
|
234
|
public List<Identifier> getPublicationIdentifiers() {
|
235
|
return publicationIdentifiers;
|
236
|
}
|
237
|
|
238
|
public void setPublicationIdentifiers(List<Identifier> publicationIdentifiers) {
|
239
|
this.publicationIdentifiers = publicationIdentifiers;
|
240
|
}
|
241
|
|
242
|
public void addIdentifier(Identifier i){
|
243
|
this.publicationIdentifiers.add(i);
|
244
|
}
|
245
|
|
246
|
public void removeIdentifier(Identifier i){
|
247
|
this.publicationIdentifiers.remove(i);
|
248
|
}
|
249
|
|
250
|
public List<Affiliation> getAffiliations() {
|
251
|
return affiliations;
|
252
|
}
|
253
|
|
254
|
public void setAffiliations(List<Affiliation> affiliations) {
|
255
|
this.affiliations = affiliations;
|
256
|
}
|
257
|
|
258
|
public List<Author> getAuthors() {
|
259
|
return authors;
|
260
|
}
|
261
|
|
262
|
public void setAuthors(List<Author> authors) {
|
263
|
this.authors = authors;
|
264
|
}
|
265
|
|
266
|
|
267
|
}
|