Project

General

Profile

« Previous | Next » 

Revision 45839

View differences:

modules/dnet-springboot-apps/trunk/dnet-common-utils/src/main/java/eu/dnetlib/clients/dsManager/BrowsableField.java
1 1
package eu.dnetlib.clients.dsManager;
2 2

  
3

  
4 3
public class BrowsableField {
5 4

  
5
	private String id;
6
	private String label;
7

  
8
	public BrowsableField() {}
9

  
10
	public BrowsableField(final String id, final String label) {
11
		this.id = id;
12
		this.label = label;
13
	}
14

  
15
	public String getId() {
16
		return id;
17
	}
18

  
19
	public void setId(final String id) {
20
		this.id = id;
21
	}
22

  
23
	public String getLabel() {
24
		return label;
25
	}
26

  
27
	public void setLabel(final String label) {
28
		this.label = label;
29
	}
6 30
}
modules/dnet-springboot-apps/trunk/dnet-common-utils/src/main/java/eu/dnetlib/clients/dsManager/DatasourcePoint.java
1 1
package eu.dnetlib.clients.dsManager;
2 2

  
3

  
4 3
public class DatasourcePoint {
5 4

  
5
	private final String id;
6
	private final String name;
7
	private final float lat;
8
	private final float lng;
9

  
10
	public DatasourcePoint(final String id, final String name, final float lat, final float lng) {
11
		this.id = id;
12
		this.name = name;
13
		this.lat = lat;
14
		this.lng = lng;
15
	}
16

  
17
	public String getId() {
18
		return id;
19
	}
20

  
21
	public String getName() {
22
		return name;
23
	}
24

  
25
	public float getLat() {
26
		return lat;
27
	}
28

  
29
	public float getLng() {
30
		return lng;
31
	}
32

  
6 33
}
modules/dnet-springboot-apps/trunk/dnet-common-utils/src/main/java/eu/dnetlib/clients/dsManager/IfaceDesc.java
1 1
package eu.dnetlib.clients.dsManager;
2 2

  
3
import java.util.HashMap;
4
import java.util.Map;
5

  
3 6
public class IfaceDesc {
4 7

  
8
	private String id;
9
	private String typology;
10
	private String compliance;
11
	private String contentDescription;
12
	private String accessProtocol;
13
	private String baseUrl;
14
	private boolean active = false;
15
	private boolean removable = false;
16
	private Map<String, String> accessParams = new HashMap<>();
17
	private Map<String, String> extraFields = new HashMap<>();
18

  
5 19
	public String getId() {
6
		// TODO Auto-generated method stub
7
		return null;
20
		return id;
8 21
	}
9 22

  
23
	public void setId(final String id) {
24
		this.id = id;
25
	}
26

  
27
	public String getTypology() {
28
		return typology;
29
	}
30

  
31
	public void setTypology(final String typology) {
32
		this.typology = typology;
33
	}
34

  
35
	public String getCompliance() {
36
		return compliance;
37
	}
38

  
39
	public void setCompliance(final String compliance) {
40
		this.compliance = compliance;
41
	}
42

  
43
	public String getContentDescription() {
44
		return contentDescription;
45
	}
46

  
47
	public void setContentDescription(final String contentDescription) {
48
		this.contentDescription = contentDescription;
49
	}
50

  
51
	public String getAccessProtocol() {
52
		return accessProtocol;
53
	}
54

  
55
	public void setAccessProtocol(final String accessProtocol) {
56
		this.accessProtocol = accessProtocol;
57
	}
58

  
59
	public String getBaseUrl() {
60
		return baseUrl;
61
	}
62

  
63
	public void setBaseUrl(final String baseUrl) {
64
		this.baseUrl = baseUrl;
65
	}
66

  
67
	public boolean isActive() {
68
		return active;
69
	}
70

  
71
	public void setActive(final boolean active) {
72
		this.active = active;
73
	}
74

  
75
	public boolean isRemovable() {
76
		return removable;
77
	}
78

  
79
	public void setRemovable(final boolean removable) {
80
		this.removable = removable;
81
	}
82

  
83
	public Map<String, String> getAccessParams() {
84
		return accessParams;
85
	}
86

  
87
	public void setAccessParams(final Map<String, String> accessParams) {
88
		this.accessParams = accessParams;
89
	}
90

  
91
	public Map<String, String> getExtraFields() {
92
		return extraFields;
93
	}
94

  
95
	public void setExtraFields(final Map<String, String> extraFields) {
96
		this.extraFields = extraFields;
97
	}
98

  
10 99
}
modules/dnet-springboot-apps/trunk/dnet-common-utils/src/main/java/eu/dnetlib/clients/dsManager/BrowseTerm.java
1 1
package eu.dnetlib.clients.dsManager;
2 2

  
3
public class BrowseTerm implements Comparable<BrowseTerm> {
3 4

  
4
public class BrowseTerm {
5
	private final String id;
6
	private final String name;
7
	private final int value;
5 8

  
9
	public BrowseTerm(final String id, final String name, final int value) {
10
		this.id = id;
11
		this.name = name;
12
		this.value = value;
13
	}
14

  
15
	public String getId() {
16
		return id;
17
	}
18

  
19
	public int getValue() {
20
		return value;
21
	}
22

  
23
	public String getName() {
24
		return name;
25
	}
26

  
27
	@Override
28
	public int compareTo(final BrowseTerm o) {
29
		return Integer.compare(value, o.getValue());
30
	}
6 31
}
modules/dnet-springboot-apps/trunk/dnet-common-utils/src/main/java/eu/dnetlib/clients/dsManager/DatasourceDesc.java
1 1
package eu.dnetlib.clients.dsManager;
2 2

  
3
import java.util.ArrayList;
3 4
import java.util.Date;
5
import java.util.List;
4 6

  
5 7
public class DatasourceDesc {
6 8

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

  
61
	public String getId() {
62
		return id;
10 63
	}
11 64

  
12
	public CharSequence getEnglishName() {
13
		// TODO Auto-generated method stub
14
		return null;
65
	public void setId(final String id) {
66
		this.id = id;
15 67
	}
16 68

  
17
	public String getId() {
18
		// TODO Auto-generated method stub
19
		return null;
69
	public String getOfficialName() {
70
		return officialName;
20 71
	}
21 72

  
22
	public Object getOfficialName() {
23
		// TODO Auto-generated method stub
24
		return null;
73
	public void setOfficialName(final String officialName) {
74
		this.officialName = officialName;
25 75
	}
26 76

  
27
	public void setEnglishName(final Object officialName) {
28
		// TODO Auto-generated method stub
77
	public String getEnglishName() {
78
		return englishName;
79
	}
29 80

  
81
	public void setEnglishName(final String englishName) {
82
		this.englishName = englishName;
30 83
	}
31 84

  
85
	public String getWebsiteUrl() {
86
		return websiteUrl;
87
	}
88

  
89
	public void setWebsiteUrl(final String websiteUrl) {
90
		this.websiteUrl = websiteUrl;
91
	}
92

  
93
	public String getLogoUrl() {
94
		return logoUrl;
95
	}
96

  
97
	public void setLogoUrl(final String logoUrl) {
98
		this.logoUrl = logoUrl;
99
	}
100

  
101
	public String getContactEmail() {
102
		return contactEmail;
103
	}
104

  
105
	public void setContactEmail(final String contactEmail) {
106
		this.contactEmail = contactEmail;
107
	}
108

  
109
	public String getCountryCode() {
110
		return countryCode;
111
	}
112

  
113
	public void setCountryCode(final String countryCode) {
114
		this.countryCode = countryCode;
115
	}
116

  
117
	public String getCountryName() {
118
		return countryName;
119
	}
120

  
121
	public void setCountryName(final String countryName) {
122
		this.countryName = countryName;
123
	}
124

  
125
	public String getOrganization() {
126
		return organization;
127
	}
128

  
129
	public void setOrganization(final String organization) {
130
		this.organization = organization;
131
	}
132

  
133
	public Double getLatitude() {
134
		return latitude;
135
	}
136

  
137
	public void setLatitude(final Double latitude) {
138
		this.latitude = latitude;
139
	}
140

  
141
	public Double getLongitude() {
142
		return longitude;
143
	}
144

  
145
	public void setLongitude(final Double longitude) {
146
		this.longitude = longitude;
147
	}
148

  
149
	public Double getTimezone() {
150
		return timezone;
151
	}
152

  
153
	public void setTimezone(final Double timezone) {
154
		this.timezone = timezone;
155
	}
156

  
157
	public String getNamespacePrefix() {
158
		return namespacePrefix;
159
	}
160

  
161
	public void setNamespacePrefix(final String namespacePrefix) {
162
		this.namespacePrefix = namespacePrefix;
163
	}
164

  
165
	public String getOdNumberOfItems() {
166
		return odNumberOfItems;
167
	}
168

  
169
	public void setOdNumberOfItems(final String odNumberOfItems) {
170
		this.odNumberOfItems = odNumberOfItems;
171
	}
172

  
173
	public String getOdNumberOfItemsDate() {
174
		return odNumberOfItemsDate;
175
	}
176

  
177
	public void setOdNumberOfItemsDate(final String odNumberOfItemsDate) {
178
		this.odNumberOfItemsDate = odNumberOfItemsDate;
179
	}
180

  
181
	public String getOdPolicies() {
182
		return odPolicies;
183
	}
184

  
185
	public void setOdPolicies(final String odPolicies) {
186
		this.odPolicies = odPolicies;
187
	}
188

  
189
	public String getOdLanguages() {
190
		return odLanguages;
191
	}
192

  
193
	public void setOdLanguages(final String odLanguages) {
194
		this.odLanguages = odLanguages;
195
	}
196

  
197
	public String getOdContentTypes() {
198
		return odContentTypes;
199
	}
200

  
201
	public void setOdContentTypes(final String odContentTypes) {
202
		this.odContentTypes = odContentTypes;
203
	}
204

  
205
	public String getCollectedFrom() {
206
		return collectedFrom;
207
	}
208

  
209
	public void setCollectedFrom(final String collectedFrom) {
210
		this.collectedFrom = collectedFrom;
211
	}
212

  
213
	public Boolean getInferred() {
214
		return inferred;
215
	}
216

  
217
	public void setInferred(final Boolean inferred) {
218
		this.inferred = inferred;
219
	}
220

  
221
	public Boolean getDeletedByInference() {
222
		return deletedByInference;
223
	}
224

  
225
	public void setDeletedByInference(final Boolean deletedByInference) {
226
		this.deletedByInference = deletedByInference;
227
	}
228

  
229
	public Double getTrust() {
230
		return trust;
231
	}
232

  
233
	public void setTrust(final Double trust) {
234
		this.trust = trust;
235
	}
236

  
237
	public String getInferenceProvenance() {
238
		return inferenceProvenance;
239
	}
240

  
241
	public void setInferenceProvenance(final String inferenceProvenance) {
242
		this.inferenceProvenance = inferenceProvenance;
243
	}
244

  
245
	public Date getDateOfValidation() {
246
		return dateOfValidation;
247
	}
248

  
249
	public void setDateOfValidation(final Date dateOfValidation) {
250
		this.dateOfValidation = dateOfValidation;
251
	}
252

  
253
	public String getRegisteredBy() {
254
		return registeredBy;
255
	}
256

  
257
	public void setRegisteredBy(final String registeredBy) {
258
		this.registeredBy = registeredBy;
259
	}
260

  
261
	public String getDatasourceClass() {
262
		return datasourceClass;
263
	}
264

  
265
	public void setDatasourceClass(final String datasourceClass) {
266
		this.datasourceClass = datasourceClass;
267
	}
268

  
269
	public String getProvenanceActionClass() {
270
		return provenanceActionClass;
271
	}
272

  
273
	public void setProvenanceActionClass(final String provenanceActionClass) {
274
		this.provenanceActionClass = provenanceActionClass;
275
	}
276

  
277
	public Date getDateOfCollection() {
278
		return dateOfCollection;
279
	}
280

  
281
	public void setDateOfCollection(final Date dateOfCollection) {
282
		this.dateOfCollection = dateOfCollection;
283
	}
284

  
285
	public String getTypology() {
286
		return typology;
287
	}
288

  
289
	public void setTypology(final String typology) {
290
		this.typology = typology;
291
	}
292

  
293
	public String getActivationId() {
294
		return activationId;
295
	}
296

  
297
	public void setActivationId(final String activationId) {
298
		this.activationId = activationId;
299
	}
300

  
301
	public Boolean getMergehomonyms() {
302
		return mergehomonyms;
303
	}
304

  
305
	public void setMergehomonyms(final Boolean mergehomonyms) {
306
		this.mergehomonyms = mergehomonyms;
307
	}
308

  
309
	public String getDescription() {
310
		return description;
311
	}
312

  
313
	public void setDescription(final String description) {
314
		this.description = description;
315
	}
316

  
317
	public Date getReleaseStartDate() {
318
		return releaseStartDate;
319
	}
320

  
321
	public void setReleaseStartDate(final Date releaseStartDate) {
322
		this.releaseStartDate = releaseStartDate;
323
	}
324

  
325
	public Date getReleaseEndDate() {
326
		return releaseEndDate;
327
	}
328

  
329
	public void setReleaseEndDate(final Date releaseEndDate) {
330
		this.releaseEndDate = releaseEndDate;
331
	}
332

  
333
	public String getMissionStatementUrl() {
334
		return missionStatementUrl;
335
	}
336

  
337
	public void setMissionStatementUrl(final String missionStatementUrl) {
338
		this.missionStatementUrl = missionStatementUrl;
339
	}
340

  
341
	public Boolean getDataProvider() {
342
		return dataProvider;
343
	}
344

  
345
	public void setDataProvider(final Boolean dataProvider) {
346
		this.dataProvider = dataProvider;
347
	}
348

  
349
	public Boolean getServiceProvider() {
350
		return serviceProvider;
351
	}
352

  
353
	public void setServiceProvider(final Boolean serviceProvider) {
354
		this.serviceProvider = serviceProvider;
355
	}
356

  
357
	public String getDatabaseAccessType() {
358
		return databaseAccessType;
359
	}
360

  
361
	public void setDatabaseAccessType(final String databaseAccessType) {
362
		this.databaseAccessType = databaseAccessType;
363
	}
364

  
365
	public String getDataUploadType() {
366
		return dataUploadType;
367
	}
368

  
369
	public void setDataUploadType(final String dataUploadType) {
370
		this.dataUploadType = dataUploadType;
371
	}
372

  
373
	public String getDatabaseAccessRestriction() {
374
		return databaseAccessRestriction;
375
	}
376

  
377
	public void setDatabaseAccessRestriction(final String databaseAccessRestriction) {
378
		this.databaseAccessRestriction = databaseAccessRestriction;
379
	}
380

  
381
	public String getDataUploadRestriction() {
382
		return dataUploadRestriction;
383
	}
384

  
385
	public void setDataUploadRestriction(final String dataUploadRestriction) {
386
		this.dataUploadRestriction = dataUploadRestriction;
387
	}
388

  
389
	public Boolean getVersioning() {
390
		return versioning;
391
	}
392

  
393
	public void setVersioning(final Boolean versioning) {
394
		this.versioning = versioning;
395
	}
396

  
397
	public String getCitationGuidelineUrl() {
398
		return citationGuidelineUrl;
399
	}
400

  
401
	public void setCitationGuidelineUrl(final String citationGuidelineUrl) {
402
		this.citationGuidelineUrl = citationGuidelineUrl;
403
	}
404

  
405
	public String getQualityManagementKind() {
406
		return qualityManagementKind;
407
	}
408

  
409
	public void setQualityManagementKind(final String qualityManagementKind) {
410
		this.qualityManagementKind = qualityManagementKind;
411
	}
412

  
413
	public String getPidSystems() {
414
		return pidSystems;
415
	}
416

  
417
	public void setPidSystems(final String pidSystems) {
418
		this.pidSystems = pidSystems;
419
	}
420

  
421
	public String getCertificates() {
422
		return certificates;
423
	}
424

  
425
	public void setCertificates(final String certificates) {
426
		this.certificates = certificates;
427
	}
428

  
429
	public String getAggregator() {
430
		return aggregator;
431
	}
432

  
433
	public void setAggregator(final String aggregator) {
434
		this.aggregator = aggregator;
435
	}
436

  
437
	public String getIssn() {
438
		return issn;
439
	}
440

  
441
	public void setIssn(final String issn) {
442
		this.issn = issn;
443
	}
444

  
445
	public String getEissn() {
446
		return eissn;
447
	}
448

  
449
	public void setEissn(final String eissn) {
450
		this.eissn = eissn;
451
	}
452

  
453
	public String getLissn() {
454
		return lissn;
455
	}
456

  
457
	public void setLissn(final String lissn) {
458
		this.lissn = lissn;
459
	}
460

  
461
	public List<IfaceDesc> getInterfaces() {
462
		return interfaces;
463
	}
464

  
465
	public void setInterfaces(final List<IfaceDesc> interfaces) {
466
		this.interfaces = interfaces;
467
	}
468

  
32 469
}
modules/dnet-springboot-apps/trunk/dnet-common-utils/src/main/java/eu/dnetlib/clients/dsManager/SearchInterfacesEntry.java
1 1
package eu.dnetlib.clients.dsManager;
2 2

  
3
public class SearchInterfacesEntry implements Comparable<SearchInterfacesEntry> {
3 4

  
4
public class SearchInterfacesEntry {
5
	private String id;
6
	private String compliance;
7
	private String protocol;
8
	private boolean active;
9
	private String repoId = "unknown";
10
	private String repoName = "unknown";
11
	private String repoCountry = "-";
12
	private String repoPrefix = "";
13
	private String aggrDate = "";
14
	private int aggrTotal = 0;
5 15

  
16
	public String getId() {
17
		return id;
18
	}
19

  
20
	public void setId(final String id) {
21
		this.id = id;
22
	}
23

  
24
	public String getCompliance() {
25
		return compliance;
26
	}
27

  
28
	public void setCompliance(final String compliance) {
29
		this.compliance = compliance;
30
	}
31

  
32
	public String getProtocol() {
33
		return protocol;
34
	}
35

  
36
	public void setProtocol(final String protocol) {
37
		this.protocol = protocol;
38
	}
39

  
40
	public boolean isActive() {
41
		return active;
42
	}
43

  
44
	public void setActive(final boolean active) {
45
		this.active = active;
46
	}
47

  
48
	public String getRepoId() {
49
		return repoId;
50
	}
51

  
52
	public void setRepoId(final String repoId) {
53
		this.repoId = repoId;
54
	}
55

  
56
	public String getRepoName() {
57
		return repoName;
58
	}
59

  
60
	public void setRepoName(final String repoName) {
61
		this.repoName = repoName;
62
	}
63

  
64
	public String getRepoCountry() {
65
		return repoCountry;
66
	}
67

  
68
	public void setRepoCountry(final String repoCountry) {
69
		this.repoCountry = repoCountry;
70
	}
71

  
72
	public String getRepoPrefix() {
73
		return repoPrefix;
74
	}
75

  
76
	public void setRepoPrefix(final String repoPrefix) {
77
		this.repoPrefix = repoPrefix;
78
	}
79

  
80
	public String getAggrDate() {
81
		return aggrDate;
82
	}
83

  
84
	public void setAggrDate(final String aggrDate) {
85
		this.aggrDate = aggrDate;
86
	}
87

  
88
	public int getAggrTotal() {
89
		return aggrTotal;
90
	}
91

  
92
	public void setAggrTotal(final int aggrTotal) {
93
		this.aggrTotal = aggrTotal;
94
	}
95

  
96
	@Override
97
	public int compareTo(final SearchInterfacesEntry e) {
98
		return compliance.compareTo(e.getCompliance());
99
	}
6 100
}
modules/dnet-springboot-apps/trunk/dnet-common-utils/src/main/java/eu/dnetlib/clients/is/InformationServiceClient.java
141 141
	}
142 142

  
143 143
	public void updateProfileNode(final String profileId, final String xpath, final String node) throws InformationServiceException {
144
		xupdate(String.format("for $x in collection('/db/DRIVER')//RESOURCE_PROFILE[.//RESOURCE_IDENTIFIER/@value eq '%s']%s return update replace $x with %s",
144
		xupdate(String.format("for $x in doc('/db/DRIVER/%s')%s return update replace $x with %s",
145 145
				profileId, xpath, node));
146 146
	}
147 147

  

Also available in: Unified diff