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