1
|
<RESOURCE_PROFILE>
|
2
|
<HEADER>
|
3
|
<RESOURCE_IDENTIFIER value="f766e91e-f6dc-4469-bd28-60a8158f03b9_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6
|
<RESOURCE_URI value=""/>
|
7
|
<DATE_OF_CREATION value="2023-06-23T10:24:52+00:00"/>
|
8
|
</HEADER>
|
9
|
<BODY>
|
10
|
<CONFIGURATION>
|
11
|
<IMPORTED/>
|
12
|
<SCRIPT>
|
13
|
<TITLE>EOSC SERVICES 2 DB (SERVICE MODEL)</TITLE>
|
14
|
<CODE><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
15
|
xmlns:dnet="eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions" version="2.0">
|
16
|
|
17
|
<xsl:output method="xml" indent="yes"/>
|
18
|
|
19
|
<xsl:param name="varDataSourceId"/>
|
20
|
<xsl:variable name="eoscPrefix" select="string('eosc________::')"/>
|
21
|
|
22
|
<xsl:template match="/">
|
23
|
<record>
|
24
|
<xsl:copy-of select=".//*[local-name() = 'header']"/>
|
25
|
<metadata>
|
26
|
<ROWS>
|
27
|
|
28
|
<xsl:for-each select="//results[@type = 'organization']">
|
29
|
<xsl:variable name="orgId" select="concat($eoscPrefix, ./id)"/>
|
30
|
|
31
|
<ROW table="dsm_organizations">
|
32
|
<FIELD name="_dnet_resource_identifier_">
|
33
|
<xsl:value-of select="$orgId"/>
|
34
|
</FIELD>
|
35
|
<FIELD name="id">
|
36
|
<xsl:value-of select="$orgId"/>
|
37
|
</FIELD>
|
38
|
<FIELD name="collectedfrom">
|
39
|
<xsl:value-of select="$varDataSourceId"/>
|
40
|
</FIELD>
|
41
|
<FIELD name="legalshortname">
|
42
|
<xsl:value-of select="./provider/abbreviation"/>
|
43
|
</FIELD>
|
44
|
<FIELD name="legalname">
|
45
|
<xsl:value-of select="./provider/name"/>
|
46
|
</FIELD>
|
47
|
<FIELD name="websiteurl">
|
48
|
<xsl:value-of select="./provider/website"/>
|
49
|
</FIELD>
|
50
|
<FIELD name="logourl">
|
51
|
<xsl:value-of select="./provider/logo"/>
|
52
|
</FIELD>
|
53
|
<FIELD name="country">
|
54
|
<xsl:value-of select="./provider/location/country"/>
|
55
|
</FIELD>
|
56
|
</ROW>
|
57
|
</xsl:for-each>
|
58
|
|
59
|
<xsl:for-each select="//results[@type = 'service']">
|
60
|
<xsl:variable name="orgId"
|
61
|
select="concat($eoscPrefix, .//resourceOrganisation)"/>
|
62
|
<xsl:variable name="serviceId" select="concat($orgId, '::', ./id)"/>
|
63
|
|
64
|
<xsl:variable name="jurisdictionOrig" select="normalize-space(.//jurisdiction)" />
|
65
|
<xsl:variable name="jurisdictionTmp">
|
66
|
<xsl:choose>
|
67
|
<xsl:when test="$jurisdictionOrig = 'ds_jurisdiction-global'">Global</xsl:when>
|
68
|
<xsl:when test="$jurisdictionOrig = 'ds_jurisdiction-institution'">Institutional</xsl:when>
|
69
|
<xsl:when test="$jurisdictionOrig = 'ds_jurisdiction-national'">National</xsl:when>
|
70
|
<xsl:when test="$jurisdictionOrig = 'ds_jurisdiction-regional'">Regional</xsl:when>
|
71
|
<xsl:when test="$jurisdictionOrig = 'ds_jurisdiction-research_infrastructure'">Research infrastructure</xsl:when>
|
72
|
<xsl:otherwise></xsl:otherwise>
|
73
|
</xsl:choose>
|
74
|
</xsl:variable>
|
75
|
<xsl:variable name="jurisdiction" select="normalize-space($jurisdictionTmp)"/>
|
76
|
|
77
|
<ROW table="dsm_services">
|
78
|
<FIELD name="_dnet_resource_identifier_">
|
79
|
<xsl:value-of select="$serviceId"/>
|
80
|
</FIELD>
|
81
|
<FIELD name="id">
|
82
|
<xsl:value-of select="$serviceId"/>
|
83
|
</FIELD>
|
84
|
|
85
|
<FIELD name="collectedfrom">
|
86
|
<xsl:value-of select="$varDataSourceId"/>
|
87
|
</FIELD>
|
88
|
|
89
|
<FIELD name="namespaceprefix">
|
90
|
<xsl:value-of select="dnet:generateNsPrefix('eosc', dnet:md5(normalize-space(./id)))" />
|
91
|
</FIELD>
|
92
|
|
93
|
<FIELD name="officialname">
|
94
|
<xsl:value-of select=".//name"/>
|
95
|
</FIELD>
|
96
|
<FIELD name="englishname">
|
97
|
<xsl:value-of select=".//abbreviation"/>
|
98
|
</FIELD>
|
99
|
<FIELD name="description">
|
100
|
<xsl:value-of select=".//description"/>
|
101
|
</FIELD>
|
102
|
<FIELD name="websiteurl">
|
103
|
<xsl:value-of select=".//webpage"/>
|
104
|
</FIELD>
|
105
|
<FIELD name="logourl">
|
106
|
<xsl:value-of select=".//logo"/>
|
107
|
</FIELD>
|
108
|
<FIELD name="contactemail">
|
109
|
<xsl:value-of select=".//helpdeskEmail"/>
|
110
|
</FIELD>
|
111
|
|
112
|
|
113
|
<FIELD name="languages">
|
114
|
<xsl:for-each
|
115
|
select=".//languageAvailabilities/languageAvailabilities">
|
116
|
<xsl:if test="position() > 1">
|
117
|
<xsl:text>,</xsl:text>
|
118
|
</xsl:if>
|
119
|
<xsl:value-of select="normalize-space(.)"/>
|
120
|
</xsl:for-each>
|
121
|
</FIELD>
|
122
|
|
123
|
<!-- eosc specific fields -->
|
124
|
<FIELD name="jurisdiction"><xsl:value-of select="$jurisdiction"/></FIELD>
|
125
|
<FIELD name="version_control" type="boolean"><xsl:value-of select=".//versionControl"/></FIELD>
|
126
|
|
127
|
<FIELD name="submission_policy_url"><xsl:value-of select=".//submissionPolicyURL"/></FIELD>
|
128
|
<FIELD name="preservation_policy_url"><xsl:value-of select=".//preservationPolicyURL"/></FIELD>
|
129
|
|
130
|
<FIELD name="research_entity_types" type="array">
|
131
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-funders']">
|
132
|
<ITEM>Funder</ITEM>
|
133
|
</xsl:if>
|
134
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-organizations']">
|
135
|
<ITEM>Organization</ITEM>
|
136
|
</xsl:if>
|
137
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-other_research_products']">
|
138
|
<ITEM>Research Products</ITEM>
|
139
|
</xsl:if>
|
140
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-projects']">
|
141
|
<ITEM>Projects</ITEM>
|
142
|
</xsl:if>
|
143
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-research_data']">
|
144
|
<ITEM>Research Data</ITEM>
|
145
|
</xsl:if>
|
146
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-research_publication']">
|
147
|
<ITEM>Research Publications</ITEM>
|
148
|
</xsl:if>
|
149
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-research_software']">
|
150
|
<ITEM>Software</ITEM>
|
151
|
</xsl:if>
|
152
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-researchers']">
|
153
|
<ITEM>Researchers</ITEM>
|
154
|
</xsl:if>
|
155
|
<xsl:if test=".//researchEntityTypes[.='ds_research_entity_type-services']">
|
156
|
<ITEM>Services</ITEM>
|
157
|
</xsl:if>
|
158
|
</FIELD>
|
159
|
|
160
|
<FIELD name="consenttermsofuse" type="boolean">
|
161
|
<xsl:value-of
|
162
|
select="string-length(normalize-space(.//termsOfUse)) &gt; 0"
|
163
|
/>
|
164
|
</FIELD>
|
165
|
|
166
|
<FIELD name="research_product_access_policies" type="array">
|
167
|
<xsl:for-each select=".//accessPolicy/text()|.//researchProductAccessPolicies/text()">
|
168
|
<xsl:if test="normalize-space(.)">
|
169
|
<ITEM>
|
170
|
<xsl:value-of select="normalize-space(.)"/>
|
171
|
</ITEM>
|
172
|
</xsl:if>
|
173
|
</xsl:for-each>
|
174
|
</FIELD>
|
175
|
|
176
|
<FIELD name="research_product_metadata_access_policies" type="array">
|
177
|
<xsl:for-each select=".//accessPolicy/text()|.//researchProductMetadataAccessPolicies/text()">
|
178
|
<xsl:if test="normalize-space(.)">
|
179
|
<ITEM>
|
180
|
<xsl:value-of select="normalize-space(.)"/>
|
181
|
</ITEM>
|
182
|
</xsl:if>
|
183
|
</xsl:for-each>
|
184
|
</FIELD>
|
185
|
|
186
|
<xsl:choose>
|
187
|
<xsl:when test="./datasource">
|
188
|
<!-- It is a datasource -->
|
189
|
<FIELD name="thematic" type="boolean">
|
190
|
<xsl:value-of select=".//thematic"/>
|
191
|
</FIELD>
|
192
|
|
193
|
<FIELD name="eosc_type">Data Source</FIELD>
|
194
|
|
195
|
<xsl:choose>
|
196
|
<xsl:when
|
197
|
test=".//datasourceClassification = 'ds_classification-aggregators'">
|
198
|
<FIELD name="eosc_datasource_type">Aggregator</FIELD>
|
199
|
<FIELD name="_typology_to_remove_">
|
200
|
<xsl:choose>
|
201
|
<xsl:when test=".//researchEntityTypes[.='ds_research_entity_type-research_data']">aggregator::datarepository</xsl:when>
|
202
|
<xsl:when test=".//researchEntityTypes[.='ds_research_entity_type-research_software']">aggregator::softwarerepository</xsl:when>
|
203
|
<xsl:when test="$jurisdiction = 'Institutional'">aggregator::pubsrepository::institutional</xsl:when>
|
204
|
<xsl:otherwise>aggregator::pubsrepository::unknown</xsl:otherwise>
|
205
|
</xsl:choose>
|
206
|
</FIELD>
|
207
|
</xsl:when>
|
208
|
<xsl:when
|
209
|
test=".//datasourceClassification = 'ds_classification-catalogue_of_research_products'">
|
210
|
<FIELD name="eosc_datasource_type">Catalogue</FIELD>
|
211
|
<FIELD name="_typology_to_remove_">pubscatalogue::unknown</FIELD>
|
212
|
</xsl:when>
|
213
|
<xsl:when
|
214
|
test=".//datasourceClassification = 'ds_classification-cris_system'">
|
215
|
<FIELD name="eosc_datasource_type">CRIS system</FIELD>
|
216
|
<FIELD name="_typology_to_remove_">crissystem</FIELD>
|
217
|
</xsl:when>
|
218
|
<xsl:when
|
219
|
test=".//datasourceClassification = 'ds_classification-journal_archive'">
|
220
|
<FIELD name="eosc_datasource_type">Journal archive</FIELD>
|
221
|
<FIELD name="_typology_to_remove_">pubsrepository::journal</FIELD>
|
222
|
</xsl:when>
|
223
|
<xsl:when
|
224
|
test=".//datasourceClassification = 'ds_classification-publisher_archive'">
|
225
|
<FIELD name="eosc_datasource_type">Publisher archive</FIELD>
|
226
|
<FIELD name="_typology_to_remove_">aggregator::pubsrepository::journals</FIELD>
|
227
|
</xsl:when>
|
228
|
<xsl:when
|
229
|
test=".//datasourceClassification = 'ds_classification-repository'">
|
230
|
<FIELD name="eosc_datasource_type">Repository</FIELD>
|
231
|
<FIELD name="_typology_to_remove_">
|
232
|
<xsl:choose>
|
233
|
<xsl:when test=".//thematic = 'true'">pubsrepository::thematic</xsl:when>
|
234
|
<xsl:when test="$jurisdiction = 'Institutional'">pubsrepository::institutional</xsl:when>
|
235
|
<xsl:when test=".//researchEntityTypes[.='ds_research_entity_type-other_research_products']">orprepository</xsl:when>
|
236
|
<xsl:when test=".//researchEntityTypes[.='ds_research_entity_type-research_software']">softwarerepository</xsl:when>
|
237
|
<xsl:when test=".//researchEntityTypes[.='ds_research_entity_type-research_data']">datarepository::unknown</xsl:when>
|
238
|
<xsl:otherwise>pubsrepository::unknown</xsl:otherwise>
|
239
|
</xsl:choose>
|
240
|
</FIELD>
|
241
|
</xsl:when>
|
242
|
<xsl:otherwise>
|
243
|
<FIELD name="eosc_datasource_type">Repository</FIELD>
|
244
|
<FIELD name="_typology_to_remove_">pubsrepository::unknown</FIELD>
|
245
|
</xsl:otherwise>
|
246
|
</xsl:choose>
|
247
|
</xsl:when>
|
248
|
<xsl:otherwise>
|
249
|
<!-- It is a generic service -->
|
250
|
<FIELD name="thematic" type="boolean">
|
251
|
<xsl:value-of
|
252
|
select="count(.//scientificDomain) = 1 and .//scientificDomain[1] != 'scientific_domain-generic'"
|
253
|
/>
|
254
|
</FIELD>
|
255
|
<FIELD name="eosc_type">Service</FIELD>
|
256
|
<FIELD name="_typology_to_remove_">service</FIELD>
|
257
|
</xsl:otherwise>
|
258
|
</xsl:choose>
|
259
|
</ROW>
|
260
|
|
261
|
<!-- DO NOT REMOVE: This ROW is used to anticipate the creation of the complete organization -->
|
262
|
<ROW table="dsm_organizations">
|
263
|
<FIELD name="_dnet_resource_identifier_">
|
264
|
<xsl:value-of select="$orgId"/>
|
265
|
</FIELD>
|
266
|
<FIELD name="id">
|
267
|
<xsl:value-of select="$orgId"/>
|
268
|
</FIELD>
|
269
|
</ROW>
|
270
|
|
271
|
<ROW table="dsm_service_organization">
|
272
|
<FIELD name="_dnet_resource_identifier_">
|
273
|
<xsl:value-of select="concat($orgId, '@@', $serviceId)"/>
|
274
|
</FIELD>
|
275
|
<FIELD name="service">
|
276
|
<xsl:value-of select="$serviceId"/>
|
277
|
</FIELD>
|
278
|
<FIELD name="organization">
|
279
|
<xsl:value-of select="$orgId"/>
|
280
|
</FIELD>
|
281
|
</ROW>
|
282
|
|
283
|
</xsl:for-each>
|
284
|
|
285
|
</ROWS>
|
286
|
</metadata>
|
287
|
|
288
|
</record>
|
289
|
</xsl:template>
|
290
|
|
291
|
</xsl:stylesheet>
|
292
|
</CODE>
|
293
|
</SCRIPT>
|
294
|
</CONFIGURATION>
|
295
|
<STATUS/>
|
296
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
297
|
</BODY>
|
298
|
</RESOURCE_PROFILE>
|