Project

General

Profile

1
package eu.dnetlib.goldoa.domain;
2

    
3
import java.io.Serializable;
4
import javax.persistence.*;
5

    
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
public class Publication implements Serializable {
17
	private static final long serialVersionUID = 1L;
18

    
19

    
20
	@Id
21
	@Column(columnDefinition = "text")
22
	private String id;
23
	@Temporal(TemporalType.DATE)
24
	private Date acceptancedate;
25
	@Column(columnDefinition = "text")
26
	private String alternativedoi;
27
	@Column(columnDefinition = "text")
28
	private String alternativetitle;
29
	@Temporal(TemporalType.DATE)
30
	private Date date;
31
	@Column(columnDefinition = "text")
32
	private String doi;
33
	@Column(columnDefinition = "text")
34
	private String eventdetails;
35
	@Column(columnDefinition = "text")
36
	private String repository;
37
	@Column(columnDefinition = "text")
38
	private String source;
39
	@Column(columnDefinition = "text")
40
	private String subjects;
41
	@Column(columnDefinition = "text")
42
	private String title;
43
	@Column(columnDefinition = "text")
44
	private String languages;
45
	@Column(columnDefinition = "text")
46
	private String license;
47

    
48
	@OneToOne
49
	@JoinColumn(name = "journal")
50
	private Journal journal;
51

    
52
	@OneToOne
53
	@JoinColumn(name = "publisher")
54
	private Publisher publisher;
55

    
56
	@Basic
57
	@Convert(converter=PublicationConverter.class)
58
	private PublicationType type;
59

    
60
	@ManyToMany(fetch = FetchType.LAZY, mappedBy = "publications")
61
	private List<Author> authors = new ArrayList<>();
62

    
63
	@OneToMany(mappedBy = "publication",cascade=CascadeType.ALL)
64
	private List<Identifier> publicationIdentifiers = new ArrayList<>();
65

    
66
	public Publication() { }
67

    
68
	public Date getAcceptancedate() {
69
		return this.acceptancedate;
70
	}
71

    
72
	public void setAcceptancedate(Date acceptancedate) {
73
		this.acceptancedate = acceptancedate;
74
	}
75

    
76
	public String getAlternativedoi() {
77
		return this.alternativedoi;
78
	}
79

    
80
	public void setAlternativedoi(String alternativedoi) {
81
		this.alternativedoi = alternativedoi;
82
	}
83

    
84
	public String getAlternativetitle() {
85
		return this.alternativetitle;
86
	}
87

    
88
	public void setAlternativetitle(String alternativetitle) {
89
		this.alternativetitle = alternativetitle;
90
	}
91

    
92
	public Date getDate() {
93
		return this.date;
94
	}
95

    
96
	public void setDate(Date date) {
97
		this.date = date;
98
	}
99

    
100
	public String getDoi() {
101
		return this.doi;
102
	}
103

    
104
	public void setDoi(String doi) {
105
		this.doi = doi;
106
	}
107

    
108
	public String getEventdetails() {
109
		return this.eventdetails;
110
	}
111

    
112
	public void setEventdetails(String eventdetails) {
113
		this.eventdetails = eventdetails;
114
	}
115

    
116
	public String getId() {
117
		return this.id;
118
	}
119

    
120
	public void setId(String id) {
121
		this.id = id;
122
	}
123

    
124
	public Journal getJournal() {
125
		return this.journal;
126
	}
127

    
128
	public void setJournal(Journal journal) {
129
		this.journal = journal;
130
	}
131

    
132
	public String getLanguages() {
133
		return this.languages;
134
	}
135

    
136
	public void setLanguages(String languages) {
137
		this.languages = languages;
138
	}
139

    
140
	public String getLicense() {
141
		return this.license;
142
	}
143

    
144
	public void setLicense(String license) {
145
		this.license = license;
146
	}
147

    
148
	public Publisher getPublisher() {
149
		return this.publisher;
150
	}
151

    
152
	public void setPublisher(Publisher publisher) {
153
		this.publisher = publisher;
154
	}
155

    
156
	public String getRepository() {
157
		return this.repository;
158
	}
159

    
160
	public void setRepository(String repository) {
161
		this.repository = repository;
162
	}
163

    
164
	public String getSource() {
165
		return this.source;
166
	}
167

    
168
	public void setSource(String source) {
169
		this.source = source;
170
	}
171

    
172
	public String getSubjects() {
173
		return this.subjects;
174
	}
175

    
176
	public void setSubjects(String subjects) {
177
		this.subjects = subjects;
178
	}
179

    
180
	public String getTitle() {
181
		return this.title;
182
	}
183

    
184
	public void setTitle(String title) {
185
		this.title = title;
186
	}
187

    
188
	public PublicationType getType() {
189
		return this.type;
190
	}
191

    
192
	public void setType(PublicationType type) {
193
		this.type = type;
194
	}
195

    
196
	public List<Identifier> getPublicationIdentifiers() {
197
		return publicationIdentifiers;
198
	}
199

    
200
	public void setPublicationIdentifiers(List<Identifier> publicationIdentifiers) {
201
		this.publicationIdentifiers = publicationIdentifiers;
202
	}
203

    
204
	public void addIdentifier(Identifier i){
205
		this.publicationIdentifiers.add(i);
206
	}
207

    
208
	public void removeIdentifier(Identifier i){
209
		this.publicationIdentifiers.remove(i);
210
	}
211

    
212
	public List<Author> getAuthors() {
213
		return authors;
214
	}
215

    
216
	public void setAuthors(List<Author> authors) {
217
		this.authors = authors;
218
	}
219

    
220

    
221
}
(32-32/53)