Project

General

Profile

1
package eu.dnetlib.domain.data;
2

    
3
import eu.dnetlib.domain.DriverResource;
4

    
5
import java.util.*;
6

    
7
/**
8
 * The domain object for the Repository resource data structure
9
 * 
10
 */
11
public class Repository extends DriverResource{
12
	private static final long serialVersionUID = -7241644234046760972L;
13

    
14
	// new
15
	private String id;
16
	private String officialName;
17
	private String englishName;
18
	private String websiteUrl;
19
	private String logoUrl;
20
	private String contactEmail;
21
	private String countryName;
22
	private String countryCode;
23
	private String organization;
24
	private Double latitude = 0.0;
25
	private Double longitude = 0.0;
26
	private Double timezone = 0.0;
27
	private String namespacePrefix;
28
	private String odNumberOfItems;
29
	private String odNumberOfItemsDate;
30
	private String odPolicies;
31
	private String odLanguages;
32
	private String odContentTypes;
33
	private String collectedFrom;
34
	private Boolean inferred = false;
35
	private Boolean deletedByInference = false;
36
	private Double trust = 0.9;
37
	private String inferenceProvenance;
38
	private Date dateOfValidation;
39
	private String datasourceClass;
40
	private String provenanceActionClass;
41
	private Date dateOfCollection;
42
	private String typology;
43
	private String activationId;
44
	private Boolean mergehomonyms = true;
45
	private String description;
46
	private Date releaseStartDate;
47
	private Date releaseEndDate;
48
	private String missionStatementUrl;
49
	private Boolean dataProvider = false;
50
	private Boolean serviceProvider = false;
51
	private String databaseAccessType;
52
	private String dataUploadType;
53
	private String databaseAccessRestriction;
54
	private String dataUploadRestriction;
55
	private Boolean versioning = false;
56
	private String citationGuidelineUrl;
57
	private String qualityManagementKind;
58
	private String pidSystems;
59
	private String certificates;
60
	private String aggregator;
61
	private String issn;
62
	private String eissn;
63
	private String lissn;
64
	private List<RepositoryInterface> interfaces = new ArrayList<RepositoryInterface>();
65

    
66
	private String availableDiskSpace = null;
67
	private String securityParameters = null;
68
	private String protocol = null;
69
	private String registeredBy = null;
70

    
71
	private String datasourceType = null;
72
	private String datasourceAggregatorId = null;
73
	private String datasourceOriginalIdValue = null;
74
	private String datasourceOriginalIdProvenance = null;
75
	private Boolean datasourceAggregated = null;
76
	private String datasourceComplianceDegreeValue = null;
77
	private String datasourceComplianceDegreeEncoding = null;
78

    
79
	private Integer numberOfObjects = Integer.valueOf(0);
80
	private Integer maxSizeOfDatastructure = Integer.valueOf(0);
81
	private Integer maxNumberOfDataStructures = Integer.valueOf(0);
82

    
83
	private Boolean consentTermsOfUse;
84
	private Boolean fullTextDownload;
85
	private Date consentTermsOfUseDate;
86

    
87
	private Boolean registered = false;
88

    
89
	// QOS parameters
90
//	private String availability = null;
91
//	private String capacity = null;
92
//	private Integer responseTime = null;
93
//	private double throughput = 0.0D;
94

    
95
	// status parameters
96
//	private Integer handledDatastructure = null;
97
//	private Integer usedDiskspace = null;
98
//	private Date lastUpdate = null;
99

    
100
	// blackboard
101
//	private RepositoryBlackboard blackboard = null;
102

    
103
	private Map<String, String> extraFields = new HashMap<String, String>();
104

    
105
	// extra fields that need to be added to the XML schema
106
	// private String administratorEmail = null;
107
	// private String administratorName = null;
108
	// private String administratorContactInfo = null;
109

    
110
	// private List<RepositoryInterface> interfaces = new
111
	// ArrayList<RepositoryInterface>();
112
	private static List<DataCollectionType> dataCollectionTypes = new ArrayList<DataCollectionType>();
113

    
114

    
115
	private PiwikInfo piwikInfo;
116

    
117
	private List<String> environments = new ArrayList<String>();
118

    
119
	public Repository() {
120
		this.setDateOfCreation(new Date());
121
		this.setResourceKind("RepositoryServiceResources");
122
		this.setResourceType("RepositoryServiceResourceType");
123
	}
124

    
125
	public Map<String, String> getExtraFields() {
126
		return extraFields;
127
	}
128

    
129
	public void setExtraFields(Map<String, String> extraFields) {
130
		this.extraFields = extraFields;
131
	}
132

    
133
	public String getRegisteredBy() {
134
		return registeredBy;
135
	}
136

    
137
	public void setRegisteredBy(String registeredBy) {
138
		this.registeredBy = registeredBy;
139
	}
140

    
141
	public String getCountryName() {
142
		return countryName;
143
	}
144

    
145
	public void setCountryName(String countryName) {
146
		this.countryName = countryName;
147
	}
148

    
149
	public String getCountryCode() {
150
		return countryCode;
151
	}
152

    
153
	public void setCountryCode(String countryCode) {
154
		this.countryCode = countryCode;
155
	}
156

    
157
	public String getEnglishName() {
158
		return englishName;
159
	}
160

    
161
	public void setEnglishName(String englishName) {
162
		this.englishName = englishName;
163
	}
164

    
165
	
166
//	public String getId() {
167
//		return this.getResourceId();
168
//	}
169
//
170
//	public void setId(String id) {
171
//		this.setResourceId(id);
172
//	}
173

    
174
	public String getId() {
175
		return id;
176
	}
177

    
178
	public void setId(String id) {
179
		this.id = id;
180
	}
181

    
182
	public Integer getNumberOfObjects() {
183
		return numberOfObjects;
184
	}
185

    
186
	public String getDescription() {
187
		return description;
188
	}
189

    
190
	public void setDescription(String description) {
191
		this.description = description;
192
	}
193

    
194
	public void setNumberOfObjects(Integer numberOfObjects) {
195
		this.numberOfObjects = numberOfObjects;
196
	}
197

    
198
	public String getOfficialName() {
199
		return officialName;
200
	}
201

    
202
	public void setOfficialName(String officialName) {
203
		this.officialName = officialName;
204
	}
205

    
206
	public Date getRegistrationDate() {
207
		return this.getDateOfCreation();
208
	}
209

    
210
	public void setRegistrationDate(Date registrationDate) {
211
		this.setDateOfCreation(registrationDate);
212
	}
213

    
214
	public List<RepositoryInterface> getInterfaces() {
215
		return interfaces;
216
	}
217

    
218
	public void setInterfaces(List<RepositoryInterface> interfaces) {
219
		this.interfaces = interfaces;
220
	}
221

    
222
	public String getTypology() {
223
		return typology;
224
	}
225

    
226
	public void setTypology(String typology) {
227
		this.typology = typology;
228
	}
229

    
230
	public Double getLatitude() {
231
		return latitude;
232
	}
233

    
234
	public Double getTimezone() {
235
		return timezone;
236
	}
237

    
238
	public void setTimezone(Double timezone) throws IllegalArgumentException {
239
		if (timezone < -12 || timezone > 12 || (timezone % 0.5) != 0) {
240
			String t = String.valueOf(timezone);
241
			throw new IllegalArgumentException(
242
					"timezone must be in the range [-12.0, 12.0] and must me divided by 0.5. Value given is "
243
							+ t);
244
		}
245
		this.timezone = timezone;
246
	}
247
	public boolean equals(Object o) {
248
		if (!(o instanceof Repository))
249
			return false;
250
		else
251
			return this.equals((Repository) o);
252
	}
253

    
254
	public boolean equals(Repository r) {
255
		// TODO: fill with required fields...
256

    
257
		if (this.getEnglishName() != null && r.getEnglishName() == null) {
258
			return false;
259
		} else if (this.getEnglishName() == null
260
				&& r.getEnglishName() != null) {
261
			return false;
262
		} else if (this.getEnglishName() != null
263
				&& r.getEnglishName() != null) {
264
			return this.getEnglishName().equals(r.getEnglishName());
265
		}
266

    
267
		return true;
268
	}
269

    
270
	@Override
271
	public int hashCode() {
272
        return officialName.hashCode();
273
	}
274

    
275
	public String getAvailableDiskSpace() {
276
		return availableDiskSpace;
277
	}
278

    
279
	public void setAvailableDiskSpace(String availableDiskSpace) {
280
		this.availableDiskSpace = availableDiskSpace;
281
	}
282

    
283
	public String getSecurityParameters() {
284
		return securityParameters;
285
	}
286

    
287
	public void setSecurityParameters(String securityParameters) {
288
		this.securityParameters = securityParameters;
289
	}
290

    
291
	public Integer getMaxSizeOfDatastructure() {
292
		return maxSizeOfDatastructure;
293
	}
294

    
295
	public void setMaxSizeOfDatastructure(Integer maxSizeOfDatastructure) {
296
		this.maxSizeOfDatastructure = maxSizeOfDatastructure;
297
	}
298

    
299
	public Integer getMaxNumberOfDataStructures() {
300
		return maxNumberOfDataStructures;
301
	}
302

    
303
	public void setMaxNumberOfDataStructures(Integer maxNumberOfDataStructures) {
304
		this.maxNumberOfDataStructures = maxNumberOfDataStructures;
305
	}
306

    
307

    
308
	public Boolean isVerified() {
309
		return extraFields.containsKey("VERIFIED")
310
				&& extraFields.get("VERIFIED").toLowerCase().equals("yes");
311
	}
312

    
313
	public void setProtocol(String protocol) {
314
		this.protocol = protocol;
315
	}
316

    
317
	public String getProtocol() {
318
		return protocol;
319
	}
320

    
321
	public void setDatasourceType(String datasourceType) {
322
		this.datasourceType = datasourceType;
323
	}
324

    
325
	public String getDatasourceType() {
326
		return datasourceType;
327
	}
328

    
329
	public Boolean getDatasourceAggregated() {
330
		return datasourceAggregated;
331
	}
332

    
333
	public void setDatasourceAggregated(Boolean datasourceAggregated) {
334
		this.datasourceAggregated = datasourceAggregated;
335
	}
336

    
337
	public String getDatasourceComplianceDegreeValue() {
338
		return datasourceComplianceDegreeValue;
339
	}
340

    
341
	public void setDatasourceComplianceDegreeValue(
342
			String datasourceComplianceDegreeValue) {
343
		this.datasourceComplianceDegreeValue = datasourceComplianceDegreeValue;
344
	}
345

    
346
	public String getDatasourceComplianceDegreeEncoding() {
347
		return datasourceComplianceDegreeEncoding;
348
	}
349

    
350
	public void setDatasourceComplianceDegreeEncoding(
351
			String datasourceComplianceDegreeEncoding) {
352
		this.datasourceComplianceDegreeEncoding = datasourceComplianceDegreeEncoding;
353
	}
354

    
355
	public void setDatasourceAggregatorId(String datasourceAggregatorId) {
356
		this.datasourceAggregatorId = datasourceAggregatorId;
357
	}
358

    
359
	public String getDatasourceAggregatorId() {
360
		return datasourceAggregatorId;
361
	}
362

    
363
	public void setDatasourceOriginalIdValue(String datasourceOriginalIdValue) {
364
		this.datasourceOriginalIdValue = datasourceOriginalIdValue;
365
	}
366

    
367
	public String getDatasourceOriginalIdValue() {
368
		return datasourceOriginalIdValue;
369
	}
370

    
371
	public void setDatasourceOriginalIdProvenance(
372
			String datasourceOriginalIdProvenance) {
373
		this.datasourceOriginalIdProvenance = datasourceOriginalIdProvenance;
374
	}
375

    
376
	public String getDatasourceOriginalIdProvenance() {
377
		return datasourceOriginalIdProvenance;
378
	}
379

    
380
	public List<DataCollectionType> getDataCollectionTypes() {
381
		return dataCollectionTypes;
382
	}
383

    
384
	public void setDataCollectionTypes(
385
			List<DataCollectionType> dataCollectionTypes) {
386
		this.dataCollectionTypes = dataCollectionTypes;
387
	}
388

    
389
	public void setEnvironments(List<String> environments) {
390
		this.environments = environments;
391
	}
392

    
393
	public List<String> getEnvironments() {
394
		return environments;
395
	}
396

    
397
	// new
398

    
399
	public String getWebsiteUrl() {
400
		return websiteUrl;
401
	}
402

    
403
	public void setWebsiteUrl(String websiteUrl) {
404
		this.websiteUrl = websiteUrl;
405
	}
406

    
407
	public String getLogoUrl() {
408
		return logoUrl;
409
	}
410

    
411
	public void setLogoUrl(String logoUrl) {
412
		this.logoUrl = logoUrl;
413
	}
414

    
415
	public String getContactEmail() {
416
		return contactEmail;
417
	}
418

    
419
	public void setContactEmail(String contactEmail) {
420
		this.contactEmail = contactEmail;
421
	}
422

    
423
	public String getOrganization() {
424
		return organization;
425
	}
426

    
427
	public void setOrganization(String organization) {
428
		this.organization = organization;
429
	}
430

    
431
	public Double getLongitude() {
432
		return longitude;
433
	}
434

    
435
	public void setLongitude(Double longitude) {
436
		this.longitude = longitude;
437
	}
438

    
439
	public String getNamespacePrefix() {
440
		return namespacePrefix;
441
	}
442

    
443
	public void setNamespacePrefix(String namespacePrefix) {
444
		this.namespacePrefix = namespacePrefix;
445
	}
446

    
447
	public String getOdNumberOfItems() {
448
		return odNumberOfItems;
449
	}
450

    
451
	public void setOdNumberOfItems(String odNumberOfItems) {
452
		this.odNumberOfItems = odNumberOfItems;
453
	}
454

    
455
	public String getOdNumberOfItemsDate() {
456
		return odNumberOfItemsDate;
457
	}
458

    
459
	public void setOdNumberOfItemsDate(String odNumberOfItemsDate) {
460
		this.odNumberOfItemsDate = odNumberOfItemsDate;
461
	}
462

    
463
	public String getOdPolicies() {
464
		return odPolicies;
465
	}
466

    
467
	public void setOdPolicies(String odPolicies) {
468
		this.odPolicies = odPolicies;
469
	}
470

    
471
	public String getOdLanguages() {
472
		return odLanguages;
473
	}
474

    
475
	public void setOdLanguages(String odLanguages) {
476
		this.odLanguages = odLanguages;
477
	}
478

    
479
	public String getOdContentTypes() {
480
		return odContentTypes;
481
	}
482

    
483
	public void setOdContentTypes(String odContentTypes) {
484
		this.odContentTypes = odContentTypes;
485
	}
486

    
487
	public String getCollectedFrom() {
488
		return collectedFrom;
489
	}
490

    
491
	public void setCollectedFrom(String collectedFrom) {
492
		this.collectedFrom = collectedFrom;
493
	}
494

    
495
	public Boolean getInferred() {
496
		return inferred;
497
	}
498

    
499
	public void setInferred(Boolean inferred) {
500
		this.inferred = inferred;
501
	}
502

    
503
	public Boolean getDeletedByInference() {
504
		return deletedByInference;
505
	}
506

    
507
	public void setDeletedByInference(Boolean deletedByInference) {
508
		this.deletedByInference = deletedByInference;
509
	}
510

    
511
	public Double getTrust() {
512
		return trust;
513
	}
514

    
515
	public void setTrust(Double trust) {
516
		this.trust = trust;
517
	}
518

    
519
	public String getInferenceProvenance() {
520
		return inferenceProvenance;
521
	}
522

    
523
	public void setInferenceProvenance(String inferenceProvenance) {
524
		this.inferenceProvenance = inferenceProvenance;
525
	}
526

    
527
	public Date getDateOfValidation() {
528
		return dateOfValidation;
529
	}
530

    
531
	public void setDateOfValidation(Date dateOfValidation) {
532
		this.dateOfValidation = dateOfValidation;
533
	}
534

    
535
	public String getDatasourceClass() {
536
		return datasourceClass;
537
	}
538

    
539
	public void setDatasourceClass(String datasourceClass) {
540
		this.datasourceClass = datasourceClass;
541
	}
542

    
543
	public String getProvenanceActionClass() {
544
		return provenanceActionClass;
545
	}
546

    
547
	public void setProvenanceActionClass(String provenanceActionClass) {
548
		this.provenanceActionClass = provenanceActionClass;
549
	}
550

    
551
	public Date getDateOfCollection() {
552
		return dateOfCollection;
553
	}
554

    
555
	public void setDateOfCollection(Date dateOfCollection) {
556
		this.dateOfCollection = dateOfCollection;
557
	}
558

    
559
	public String getActivationId() {
560
		return activationId;
561
	}
562

    
563
	public void setActivationId(String activationId) {
564
		this.activationId = activationId;
565
	}
566

    
567
	public Boolean getMergehomonyms() {
568
		return mergehomonyms;
569
	}
570

    
571
	public void setMergehomonyms(Boolean mergehomonyms) {
572
		this.mergehomonyms = mergehomonyms;
573
	}
574

    
575
	public Date getReleaseStartDate() {
576
		return releaseStartDate;
577
	}
578

    
579
	public void setReleaseStartDate(Date releaseStartDate) {
580
		this.releaseStartDate = releaseStartDate;
581
	}
582

    
583
	public Date getReleaseEndDate() {
584
		return releaseEndDate;
585
	}
586

    
587
	public void setReleaseEndDate(Date releaseEndDate) {
588
		this.releaseEndDate = releaseEndDate;
589
	}
590

    
591
	public String getMissionStatementUrl() {
592
		return missionStatementUrl;
593
	}
594

    
595
	public void setMissionStatementUrl(String missionStatementUrl) {
596
		this.missionStatementUrl = missionStatementUrl;
597
	}
598

    
599
	public Boolean getDataProvider() {
600
		return dataProvider;
601
	}
602

    
603
	public void setDataProvider(Boolean dataProvider) {
604
		this.dataProvider = dataProvider;
605
	}
606

    
607
	public Boolean getServiceProvider() {
608
		return serviceProvider;
609
	}
610

    
611
	public void setServiceProvider(Boolean serviceProvider) {
612
		this.serviceProvider = serviceProvider;
613
	}
614

    
615
	public String getDatabaseAccessType() {
616
		return databaseAccessType;
617
	}
618

    
619
	public void setDatabaseAccessType(String databaseAccessType) {
620
		this.databaseAccessType = databaseAccessType;
621
	}
622

    
623
	public String getDataUploadType() {
624
		return dataUploadType;
625
	}
626

    
627
	public void setDataUploadType(String dataUploadType) {
628
		this.dataUploadType = dataUploadType;
629
	}
630

    
631
	public String getDatabaseAccessRestriction() {
632
		return databaseAccessRestriction;
633
	}
634

    
635
	public void setDatabaseAccessRestriction(String databaseAccessRestriction) {
636
		this.databaseAccessRestriction = databaseAccessRestriction;
637
	}
638

    
639
	public String getDataUploadRestriction() {
640
		return dataUploadRestriction;
641
	}
642

    
643
	public void setDataUploadRestriction(String dataUploadRestriction) {
644
		this.dataUploadRestriction = dataUploadRestriction;
645
	}
646

    
647
	public Boolean getVersioning() {
648
		return versioning;
649
	}
650

    
651
	public void setVersioning(Boolean versioning) {
652
		this.versioning = versioning;
653
	}
654

    
655
	public String getCitationGuidelineUrl() {
656
		return citationGuidelineUrl;
657
	}
658

    
659
	public void setCitationGuidelineUrl(String citationGuidelineUrl) {
660
		this.citationGuidelineUrl = citationGuidelineUrl;
661
	}
662

    
663
	public String getQualityManagementKind() {
664
		return qualityManagementKind;
665
	}
666

    
667
	public void setQualityManagementKind(String qualityManagementKind) {
668
		this.qualityManagementKind = qualityManagementKind;
669
	}
670

    
671
	public String getPidSystems() {
672
		return pidSystems;
673
	}
674

    
675
	public void setPidSystems(String pidSystems) {
676
		this.pidSystems = pidSystems;
677
	}
678

    
679
	public String getCertificates() {
680
		return certificates;
681
	}
682

    
683
	public void setCertificates(String certificates) {
684
		this.certificates = certificates;
685
	}
686

    
687
	public String getAggregator() {
688
		return aggregator;
689
	}
690

    
691
	public void setAggregator(String aggregator) {
692
		this.aggregator = aggregator;
693
	}
694

    
695
	public String getIssn() {
696
		return issn;
697
	}
698

    
699
	public void setIssn(String issn) {
700
		this.issn = issn;
701
	}
702

    
703
	public String getEissn() {
704
		return eissn;
705
	}
706

    
707
	public void setEissn(String eissn) {
708
		this.eissn = eissn;
709
	}
710

    
711
	public String getLissn() {
712
		return lissn;
713
	}
714

    
715
	public void setLissn(String lissn) {
716
		this.lissn = lissn;
717
	}
718

    
719
	public void setLatitude(Double latitude) {
720
		this.latitude = latitude;
721
	}
722

    
723
	public Boolean isRegistered() {
724
		return registered;
725
	}
726

    
727
	public void setRegistered(Boolean registered) {
728
		this.registered = registered;
729
	}
730

    
731
	public PiwikInfo getPiwikInfo() {
732
		return piwikInfo;
733
	}
734

    
735
	public void setPiwikInfo(PiwikInfo piwikInfo) {
736
		this.piwikInfo = piwikInfo;
737
	}
738

    
739
	public Boolean getConsentTermsOfUse() {
740
		return consentTermsOfUse;
741
	}
742

    
743
	public void setConsentTermsOfUse(Boolean consentTermsOfUse) {
744
		this.consentTermsOfUse = consentTermsOfUse;
745
	}
746

    
747
	public Boolean getFullTextDownload() {
748
		return fullTextDownload;
749
	}
750

    
751
	public void setFullTextDownload(Boolean fullTextDownload) {
752
		this.fullTextDownload = fullTextDownload;
753
	}
754

    
755
	public Date getConsentTermsOfUseDate() {
756
		return consentTermsOfUseDate;
757
	}
758

    
759
	public void setConsentTermsOfUseDate(Date consentTermsOfUseDate) {
760
		this.consentTermsOfUseDate = consentTermsOfUseDate;
761
	}
762
}
(12-12/23)