Project

General

Profile

1
package eu.dnetlib.enabling.datasources.common;
2

    
3
import java.sql.Date;
4
import java.util.Set;
5
import javax.persistence.*;
6

    
7
/**
8
 * Datasource
9
 */
10
@MappedSuperclass
11
public class Datasource<ORG extends Organization, ID extends Identity> {
12

    
13
	@Id
14
	protected String id;
15

    
16
	@Column(nullable = false)
17
	protected String officialname;
18
	protected String englishname;
19
	protected String websiteurl;
20
	protected String logourl;
21
	protected String contactemail;
22
	protected Double latitude;
23
	protected Double longitude;
24
	protected String timezone;
25

    
26
	@Column(name = "namespaceprefix", columnDefinition = "bpchar(12)", nullable = false, updatable = false)
27
	protected String namespaceprefix;
28

    
29
	protected String languages;
30

    
31
	protected String od_contenttypes;
32
	protected String collectedfrom;
33
	protected Date dateofvalidation;
34
	protected String typology;
35
	protected String provenanceaction;
36
	protected Date dateofcollection;
37
	protected String platform;
38

    
39
	@Column(name = "activationid")
40
	protected String activationId;
41
	protected String description;
42

    
43
	protected Date releasestartdate;
44
	protected Date releaseenddate;
45
	protected String missionstatementurl;
46
	protected Boolean dataprovider;
47
	protected Boolean serviceprovider;
48

    
49
	protected String databaseaccesstype;
50
	protected String datauploadtype;
51
	protected String databaseaccessrestriction;
52
	protected String datauploadrestriction;
53

    
54
	protected Boolean versioning;
55
	protected String citationguidelineurl;
56
	protected String qualitymanagementkind;
57
	protected String pidsystems;
58

    
59
	protected String certificates;
60
	protected String aggregator;
61

    
62
	protected String issn;
63
	protected String eissn;
64
	protected String lissn;
65

    
66
	protected String registeredby;
67

    
68
	private Date registrationdate;
69

    
70
	protected String subjects;
71

    
72
	protected Boolean managed;
73

    
74
	@Column(name = "consenttermsofuse")
75
	protected Boolean consentTermsOfUse;
76

    
77
	@Column(name = "consenttermsofusedate")
78
	protected Date consentTermsOfUseDate;
79

    
80
	@Column(name = "fulltextdownload")
81
	protected Boolean fullTextDownload;
82

    
83
	@ManyToMany(
84
			cascade = { CascadeType.PERSIST, CascadeType.MERGE },
85
			fetch = FetchType.LAZY)
86
	@JoinTable(
87
			name = "dsm_datasource_organization",
88
			joinColumns = @JoinColumn(name="datasource"),
89
			inverseJoinColumns = @JoinColumn(name="organization"))
90
	protected Set<ORG> organizations;
91

    
92
	@ManyToMany(
93
			cascade = { CascadeType.PERSIST, CascadeType.MERGE },
94
			fetch = FetchType.LAZY )
95
	@JoinTable(
96
			name = "dsm_datasourcepids",
97
			joinColumns = @JoinColumn(name = "datasource"),
98
			inverseJoinColumns = @JoinColumn(name = "pid"))
99
	protected Set<ID> identities;
100

    
101
	public Datasource() {}
102

    
103
	public String getId() {
104
		return id;
105
	}
106

    
107
	public String getOfficialname() {
108
		return officialname;
109
	}
110

    
111
	public String getEnglishname() {
112
		return englishname;
113
	}
114

    
115
	public String getWebsiteurl() {
116
		return websiteurl;
117
	}
118

    
119
	public String getLogourl() {
120
		return logourl;
121
	}
122

    
123
	public String getContactemail() {
124
		return contactemail;
125
	}
126

    
127
	public Double getLatitude() {
128
		return latitude;
129
	}
130

    
131
	public Double getLongitude() {
132
		return longitude;
133
	}
134

    
135
	public String getTimezone() {
136
		return timezone;
137
	}
138

    
139
	public String getNamespaceprefix() {
140
		return namespaceprefix;
141
	}
142

    
143
	public String getLanguages() {
144
		return languages;
145
	}
146

    
147
	public String getOd_contenttypes() {
148
		return od_contenttypes;
149
	}
150

    
151
	public String getCollectedfrom() {
152
		return collectedfrom;
153
	}
154

    
155
	public Date getDateofvalidation() {
156
		return dateofvalidation;
157
	}
158

    
159
	public String getTypology() {
160
		return typology;
161
	}
162

    
163
	public String getProvenanceaction() {
164
		return provenanceaction;
165
	}
166

    
167
	public Date getDateofcollection() {
168
		return dateofcollection;
169
	}
170

    
171
	public String getPlatform() {
172
		return platform;
173
	}
174

    
175
	public String getActivationId() {
176
		return activationId;
177
	}
178

    
179
	public String getDescription() {
180
		return description;
181
	}
182

    
183
	public Date getReleasestartdate() {
184
		return releasestartdate;
185
	}
186

    
187
	public Date getReleaseenddate() {
188
		return releaseenddate;
189
	}
190

    
191
	public String getMissionstatementurl() {
192
		return missionstatementurl;
193
	}
194

    
195
	public Boolean getDataprovider() {
196
		return dataprovider;
197
	}
198

    
199
	public Boolean getServiceprovider() {
200
		return serviceprovider;
201
	}
202

    
203
	public String getDatabaseaccesstype() {
204
		return databaseaccesstype;
205
	}
206

    
207
	public String getDatauploadtype() {
208
		return datauploadtype;
209
	}
210

    
211
	public String getDatabaseaccessrestriction() {
212
		return databaseaccessrestriction;
213
	}
214

    
215
	public String getDatauploadrestriction() {
216
		return datauploadrestriction;
217
	}
218

    
219
	public Boolean getVersioning() {
220
		return versioning;
221
	}
222

    
223
	public String getCitationguidelineurl() {
224
		return citationguidelineurl;
225
	}
226

    
227
	public String getQualitymanagementkind() {
228
		return qualitymanagementkind;
229
	}
230

    
231
	public String getPidsystems() {
232
		return pidsystems;
233
	}
234

    
235
	public String getCertificates() {
236
		return certificates;
237
	}
238

    
239
	public String getAggregator() {
240
		return aggregator;
241
	}
242

    
243
	public String getIssn() {
244
		return issn;
245
	}
246

    
247
	public String getEissn() {
248
		return eissn;
249
	}
250

    
251
	public String getLissn() {
252
		return lissn;
253
	}
254

    
255
	public String getRegisteredby() {
256
		return registeredby;
257
	}
258

    
259
	public Date getRegistrationdate() {
260
		return registrationdate;
261
	}
262

    
263
	public String getSubjects() {
264
		return subjects;
265
	}
266

    
267
	public Boolean getManaged() {
268
		return managed;
269
	}
270

    
271
	public Boolean getConsentTermsOfUse() {
272
		return consentTermsOfUse;
273
	}
274

    
275
	public Date getConsentTermsOfUseDate() {
276
		return consentTermsOfUseDate;
277
	}
278

    
279
	public Boolean getFullTextDownload() {
280
		return fullTextDownload;
281
	}
282

    
283
	public Set<ORG> getOrganizations() {
284
		return organizations;
285
	}
286

    
287
	public Set<ID> getIdentities() {
288
		return identities;
289
	}
290

    
291
	public Datasource<ORG, ID> setId(final String id) {
292
		this.id = id;
293
		return this;
294
	}
295

    
296
	public Datasource<ORG, ID> setOfficialname(final String officialname) {
297
		this.officialname = officialname;
298
		return this;
299
	}
300

    
301
	public Datasource<ORG, ID> setEnglishname(final String englishname) {
302
		this.englishname = englishname;
303
		return this;
304
	}
305

    
306
	public Datasource<ORG, ID> setWebsiteurl(final String websiteurl) {
307
		this.websiteurl = websiteurl;
308
		return this;
309
	}
310

    
311
	public Datasource<ORG, ID> setLogourl(final String logourl) {
312
		this.logourl = logourl;
313
		return this;
314
	}
315

    
316
	public Datasource<ORG, ID> setContactemail(final String contactemail) {
317
		this.contactemail = contactemail;
318
		return this;
319
	}
320

    
321
	public Datasource<ORG, ID> setLatitude(final Double latitude) {
322
		this.latitude = latitude;
323
		return this;
324
	}
325

    
326
	public Datasource<ORG, ID> setLongitude(final Double longitude) {
327
		this.longitude = longitude;
328
		return this;
329
	}
330

    
331
	public Datasource<ORG, ID> setTimezone(final String timezone) {
332
		this.timezone = timezone;
333
		return this;
334
	}
335

    
336
	public Datasource<ORG, ID> setNamespaceprefix(final String namespaceprefix) {
337
		this.namespaceprefix = namespaceprefix;
338
		return this;
339
	}
340

    
341
	public Datasource<ORG, ID> setLanguages(final String languages) {
342
		this.languages = languages;
343
		return this;
344
	}
345

    
346
	public Datasource<ORG, ID> setOd_contenttypes(final String od_contenttypes) {
347
		this.od_contenttypes = od_contenttypes;
348
		return this;
349
	}
350

    
351
	public Datasource<ORG, ID> setCollectedfrom(final String collectedfrom) {
352
		this.collectedfrom = collectedfrom;
353
		return this;
354
	}
355

    
356
	public Datasource<ORG, ID> setDateofvalidation(final Date dateofvalidation) {
357
		this.dateofvalidation = dateofvalidation;
358
		return this;
359
	}
360

    
361
	public Datasource<ORG, ID> setTypology(final String typology) {
362
		this.typology = typology;
363
		return this;
364
	}
365

    
366
	public Datasource<ORG, ID> setProvenanceaction(final String provenanceaction) {
367
		this.provenanceaction = provenanceaction;
368
		return this;
369
	}
370

    
371
	public Datasource<ORG, ID> setDateofcollection(final Date dateofcollection) {
372
		this.dateofcollection = dateofcollection;
373
		return this;
374
	}
375

    
376
	public Datasource<ORG, ID> setPlatform(final String platform) {
377
		this.platform = platform;
378
		return this;
379
	}
380

    
381
	public Datasource<ORG, ID> setActivationId(final String activationId) {
382
		this.activationId = activationId;
383
		return this;
384
	}
385

    
386
	public Datasource<ORG, ID> setDescription(final String description) {
387
		this.description = description;
388
		return this;
389
	}
390

    
391
	public Datasource<ORG, ID> setReleasestartdate(final Date releasestartdate) {
392
		this.releasestartdate = releasestartdate;
393
		return this;
394
	}
395

    
396
	public Datasource<ORG, ID> setReleaseenddate(final Date releaseenddate) {
397
		this.releaseenddate = releaseenddate;
398
		return this;
399
	}
400

    
401
	public Datasource<ORG, ID> setMissionstatementurl(final String missionstatementurl) {
402
		this.missionstatementurl = missionstatementurl;
403
		return this;
404
	}
405

    
406
	public Datasource<ORG, ID> setDataprovider(final Boolean dataprovider) {
407
		this.dataprovider = dataprovider;
408
		return this;
409
	}
410

    
411
	public Datasource<ORG, ID> setServiceprovider(final Boolean serviceprovider) {
412
		this.serviceprovider = serviceprovider;
413
		return this;
414
	}
415

    
416
	public Datasource<ORG, ID> setDatabaseaccesstype(final String databaseaccesstype) {
417
		this.databaseaccesstype = databaseaccesstype;
418
		return this;
419
	}
420

    
421
	public Datasource<ORG, ID> setDatauploadtype(final String datauploadtype) {
422
		this.datauploadtype = datauploadtype;
423
		return this;
424
	}
425

    
426
	public Datasource<ORG, ID> setDatabaseaccessrestriction(final String databaseaccessrestriction) {
427
		this.databaseaccessrestriction = databaseaccessrestriction;
428
		return this;
429
	}
430

    
431
	public Datasource<ORG, ID> setDatauploadrestriction(final String datauploadrestriction) {
432
		this.datauploadrestriction = datauploadrestriction;
433
		return this;
434
	}
435

    
436
	public Datasource<ORG, ID> setVersioning(final Boolean versioning) {
437
		this.versioning = versioning;
438
		return this;
439
	}
440

    
441
	public Datasource<ORG, ID> setCitationguidelineurl(final String citationguidelineurl) {
442
		this.citationguidelineurl = citationguidelineurl;
443
		return this;
444
	}
445

    
446
	public Datasource<ORG, ID> setQualitymanagementkind(final String qualitymanagementkind) {
447
		this.qualitymanagementkind = qualitymanagementkind;
448
		return this;
449
	}
450

    
451
	public Datasource<ORG, ID> setPidsystems(final String pidsystems) {
452
		this.pidsystems = pidsystems;
453
		return this;
454
	}
455

    
456
	public Datasource<ORG, ID> setCertificates(final String certificates) {
457
		this.certificates = certificates;
458
		return this;
459
	}
460

    
461
	public Datasource<ORG, ID> setAggregator(final String aggregator) {
462
		this.aggregator = aggregator;
463
		return this;
464
	}
465

    
466
	public Datasource<ORG, ID> setIssn(final String issn) {
467
		this.issn = issn;
468
		return this;
469
	}
470

    
471
	public Datasource<ORG, ID> setEissn(final String eissn) {
472
		this.eissn = eissn;
473
		return this;
474
	}
475

    
476
	public Datasource<ORG, ID> setLissn(final String lissn) {
477
		this.lissn = lissn;
478
		return this;
479
	}
480

    
481
	public Datasource<ORG, ID> setRegisteredby(final String registeredby) {
482
		this.registeredby = registeredby;
483
		return this;
484
	}
485

    
486
	public Datasource setRegistrationdate(final Date registrationdate) {
487
		this.registrationdate = registrationdate;
488
		return this;
489
	}
490

    
491
	public Datasource<ORG, ID> setSubjects(final String subjects) {
492
		this.subjects = subjects;
493
		return this;
494
	}
495

    
496
	public Datasource<ORG, ID> setManaged(final Boolean managed) {
497
		this.managed = managed;
498
		return this;
499
	}
500

    
501
	public void setConsentTermsOfUse(Boolean consentTermsOfUse) {
502
		this.consentTermsOfUse = consentTermsOfUse;
503
	}
504

    
505
	public Datasource<ORG, ID> setConsentTermsOfUseDate(Date consentTermsOfUseDate) {
506
		this.consentTermsOfUseDate = consentTermsOfUseDate;
507
		return this;
508
	}
509

    
510
	public void setFullTextDownload(Boolean fullTextDownload) {
511
		this.fullTextDownload = fullTextDownload;
512
	}
513

    
514
	public Datasource<ORG, ID> setOrganizations(final Set<ORG> organizations) {
515
		this.organizations = organizations;
516
		return this;
517
	}
518

    
519
	public Datasource<ORG, ID> setIdentities(final Set<ID> identities) {
520
		this.identities = identities;
521
		return this;
522
	}
523

    
524
}
(10-10/20)