Revision 44209
Added by Alessia Bardi about 8 years ago
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/row_2_mdstore.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet version="1.0" |
|
3 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xmlns:datetime="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" |
|
5 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
|
6 |
exclude-result-prefixes="xsl datetime exslt xsi" xmlns:dri="http://www.driver-repository.eu/namespace/dri"> |
|
7 |
|
|
8 |
<xsl:param name="datasourceId" /> |
|
9 |
|
|
10 |
<xsl:template match="/"> |
|
11 |
<record xmlns:dri="http://www.driver-repository.eu/namespace/dri"> |
|
12 |
<header> |
|
13 |
<dri:objIdentifier> |
|
14 |
<xsl:value-of select="concat($datasourceId, '::', normalize-space(//FIELD[@name='_dnet_resource_identifier_']))"/> |
|
15 |
</dri:objIdentifier> |
|
16 |
<dri:dateOfCollection> |
|
17 |
<xsl:value-of select="datetime:dateTime()" /> |
|
18 |
</dri:dateOfCollection> |
|
19 |
<dri:repositoryId> |
|
20 |
<xsl:value-of select="$datasourceId" /> |
|
21 |
</dri:repositoryId> |
|
22 |
</header> |
|
23 |
<metadata> |
|
24 |
<xsl:copy-of select="." /> |
|
25 |
</metadata> |
|
26 |
</record> |
|
27 |
</xsl:template> |
|
28 |
|
|
29 |
</xsl:stylesheet> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/nhmrc_2_db.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
3 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:fn="http://www.w3.org/2005/xpath-functions" |
|
4 |
xmlns:ands="http://ands.org.au/standards/rif-cs/registryObjects"> |
|
5 |
|
|
6 |
<xsl:output indent="yes"/> |
|
7 |
|
|
8 |
<xsl:param name="parentDatasourceId" /> |
|
9 |
|
|
10 |
<xsl:template match="/"> |
|
11 |
<record xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
12 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
13 |
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
14 |
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"> |
|
15 |
|
|
16 |
<xsl:copy-of select=".//*[local-name()='header']"/> |
|
17 |
|
|
18 |
<metadata> |
|
19 |
<ROWS> |
|
20 |
<xsl:for-each select="//ands:registryObject[@group='National Health and Medical Research Council']/ands:activity[@type='grant']"> |
|
21 |
<xsl:variable name="projectId" select="concat('nhmrc_______::', normalize-space(./ands:identifier[@type='nhmrc']))"/> |
|
22 |
<xsl:variable name="fundingId"> |
|
23 |
<xsl:choose> |
|
24 |
<xsl:when test="string-length(./ands:description[@type='fundingScheme']) > 0"> |
|
25 |
<xsl:value-of select="concat('nhmrc_______::NHMRC::', normalize-space(./ands:description[@type='fundingScheme']))"/> |
|
26 |
</xsl:when> |
|
27 |
<xsl:otherwise> |
|
28 |
<xsl:value-of select="string('nhmrc_______::NHMRC')"/> |
|
29 |
</xsl:otherwise> |
|
30 |
</xsl:choose> |
|
31 |
</xsl:variable> |
|
32 |
|
|
33 |
<ROW table="projects"> |
|
34 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$projectId" /></FIELD> |
|
35 |
<FIELD name="id"><xsl:value-of select="$projectId" /></FIELD> |
|
36 |
<FIELD name="code"><xsl:value-of select="normalize-space(.//ands:identifier[@type='nhmrc'])" /></FIELD> |
|
37 |
<FIELD name="title"><xsl:value-of select="./ands:name[@type='primary']/ands:namePart" /></FIELD> |
|
38 |
<FIELD name="websiteurl"><xsl:value-of select="./ands:identifier[@type='purl']"/></FIELD> |
|
39 |
|
|
40 |
<xsl:for-each select="./ands:existenceDates/ands:startDate[@dateFormat='W3CDTF']"> |
|
41 |
<FIELD name="startdate" type="date" format="dd-MM-yyyy"><xsl:value-of select="concat('01-01-', normalize-space(.))" /></FIELD> |
|
42 |
</xsl:for-each> |
|
43 |
<xsl:for-each select="./ands:existenceDates/ands:endDate[@dateFormat='W3CDTF']"> |
|
44 |
<FIELD name="enddate" type="date" format="dd-MM-yyyy"><xsl:value-of select="concat('31-12-', normalize-space(.))" /></FIELD> |
|
45 |
</xsl:for-each> |
|
46 |
|
|
47 |
<xsl:variable name="keywords"> |
|
48 |
<xsl:for-each select="./ands:subject[@type='local']"> |
|
49 |
<xsl:if test="position() != 1">, </xsl:if> |
|
50 |
<xsl:value-of select="."/> |
|
51 |
</xsl:for-each> |
|
52 |
</xsl:variable> |
|
53 |
<FIELD name="keywords"><xsl:value-of select="normalize-space($keywords)" /></FIELD> |
|
54 |
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD> |
|
55 |
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD> |
|
56 |
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD> |
|
57 |
</ROW> |
|
58 |
|
|
59 |
<ROW table="project_fundingpath"> |
|
60 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($fundingId, '@@', $projectId)" /></FIELD> |
|
61 |
<FIELD name="funding"><xsl:value-of select="$fundingId" /></FIELD> |
|
62 |
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD> |
|
63 |
<xsl:for-each select="./ands:existenceDates/ands:startDate[@dateFormat='W3CDTF']"> |
|
64 |
<FIELD name="startdate" type="date" format="dd-MM-yyyy"><xsl:value-of select="concat('01-01-', normalize-space(.))" /></FIELD> |
|
65 |
</xsl:for-each> |
|
66 |
<xsl:for-each select="./ands:existenceDates/ands:endDate[@dateFormat='W3CDTF']"> |
|
67 |
<FIELD name="enddate" type="date" format="dd-MM-yyyy"><xsl:value-of select="concat('31-12-', normalize-space(.))" /></FIELD> |
|
68 |
</xsl:for-each> |
|
69 |
</ROW> |
|
70 |
|
|
71 |
</xsl:for-each> |
|
72 |
</ROWS> |
|
73 |
</metadata> |
|
74 |
</record> |
|
75 |
</xsl:template> |
|
76 |
</xsl:stylesheet> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/xsl/croatian_csf_projects_contexts.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
3 |
xmlns:fn="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="fn"> |
|
4 |
|
|
5 |
<xsl:variable name="namespacePrefix" select="string('irb_hr______')"/> |
|
6 |
|
|
7 |
<xsl:template match="/"> |
|
8 |
<xsl:choose> |
|
9 |
<xsl:when test="//csvRecord/column[@name = 'FUNDER_NAME']/text() = 'HRZZ'"> |
|
10 |
<fundingtree> |
|
11 |
<funder> |
|
12 |
<id> |
|
13 |
<xsl:value-of select="concat($namespacePrefix, '::HRZZ')"/> |
|
14 |
</id> |
|
15 |
<shortname>HRZZ</shortname> |
|
16 |
<name>Croatian Science Foundation (CSF)</name> |
|
17 |
<originalname>Hrvatska zaklada za znanost</originalname> |
|
18 |
<jurisdiction>HR</jurisdiction> |
|
19 |
</funder> |
|
20 |
</fundingtree> |
|
21 |
</xsl:when> |
|
22 |
<xsl:otherwise> |
|
23 |
<fundingtree/> |
|
24 |
</xsl:otherwise> |
|
25 |
</xsl:choose> |
|
26 |
</xsl:template> |
|
27 |
|
|
28 |
|
|
29 |
</xsl:stylesheet> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" ?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<parent> |
|
4 |
<groupId>eu.dnetlib</groupId> |
|
5 |
<artifactId>dnet-parent</artifactId> |
|
6 |
<version>1.0.0</version> |
|
7 |
<relativePath /> |
|
8 |
</parent> |
|
9 |
<modelVersion>4.0.0</modelVersion> |
|
10 |
<groupId>eu.dnetlib</groupId> |
|
11 |
<artifactId>dnet-openaireplus-workflows</artifactId> |
|
12 |
<packaging>jar</packaging> |
|
13 |
<version>5.4.16</version> |
|
14 |
<scm> |
|
15 |
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16</developerConnection> |
|
16 |
</scm> |
|
17 |
<repositories> |
|
18 |
<repository> |
|
19 |
<id>dfm-releases</id> |
|
20 |
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dfm-releases</url> |
|
21 |
</repository> |
|
22 |
</repositories> |
|
23 |
<dependencies> |
|
24 |
<dependency> |
|
25 |
<groupId>eu.dnetlib</groupId> |
|
26 |
<artifactId>cnr-data-flow-monitoring-core</artifactId> |
|
27 |
<version>[0.1.0,1.0.0)</version> |
|
28 |
<exclusions> |
|
29 |
<exclusion> |
|
30 |
<artifactId>wstx-asl</artifactId> |
|
31 |
<groupId>org.codehaus.woodstox</groupId> |
|
32 |
</exclusion> |
|
33 |
</exclusions> |
|
34 |
</dependency> |
|
35 |
<dependency> |
|
36 |
<groupId>eu.dnetlib</groupId> |
|
37 |
<artifactId>cnr-enabling-database-api</artifactId> |
|
38 |
<version>[2.0.0,3.0.0)</version> |
|
39 |
</dependency> |
|
40 |
<dependency> |
|
41 |
<groupId>eu.dnetlib</groupId> |
|
42 |
<artifactId>dnet-msro-service</artifactId> |
|
43 |
<version>[3.0.0,4.0.0)</version> |
|
44 |
</dependency> |
|
45 |
<dependency> |
|
46 |
<groupId>eu.dnetlib</groupId> |
|
47 |
<artifactId>cnr-resultset-service</artifactId> |
|
48 |
<version>[2.0.0,3.0.0)</version> |
|
49 |
</dependency> |
|
50 |
<dependency> |
|
51 |
<groupId>eu.dnetlib</groupId> |
|
52 |
<artifactId>dnet-openaireplus-datasource-manager-service</artifactId> |
|
53 |
<version>[5.0.0,6.0.0)</version> |
|
54 |
</dependency> |
|
55 |
<dependency> |
|
56 |
<groupId>eu.dnetlib</groupId> |
|
57 |
<artifactId>dnet-openaireplus-mapping-utils</artifactId> |
|
58 |
<version>[5.0.0,6.0.0)</version> |
|
59 |
</dependency> |
|
60 |
<dependency> |
|
61 |
<groupId>eu.dnetlib</groupId> |
|
62 |
<artifactId>dnet-hadoop-service-rmi</artifactId> |
|
63 |
<version>[1.0.0,2.0.0)</version> |
|
64 |
</dependency> |
|
65 |
<dependency> |
|
66 |
<groupId>eu.dnetlib</groupId> |
|
67 |
<artifactId>dnet-index-solr-common</artifactId> |
|
68 |
<version>[1.0.0,2.0.0)</version> |
|
69 |
</dependency> |
|
70 |
<dependency> |
|
71 |
<groupId>eu.dnetlib</groupId> |
|
72 |
<artifactId>dnet-collector-plugins</artifactId> |
|
73 |
<version>[1.0.0,2.0.0)</version> |
|
74 |
</dependency> |
|
75 |
|
|
76 |
|
|
77 |
<dependency> |
|
78 |
<groupId>eu.dnetlib</groupId> |
|
79 |
<artifactId>dnet-actionmanager-api</artifactId> |
|
80 |
<version>[4.0.0,5.0.0)</version> |
|
81 |
</dependency> |
|
82 |
|
|
83 |
<dependency> |
|
84 |
<groupId>eu.dnetlib</groupId> |
|
85 |
<artifactId>dnet-oai-common-workflows</artifactId> |
|
86 |
<version>[3.0.0,4.0.0)</version> |
|
87 |
</dependency> |
|
88 |
|
|
89 |
<dependency> |
|
90 |
<groupId>eu.dnetlib</groupId> |
|
91 |
<artifactId>dnet-index-solr-client</artifactId> |
|
92 |
<version>[2.0.0,2.9.9)</version> |
|
93 |
</dependency> |
|
94 |
|
|
95 |
<dependency> |
|
96 |
<groupId>eu.dnetlib</groupId> |
|
97 |
<artifactId>dnet-validator-workflows</artifactId> |
|
98 |
<version>[1.0.0,2.0.0)</version> |
|
99 |
</dependency> |
|
100 |
|
|
101 |
<dependency> |
|
102 |
<groupId>eu.dnetlib</groupId> |
|
103 |
<artifactId>dnet-deduplication</artifactId> |
|
104 |
<version>[1.0.0,2.0.0)</version> |
|
105 |
</dependency> |
|
106 |
|
|
107 |
<!-- modular ui and servlet api are here because of the stats controller --> |
|
108 |
<dependency> |
|
109 |
<groupId>eu.dnetlib</groupId> |
|
110 |
<artifactId>dnet-modular-vocabularies-ui</artifactId> |
|
111 |
<version>[2.0.0,3.0.0)</version> |
|
112 |
</dependency> |
|
113 |
|
|
114 |
<dependency> |
|
115 |
<groupId>org.apache.velocity</groupId> |
|
116 |
<artifactId>velocity</artifactId> |
|
117 |
<version>1.7</version> |
|
118 |
</dependency> |
|
119 |
<dependency> |
|
120 |
<groupId>org.apache.velocity</groupId> |
|
121 |
<artifactId>velocity-tools</artifactId> |
|
122 |
<version>2.0</version> |
|
123 |
</dependency> |
|
124 |
<dependency> |
|
125 |
<groupId>javax.servlet</groupId> |
|
126 |
<artifactId>javax.servlet-api</artifactId> |
|
127 |
<version>${javax.servlet.version}</version> |
|
128 |
<scope>provided</scope> |
|
129 |
</dependency> |
|
130 |
<dependency> |
|
131 |
<groupId>junit</groupId> |
|
132 |
<artifactId>junit</artifactId> |
|
133 |
<version>${junit.version}</version> |
|
134 |
<scope>test</scope> |
|
135 |
</dependency> |
|
136 |
<dependency> |
|
137 |
<groupId>eu.dnetlib</groupId> |
|
138 |
<artifactId>dnet-openaireplus-profiles</artifactId> |
|
139 |
<version>[1.0.0,2.0.0)</version> |
|
140 |
<scope>test</scope> |
|
141 |
</dependency> |
|
142 |
</dependencies> |
|
143 |
|
|
144 |
</project> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/xsl/corda_h2020_substreams_contexts.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
3 |
xmlns:fn="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="fn"> |
|
4 |
|
|
5 |
<xsl:variable name="namespacePrefix" select="string('ec__________')"/> |
|
6 |
<xsl:variable name="funderID" select="concat($namespacePrefix, '::EC')"/> |
|
7 |
|
|
8 |
<xsl:template match="/"> |
|
9 |
<fundingtree> |
|
10 |
<funder> |
|
11 |
<id> |
|
12 |
<xsl:value-of select="$funderID"/> |
|
13 |
</id> |
|
14 |
<shortname>EC</shortname> |
|
15 |
<name>European Commission</name> |
|
16 |
<jurisdiction>EU</jurisdiction> |
|
17 |
</funder> |
|
18 |
<xsl:variable name="toaCode" select=".//ProjectTOACode"/> |
|
19 |
<xsl:choose> |
|
20 |
<xsl:when test="$toaCode and starts-with($toaCode, 'ERC-')"> |
|
21 |
<xsl:call-template name="ERC"> |
|
22 |
<xsl:with-param name="toaCode" select="$toaCode"/> |
|
23 |
</xsl:call-template> |
|
24 |
</xsl:when> |
|
25 |
<xsl:when test="$toaCode and not(starts-with($toaCode, 'ERC-'))"> |
|
26 |
<xsl:call-template name="other"> |
|
27 |
<xsl:with-param name="toaCode" select="$toaCode"/> |
|
28 |
</xsl:call-template> |
|
29 |
</xsl:when> |
|
30 |
<xsl:otherwise> |
|
31 |
<xsl:call-template name="h2020"/> |
|
32 |
</xsl:otherwise> |
|
33 |
</xsl:choose> |
|
34 |
</fundingtree> |
|
35 |
</xsl:template> |
|
36 |
|
|
37 |
<xsl:template name="h2020"> |
|
38 |
<funding_level_0> |
|
39 |
<id> |
|
40 |
<xsl:value-of select="concat($funderID, '::H2020')"/> |
|
41 |
</id> |
|
42 |
<name>H2020</name> |
|
43 |
<description>Horizon 2020 Framework Programme</description> |
|
44 |
<parent/> |
|
45 |
<class>ec:h2020fundings</class> |
|
46 |
</funding_level_0> |
|
47 |
</xsl:template> |
|
48 |
|
|
49 |
<xsl:template name="ERC"> |
|
50 |
<xsl:param name="toaCode"/> |
|
51 |
<xsl:variable name="toaId" select="concat($funderID, '::H2020::ERC::', $toaCode)"/> |
|
52 |
<funding_level_2> |
|
53 |
<id> |
|
54 |
<xsl:value-of select="$toaId"/> |
|
55 |
</id> |
|
56 |
<description> |
|
57 |
<xsl:value-of select=".//ProjectTOADescr"/> |
|
58 |
</description> |
|
59 |
<name> |
|
60 |
<xsl:value-of select="$toaCode"/> |
|
61 |
</name> |
|
62 |
<class>ec:h2020toas</class> |
|
63 |
<parent> |
|
64 |
<funding_level_1> |
|
65 |
<id> |
|
66 |
<xsl:value-of select="concat($funderID, '::H2020::ERC')"/> |
|
67 |
</id> |
|
68 |
<description> |
|
69 |
<xsl:value-of select="string('European Research Council')"/> |
|
70 |
</description> |
|
71 |
<name> |
|
72 |
<xsl:value-of select="string('ERC')"/> |
|
73 |
</name> |
|
74 |
<class>ec:h2020fundings</class> |
|
75 |
<parent> |
|
76 |
<funding_level_0> |
|
77 |
<id> |
|
78 |
<xsl:value-of select="concat($funderID, '::H2020')"/> |
|
79 |
</id> |
|
80 |
<name>H2020</name> |
|
81 |
<description>Horizon 2020 Framework Programme</description> |
|
82 |
<parent/> |
|
83 |
<class>ec:h2020fundings</class> |
|
84 |
</funding_level_0> |
|
85 |
</parent> |
|
86 |
</funding_level_1> |
|
87 |
</parent> |
|
88 |
</funding_level_2> |
|
89 |
</xsl:template> |
|
90 |
|
|
91 |
<xsl:template name="other"> |
|
92 |
<xsl:param name="toaCode"/> |
|
93 |
<xsl:variable name="toaId" select="concat($funderID, '::H2020::', $toaCode)"/> |
|
94 |
<funding_level_1> |
|
95 |
<id> |
|
96 |
<xsl:value-of select="$toaId"/> |
|
97 |
</id> |
|
98 |
<description> |
|
99 |
<xsl:value-of select=".//ProjectTOADescr"/> |
|
100 |
</description> |
|
101 |
<name> |
|
102 |
<xsl:value-of select="$toaCode"/> |
|
103 |
</name> |
|
104 |
<class>ec:h2020toas</class> |
|
105 |
<parent> |
|
106 |
<funding_level_0> |
|
107 |
<id> |
|
108 |
<xsl:value-of select="concat($funderID, '::H2020')"/> |
|
109 |
</id> |
|
110 |
<name>H2020</name> |
|
111 |
<description>Horizon 2020 Framework Programme</description> |
|
112 |
<parent/> |
|
113 |
<class>ec:h2020fundings</class> |
|
114 |
</funding_level_0> |
|
115 |
</parent> |
|
116 |
</funding_level_1> |
|
117 |
</xsl:template> |
|
118 |
</xsl:stylesheet> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/xsl/wt_contexts_NEW.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
3 |
xmlns:fn="http://www.w3.org/2005/xpath-functions" version="1.0" |
|
4 |
exclude-result-prefixes="fn"> |
|
5 |
|
|
6 |
<xsl:variable name="namespacePrefix" select="string('wt__________')"/> |
|
7 |
<xsl:variable name="funderID" select="concat($namespacePrefix, '::WT')"/> |
|
8 |
|
|
9 |
<xsl:template match="/"> |
|
10 |
<xsl:variable name="funding"> |
|
11 |
<xsl:choose> |
|
12 |
<xsl:when test="normalize-space(.//Grant/Stream)"> |
|
13 |
<xsl:value-of select="normalize-space(.//Grant/Stream)"/> |
|
14 |
</xsl:when> |
|
15 |
<xsl:otherwise> |
|
16 |
<xsl:value-of select="string('UNKNOWN')"/> |
|
17 |
</xsl:otherwise> |
|
18 |
</xsl:choose> |
|
19 |
</xsl:variable> |
|
20 |
|
|
21 |
<fundingtree> |
|
22 |
<funder> |
|
23 |
<id> |
|
24 |
<xsl:value-of select="$funderID"/> |
|
25 |
</id> |
|
26 |
<shortname>WT</shortname> |
|
27 |
<name>Wellcome Trust</name> |
|
28 |
<jurisdiction></jurisdiction> |
|
29 |
</funder> |
|
30 |
<funding_level_0> |
|
31 |
<id> |
|
32 |
<xsl:value-of select="concat($funderID, '::', $funding)"/> |
|
33 |
</id> |
|
34 |
<description> |
|
35 |
<xsl:value-of select="$funding"/> |
|
36 |
</description> |
|
37 |
<name> |
|
38 |
<xsl:value-of select="$funding"/> |
|
39 |
</name> |
|
40 |
<parent></parent> |
|
41 |
<class>wt:fundingStream</class> |
|
42 |
</funding_level_0> |
|
43 |
</fundingtree> |
|
44 |
</xsl:template> |
|
45 |
|
|
46 |
</xsl:stylesheet> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/xsl/sfi_contexts.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<xsl:stylesheet version="1.0" |
|
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" |
|
5 |
exclude-result-prefixes="fn"> |
|
6 |
|
|
7 |
<xsl:variable name="namespacePrefix" select="string('sfi_________')" /> |
|
8 |
<xsl:variable name="funderId" select="concat($namespacePrefix, '::SFI')" /> |
|
9 |
|
|
10 |
<xsl:template match="/"> |
|
11 |
<fundingtree> |
|
12 |
<funder> |
|
13 |
<id><xsl:value-of select="$funderId" /></id> |
|
14 |
<shortname>SFI</shortname> |
|
15 |
<name><xsl:value-of select=".//column[@name='Funder Name']" /></name> |
|
16 |
<jurisdiction>IE</jurisdiction> |
|
17 |
</funder> |
|
18 |
<xsl:variable name="funding" select="normalize-space(.//column[@name='Programme'])" /> |
|
19 |
<xsl:if test="$funding"> |
|
20 |
<funding_level_0> |
|
21 |
<id><xsl:value-of select="concat($funderId, '::', $funding)" /></id> |
|
22 |
<description><xsl:value-of select="$funding" /></description> |
|
23 |
<name><xsl:value-of select="$funding" /></name> |
|
24 |
<parent></parent> |
|
25 |
<class>sfi:fundingStream</class> |
|
26 |
</funding_level_0> |
|
27 |
</xsl:if> |
|
28 |
</fundingtree> |
|
29 |
</xsl:template> |
|
30 |
</xsl:stylesheet> |
|
31 |
|
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/hbase/queryDatasources.sql | ||
---|---|---|
1 |
SELECT d.id AS datasourceid, |
|
2 |
regexp_replace(d.id, '^.*::', '') AS originalid, |
|
3 |
d.officialname AS officialname, |
|
4 |
d.englishname AS englishname, |
|
5 |
|
|
6 |
CASE |
|
7 |
WHEN (array_agg( DISTINCT tcc.compliance :: TEXT ) @> ARRAY ['driver', 'openaire2.0']) |
|
8 |
THEN |
|
9 |
'driver-openaire2.0@@@OpenAIRE 2.0+ (DRIVER OA, EC funding)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
10 |
WHEN (array_agg( DISTINCT tcc.compliance :: TEXT ) @> ARRAY ['driver']) |
|
11 |
THEN |
|
12 |
'driver@@@OpenAIRE Basic (DRIVER OA)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
13 |
WHEN (array_agg( DISTINCT tcc.compliance :: TEXT ) @> ARRAY ['openaire2.0']) |
|
14 |
THEN |
|
15 |
'openaire2.0@@@OpenAIRE 2.0 (EC funding)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
16 |
WHEN (array_agg( DISTINCT tcc.compliance :: TEXT ) @> ARRAY ['openaire3.0']) |
|
17 |
THEN |
|
18 |
'openaire3.0@@@OpenAIRE 3.0 (OA, funding)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
19 |
WHEN (array_agg( DISTINCT tcc.compliance :: TEXT ) @> ARRAY ['openaire2.0_data']) |
|
20 |
THEN |
|
21 |
'openaire2.0_data@@@OpenAIRE Data (funded, referenced datasets)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
22 |
WHEN (array_agg( DISTINCT tcc.compliance :: TEXT ) @> ARRAY ['native']) |
|
23 |
THEN |
|
24 |
'native@@@proprietary@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
25 |
WHEN (array_agg( DISTINCT tcc.compliance :: TEXT ) @> ARRAY ['hostedBy']) |
|
26 |
THEN |
|
27 |
'hostedBy@@@collected from a compatible aggregator@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
28 |
WHEN (array_agg( DISTINCT tcc.compliance :: TEXT ) @> ARRAY ['notCompatible']) |
|
29 |
THEN |
|
30 |
'notCompatible@@@under validation@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
31 |
ELSE |
|
32 |
'UNKNOWN@@@not available@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel' |
|
33 |
END AS openairecompatibility, |
|
34 |
|
|
35 |
d.websiteurl AS websiteurl, |
|
36 |
d.logourl AS logourl, |
|
37 |
d.contactemail AS contactemail, |
|
38 |
array_agg( DISTINCT CASE |
|
39 |
WHEN apc.param='baseUrl' and api.protocolclass='oai' THEN |
|
40 |
CASE WHEN COALESCE(apc.edited, '') = '' THEN apc.original ELSE apc.edited END |
|
41 |
ELSE |
|
42 |
NULL |
|
43 |
END ) AS accessinfopackage, -- we need baseUrl param only -when available-, but we can not use WHERE clause on apc.param, otherwise we exclude datasources without a baseUrl param and the returned rows are less than we expect. |
|
44 |
d.latitude as latitude, |
|
45 |
d.longitude as longitude, |
|
46 |
d.namespaceprefix as namespaceprefix, |
|
47 |
d.od_numberofitems as odnumberofitems, |
|
48 |
d.od_numberofitemsdate as odnumberofitemsdate, |
|
49 |
array_agg(DISTINCT s.name || '###' || sc.code || '@@@' || sc.name || '@@@' || ss.code || '@@@' || ss.name) as subjects, |
|
50 |
d.description as description, |
|
51 |
d.od_policies as odpolicies, |
|
52 |
ARRAY(select trim(s) from unnest(string_to_array(d.od_languages, ',')) as s) as odlanguages, |
|
53 |
ARRAY(select trim(s) from unnest(string_to_array(d.od_contenttypes, '-')) as s) as odcontenttypes, |
|
54 |
d.inferred as inferred, |
|
55 |
d.deletedbyinference as deletedbyinference, |
|
56 |
d.trust as trust, |
|
57 |
d.inferenceprovenance as inferenceprovenance, |
|
58 |
d.dateofcollection as dateofcollection, |
|
59 |
d.dateofvalidation as dateofvalidation, |
|
60 |
|
|
61 |
-- re3data fields |
|
62 |
d.releasestartdate as releasestartdate, |
|
63 |
d.releaseenddate as releaseenddate, |
|
64 |
d.missionstatementurl as missionstatementurl, |
|
65 |
d.dataprovider as dataprovider, |
|
66 |
d.serviceprovider as serviceprovider, |
|
67 |
d.databaseaccesstype as databaseaccesstype, |
|
68 |
d.datauploadtype as datauploadtype, |
|
69 |
d.databaseaccessrestriction as databaseaccessrestriction, |
|
70 |
d.datauploadrestriction as datauploadrestriction, |
|
71 |
d.versioning as versioning, |
|
72 |
d.citationguidelineurl as citationguidelineurl, |
|
73 |
d.qualitymanagementkind as qualitymanagementkind, |
|
74 |
d.pidsystems as pidsystems, |
|
75 |
d.certificates as certificates, |
|
76 |
array_agg(DISTINCT p.name || '&&&' || p.url) as policies, |
|
77 |
-- end of re3data fields |
|
78 |
|
|
79 |
dc.id as collectedfromid, |
|
80 |
dc.officialname as collectedfromname, |
|
81 |
|
|
82 |
tc.code || '@@@' || tc.name || '@@@' || ts.code || '@@@' || ts.name as datasourcetype, |
|
83 |
pac.code || '@@@' || pac.name || '@@@' || pas.code || '@@@' || pas.name as provenanceaction, |
|
84 |
|
|
85 |
array_agg(DISTINCT i.pid || '###' || idc.code || '@@@' || idc.name || '@@@' || ids.code || '@@@' || ids.name) as pid |
|
86 |
|
|
87 |
|
|
88 |
FROM datasources d |
|
89 |
left outer join class tc on (tc.code = d.datasourceclass) |
|
90 |
left outer join scheme ts on (ts.code = d.datasourcescheme) |
|
91 |
|
|
92 |
left outer join class pac on (pac.code = d.provenanceactionclass) |
|
93 |
left outer join scheme pas on (pas.code = d.provenanceactionscheme) |
|
94 |
|
|
95 |
left outer join datasourcepids dps on (dps.datasource = d.id) |
|
96 |
left outer join identities i on (i.pid = dps.pid) |
|
97 |
|
|
98 |
left outer join class idc on (idc.code = i.issuertypeclass) |
|
99 |
left outer join scheme ids on (ids.code = i.issuertypescheme) |
|
100 |
|
|
101 |
left outer join datasources dc on (dc.id = d.collectedfrom) |
|
102 |
left outer join api on (api.datasource = d.id) |
|
103 |
left outer join apicollections apc on (apc.api = api.id) |
|
104 |
|
|
105 |
left outer join temp_compliances tcc on (tcc.api = api.id) |
|
106 |
|
|
107 |
left outer join datasource_subject ds on (ds.datasource = d.id) |
|
108 |
left outer join subjects s on (s.id = ds.subject) |
|
109 |
|
|
110 |
left outer join class sc on (sc.code = s.semanticclass) |
|
111 |
left outer join scheme ss on (ss.code = s.semanticscheme) |
|
112 |
|
|
113 |
left outer join datasource_policy dp on (dp.datasource = d.id) |
|
114 |
left outer join policies p on (p.id = dp.policy) |
|
115 |
|
|
116 |
-- These clauses have been commented to allow the import of all the datasource on the index |
|
117 |
-- WHERE d.datasourceclass != 'entityregistry' |
|
118 |
-- AND d.openairecompatibilityclass IS NOT null |
|
119 |
-- AND d.openairecompatibilityclass != 'UNKNOWN' |
|
120 |
-- AND d.openairecompatibilityclass != 'notCompatible' |
|
121 |
|
|
122 |
GROUP BY |
|
123 |
d.id, |
|
124 |
d.officialname, |
|
125 |
d.englishname, |
|
126 |
d.websiteurl, |
|
127 |
d.logourl, |
|
128 |
d.contactemail, |
|
129 |
d.namespaceprefix, |
|
130 |
d.description, |
|
131 |
d.od_numberofitems, |
|
132 |
d.od_numberofitemsdate, |
|
133 |
d.od_policies, |
|
134 |
d.od_languages, |
|
135 |
d.od_contenttypes, |
|
136 |
d.latitude, |
|
137 |
d.longitude, |
|
138 |
d.inferred, |
|
139 |
d.deletedbyinference, |
|
140 |
d.trust, |
|
141 |
d.inferenceprovenance, |
|
142 |
d.dateofcollection, |
|
143 |
d.dateofvalidation, |
|
144 |
dc.id, |
|
145 |
d.releasestartdate, |
|
146 |
d.releaseenddate, |
|
147 |
d.missionstatementurl, |
|
148 |
d.dataprovider, |
|
149 |
d.serviceprovider, |
|
150 |
d.databaseaccesstype, |
|
151 |
d.datauploadtype, |
|
152 |
d.databaseaccessrestriction, |
|
153 |
d.datauploadrestriction, |
|
154 |
d.versioning, |
|
155 |
d.citationguidelineurl, |
|
156 |
d.qualitymanagementkind, |
|
157 |
d.pidsystems, |
|
158 |
d.certificates, |
|
159 |
dc.officialname, |
|
160 |
tc.code, tc.name, ts.code, ts.name, |
|
161 |
pac.code, pac.name, pas.code, pas.name, |
|
162 |
sc.code, sc.name, ss.code, ss.name |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/hbase/queryProjects.sql | ||
---|---|---|
1 |
--WITH RECURSIVE fundingtree(id, parent_id, payload, depth) |
|
2 |
--AS ( |
|
3 |
-- SELECT f.id, |
|
4 |
-- ff.funding1, |
|
5 |
-- '{"funding_level_0":{"class":"' || f.semanticclass || '", "id":"' || f.id || '", "description":"' || f.description || '", "name":"' || f.name || '", "parent":{}}}', |
|
6 |
-- 1 |
|
7 |
-- FROM fundings f LEFT OUTER JOIN funding_funding ff ON f.id = ff.funding1 |
|
8 |
-- WHERE ff.funding2 IS NULL |
|
9 |
-- UNION |
|
10 |
-- SELECT f1.id, |
|
11 |
-- ff.funding2, |
|
12 |
-- '{"funding_level_'||depth||'":{"class":"' || f1.semanticclass || '", "id":"' || f1.id || '", "description":"' || f1.description || '", "name":"' || f1.name || '", "parent":'|| ft.payload ||'}}', |
|
13 |
-- ft.depth + 1 |
|
14 |
-- FROM funding_funding ff, fundingtree ft, fundings f2, fundings f1 |
|
15 |
-- WHERE ft.id = ff.funding2 AND f2.id = ft.id AND ff.funding1 = f1.id AND depth <= 10) |
|
16 |
|
|
17 |
SELECT p.id as projectid, |
|
18 |
p.code as code, |
|
19 |
p.websiteurl as websiteurl, |
|
20 |
p.acronym as acronym, |
|
21 |
p.title as title, |
|
22 |
p.startdate as startdate, |
|
23 |
p.enddate as enddate, |
|
24 |
p.call_identifier as callidentifier, |
|
25 |
p.keywords as keywords, |
|
26 |
p.duration as duration, |
|
27 |
p.ec_sc39 as ecsc39, |
|
28 |
p.oa_mandate_for_publications as oamandatepublications, |
|
29 |
p.ec_article29_3 as ecarticle29_3, |
|
30 |
p.dateofcollection as dateofcollection, |
|
31 |
p.inferred as inferred, |
|
32 |
p.deletedbyinference as deletedbyinference, |
|
33 |
p.trust as trust, |
|
34 |
p.inferenceprovenance as inferenceprovenance, |
|
35 |
p.optional1 as optional1, |
|
36 |
p.optional2 as optional2, |
|
37 |
p.jsonextrainfo as jsonextrainfo, |
|
38 |
dc.id as collectedfromid, |
|
39 |
dc.officialname as collectedfromname, |
|
40 |
|
|
41 |
cc.code || '@@@' || cc.name || '@@@' || cs.code || '@@@' || cs.name as contracttype, |
|
42 |
pac.code || '@@@' || pac.name || '@@@' || pas.code || '@@@' || pas.name as provenanceaction, |
|
43 |
|
|
44 |
array_agg(DISTINCT i.pid || '###' || idc.code || '@@@' || idc.name || '@@@' || ids.code || '@@@' || ids.name) as pid, |
|
45 |
array_agg(DISTINCT s.name || '###' || sc.code || '@@@' || sc.name || '@@@' || ss.code || '@@@' || ss.name) as subjects, |
|
46 |
|
|
47 |
array_agg(fp.path) as fundingtree |
|
48 |
|
|
49 |
FROM projects p |
|
50 |
left outer join class cc on (cc.code = p.contracttypeclass) |
|
51 |
left outer join scheme cs on (cs.code = p.contracttypescheme) |
|
52 |
|
|
53 |
left outer join class pac on (pac.code = p.provenanceactionclass) |
|
54 |
left outer join scheme pas on (pas.code = p.provenanceactionscheme) |
|
55 |
|
|
56 |
left outer join projectpids pp on (pp.project = p.id) |
|
57 |
left outer join identities i on (i.pid = pp.pid) |
|
58 |
left outer join class idc on (idc.code = i.issuertypeclass) |
|
59 |
left outer join scheme ids on (ids.code = i.issuertypescheme) |
|
60 |
|
|
61 |
left outer join datasources dc on (dc.id = p.collectedfrom) |
|
62 |
|
|
63 |
left outer join project_fundingpath pf on (pf.project = p.id) |
|
64 |
left outer join fundingpaths fp on (fp.id = pf.funding) |
|
65 |
|
|
66 |
left outer join project_subject ps on (ps.project = p.id) |
|
67 |
left outer join subjects s on (s.id = ps.subject) |
|
68 |
|
|
69 |
left outer join class sc on (sc.code = s.semanticclass) |
|
70 |
left outer join scheme ss on (ss.code = s.semanticscheme) |
|
71 |
|
|
72 |
GROUP BY |
|
73 |
p.id, |
|
74 |
p.code, |
|
75 |
p.websiteurl, |
|
76 |
p.acronym, |
|
77 |
p.title, |
|
78 |
p.startdate, |
|
79 |
p.enddate, |
|
80 |
p.call_identifier, |
|
81 |
p.keywords, |
|
82 |
p.duration, |
|
83 |
p.ec_sc39, |
|
84 |
p.oa_mandate_for_publications, |
|
85 |
p.ec_article29_3, |
|
86 |
p.dateofcollection, |
|
87 |
p.inferred, |
|
88 |
p.deletedbyinference, |
|
89 |
p.trust, |
|
90 |
p.inferenceprovenance, |
|
91 |
dc.id, |
|
92 |
dc.officialname, |
|
93 |
cc.code, cc.name, cs.code, cs.name, |
|
94 |
pac.code, pac.name, pas.code, pas.name |
|
95 |
|
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/corda_2_db.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
3 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:fn="http://www.w3.org/2005/xpath-functions"> |
|
4 |
|
|
5 |
<xsl:param name="parentDatasourceId" /> |
|
6 |
|
|
7 |
<xsl:template name="dateCorda"> |
|
8 |
<xsl:param name="datename" /> |
|
9 |
<xsl:param name="datevalue" /> |
|
10 |
<FIELD name="{$datename}" type="date" format="dd-MMM-yyyy"><xsl:value-of select="concat(substring($datevalue, 1, 2),'-',substring($datevalue,3,3),'-',substring($datevalue,6,4))" /></FIELD> |
|
11 |
</xsl:template> |
|
12 |
|
|
13 |
<xsl:variable name="namespacePrefix" select="string('ec__________')" /> |
|
14 |
<xsl:variable name="funderID" select="concat($namespacePrefix, '::EC')" /> |
|
15 |
|
|
16 |
<xsl:template match="/"> |
|
17 |
<record xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
18 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
19 |
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
20 |
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"> |
|
21 |
|
|
22 |
<xsl:copy-of select=".//*[local-name()='header']"/> |
|
23 |
|
|
24 |
<metadata> |
|
25 |
<ROWS> |
|
26 |
<xsl:for-each select="//CoordinatorContactPerson"> |
|
27 |
<xsl:if test="string-length(./PersonFirstName) > 0 and string-length(./PersonLastName) > 0"> |
|
28 |
<xsl:variable name="personId" select="concat('corda_______::', ../ProjectId, '::', ./PersonFirstName, '_', ./PersonLastName)"></xsl:variable> |
|
29 |
<ROW table="persons"> |
|
30 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$personId" /></FIELD> |
|
31 |
<FIELD name="id"><xsl:value-of select="$personId" /></FIELD> |
|
32 |
<FIELD name="firstname"><xsl:value-of select="./PersonFirstName" /></FIELD> |
|
33 |
<FIELD name="secondnames"><xsl:value-of select="./PersonLastName" /></FIELD> |
|
34 |
<FIELD name="fax"><xsl:value-of select="./ContactFax" /></FIELD> |
|
35 |
<FIELD name="email"><xsl:value-of select="./ContactEmail" /></FIELD> |
|
36 |
<FIELD name="phone"><xsl:value-of select="./ContactPhone" /></FIELD> |
|
37 |
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD> |
|
38 |
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD> |
|
39 |
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD> |
|
40 |
</ROW> |
|
41 |
</xsl:if> |
|
42 |
</xsl:for-each> |
|
43 |
|
|
44 |
<xsl:for-each select="//Project"> |
|
45 |
|
|
46 |
<xsl:variable name="specificName"> |
|
47 |
<xsl:choose> |
|
48 |
<xsl:when test="normalize-space(./ProjectSpecificProgram)"> |
|
49 |
<xsl:value-of select="normalize-space(./ProjectSpecificProgram)"/> |
|
50 |
</xsl:when> |
|
51 |
<xsl:otherwise> |
|
52 |
<xsl:value-of select="string('UNKNOWN')"/> |
|
53 |
</xsl:otherwise> |
|
54 |
</xsl:choose> |
|
55 |
</xsl:variable> |
|
56 |
|
|
57 |
<xsl:variable name="specificDesc" select="./ProjectSpecificProgramDescr" /> |
|
58 |
<xsl:variable name="specificId" select="normalize-space(concat($funderID, '::FP7::', $specificName))"/> |
|
59 |
|
|
60 |
<xsl:variable name="projectProgramName"> |
|
61 |
<xsl:choose> |
|
62 |
<xsl:when test="normalize-space(./ProjectProgram)"> |
|
63 |
<xsl:value-of select="normalize-space(./ProjectProgram)"/> |
|
64 |
</xsl:when> |
|
65 |
<xsl:otherwise> |
|
66 |
<xsl:value-of select="string('UNKNOWN')"/> |
|
67 |
</xsl:otherwise> |
|
68 |
</xsl:choose> |
|
69 |
</xsl:variable> |
|
70 |
|
|
71 |
<xsl:variable name="projectProgramDesc" select="./ProjectProgramDescr" /> |
|
72 |
<xsl:variable name="projectProgramId" select="concat($funderID, '::FP7::', $specificName, '::', $projectProgramName)"/> |
|
73 |
<xsl:variable name="projectId" select="concat('corda_______::', normalize-space(./ProjectId))"/> |
|
74 |
|
|
75 |
<!-- |
|
76 |
<ROW table="fundings"> |
|
77 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$specificId" /></FIELD> |
|
78 |
<FIELD name="id"><xsl:value-of select="$specificId" /></FIELD> |
|
79 |
<FIELD name="name"><xsl:value-of select="$specificName" /></FIELD> |
|
80 |
<FIELD name="description"><xsl:value-of select="$specificDesc" /></FIELD> |
|
81 |
<FIELD name="semanticclass">ec:specificprogram</FIELD> |
|
82 |
<FIELD name="semanticscheme">ec:funding_typologies</FIELD> |
|
83 |
</ROW> |
|
84 |
|
|
85 |
<ROW table="fundings"> |
|
86 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$projectProgramId" /></FIELD> |
|
87 |
<FIELD name="id"><xsl:value-of select="$projectProgramId" /></FIELD> |
|
88 |
<FIELD name="name"><xsl:value-of select="$projectProgramName" /></FIELD> |
|
89 |
<FIELD name="description"><xsl:value-of select="$projectProgramDesc" /></FIELD> |
|
90 |
<FIELD name="semanticclass">ec:program</FIELD> |
|
91 |
<FIELD name="semanticscheme">ec:funding_typologies</FIELD> |
|
92 |
</ROW> |
|
93 |
|
|
94 |
<ROW table="funding_funding"> |
|
95 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($specificId, '@@corda_______::FP7')" /></FIELD> |
|
96 |
<FIELD name="funding1"><xsl:value-of select="$specificId" /></FIELD> |
|
97 |
<FIELD name="funding2">corda_______::FP7</FIELD> |
|
98 |
<FIELD name="semanticclass">ec:hasframeworkprogram</FIELD> |
|
99 |
<FIELD name="semanticscheme">ec:funding_relations</FIELD> |
|
100 |
</ROW> |
|
101 |
|
|
102 |
<ROW table="funding_funding"> |
|
103 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($projectProgramId, '@@', $specificId)" /></FIELD> |
|
104 |
<FIELD name="funding1"><xsl:value-of select="$projectProgramId" /></FIELD> |
|
105 |
<FIELD name="funding2"><xsl:value-of select="$specificId" /></FIELD> |
|
106 |
<FIELD name="semanticclass">ec:hasspecificprogram</FIELD> |
|
107 |
<FIELD name="semanticscheme">ec:funding_relations</FIELD> |
|
108 |
</ROW> |
|
109 |
--> |
|
110 |
|
|
111 |
<ROW table="projects"> |
|
112 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$projectId" /></FIELD> |
|
113 |
<FIELD name="id"><xsl:value-of select="$projectId" /></FIELD> |
|
114 |
<FIELD name="code"><xsl:value-of select="./ProjectId" /></FIELD> |
|
115 |
<FIELD name="acronym"><xsl:value-of select="./ProjectAcronym" /></FIELD> |
|
116 |
<FIELD name="title"><xsl:value-of select="./ProjectTitle" /></FIELD> |
|
117 |
<xsl:call-template name="dateCorda"> |
|
118 |
<xsl:with-param name="datename">startdate</xsl:with-param> |
|
119 |
<xsl:with-param name="datevalue" select="./ProjectStartDate"></xsl:with-param> |
|
120 |
</xsl:call-template> |
|
121 |
<xsl:call-template name="dateCorda"> |
|
122 |
<xsl:with-param name="datename">enddate</xsl:with-param> |
|
123 |
<xsl:with-param name="datevalue" select="./ProjectEndDate"></xsl:with-param> |
|
124 |
</xsl:call-template> |
|
125 |
<FIELD name="call_identifier"><xsl:value-of select="./ProjectCallIdentifier" /></FIELD> |
|
126 |
<FIELD name="ec_sc39" type="boolean"><xsl:value-of select="./SpecialClause39" /></FIELD> |
|
127 |
<FIELD name="oa_mandate_for_publications" type="boolean"><xsl:value-of select="./SpecialClause39" /></FIELD> |
|
128 |
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD> |
|
129 |
<FIELD name="contracttypeclass"><xsl:value-of select="./ProjectFundingScheme" /></FIELD> |
|
130 |
<FIELD name="contracttypescheme">ec:FP7contractTypes</FIELD> |
|
131 |
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD> |
|
132 |
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD> |
|
133 |
<FIELD name="websiteurl"><xsl:value-of select="./ProjectInternetAddress" /></FIELD> |
|
134 |
<FIELD name="optional1"><xsl:value-of select="./ProjectSubFundingScheme" /></FIELD> |
|
135 |
<FIELD name="optional2"><xsl:value-of select="./ProjectCallWebpageUrl" /></FIELD> |
|
136 |
</ROW> |
|
137 |
|
|
138 |
<!-- |
|
139 |
<ROW table="project_funding"> |
|
140 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($projectProgramId, '@@', $projectId)" /></FIELD> |
|
141 |
<FIELD name="funding"><xsl:value-of select="$projectProgramId" /></FIELD> |
|
142 |
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD> |
|
143 |
<xsl:call-template name="dateCorda"> |
|
144 |
<xsl:with-param name="datename">startdate</xsl:with-param> |
|
145 |
<xsl:with-param name="datevalue" select="./ProjectStartDate"></xsl:with-param> |
|
146 |
</xsl:call-template> |
|
147 |
<xsl:call-template name="dateCorda"> |
|
148 |
<xsl:with-param name="datename">enddate</xsl:with-param> |
|
149 |
<xsl:with-param name="datevalue" select="./ProjectEndDate"></xsl:with-param> |
|
150 |
</xsl:call-template> |
|
151 |
<FIELD name="semanticclass"><xsl:value-of select="./ProjectFundingScheme" /></FIELD> |
|
152 |
<FIELD name="semanticscheme">ec:FP7contractTypes</FIELD> |
|
153 |
</ROW> |
|
154 |
--> |
|
155 |
|
|
156 |
<ROW table="project_fundingpath"> |
|
157 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($projectProgramId, '@@', $projectId)" /></FIELD> |
|
158 |
<FIELD name="funding"><xsl:value-of select="$projectProgramId" /></FIELD> |
|
159 |
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD> |
|
160 |
<xsl:call-template name="dateCorda"> |
|
161 |
<xsl:with-param name="datename">startdate</xsl:with-param> |
|
162 |
<xsl:with-param name="datevalue" select="./ProjectStartDate"></xsl:with-param> |
|
163 |
</xsl:call-template> |
|
164 |
<xsl:call-template name="dateCorda"> |
|
165 |
<xsl:with-param name="datename">enddate</xsl:with-param> |
|
166 |
<xsl:with-param name="datevalue" select="./ProjectEndDate"></xsl:with-param> |
|
167 |
</xsl:call-template> |
|
168 |
<FIELD name="semanticclass"><xsl:value-of select="./ProjectFundingScheme" /></FIELD> |
|
169 |
<FIELD name="semanticscheme">ec:FP7contractTypes</FIELD> |
|
170 |
</ROW> |
|
171 |
</xsl:for-each> |
|
172 |
|
|
173 |
<xsl:for-each select="//OrganisationParticipant"> |
|
174 |
<xsl:variable name="organizationId" select="concat('corda_______::', ./OrganisationPIC)" /> |
|
175 |
<xsl:variable name="projectId" select="concat('corda_______::', normalize-space(../ProjectId))" /> |
|
176 |
<xsl:variable name="whitelist" select="'0123456789'"/> |
|
177 |
<ROW table="organizations"> |
|
178 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$organizationId" /></FIELD> |
|
179 |
<FIELD name="id"><xsl:value-of select="$organizationId" /></FIELD> |
|
180 |
<FIELD name="legalshortname"><xsl:value-of select="./OrganisationShortName" /></FIELD> |
|
181 |
<FIELD name="legalname"><xsl:value-of select="./OrganisationLegalName" /></FIELD> |
|
182 |
<FIELD name="websiteurl"> |
|
183 |
<xsl:choose> |
|
184 |
<xsl:when test="starts-with(normalize-space(./OrganisationWebPage), 'http')"> |
|
185 |
<xsl:value-of select="./OrganisationWebPage" /> |
|
186 |
</xsl:when> |
|
187 |
<xsl:when test="string-length(normalize-space(./OrganisationWebPage)) > 0"> |
|
188 |
<xsl:value-of select="concat('http://', normalize-space(./OrganisationWebPage))" /> |
|
189 |
</xsl:when> |
|
190 |
</xsl:choose> |
|
191 |
</FIELD> |
|
192 |
<FIELD name="ec_legalbody" type="boolean"><xsl:value-of select="./PublicBody" /></FIELD> |
|
193 |
<FIELD name="ec_legalperson" type="boolean"><xsl:value-of select="./LegalPerson" /></FIELD> |
|
194 |
<FIELD name="ec_nonprofit" type="boolean"><xsl:value-of select="./NonProfit" /></FIELD> |
|
195 |
<FIELD name="ec_researchorganization" type="boolean"><xsl:value-of select="./ResearchOrganisation" /></FIELD> |
|
196 |
<FIELD name="ec_highereducation" type="boolean"><xsl:value-of select="./HigherEducation" /></FIELD> |
|
197 |
<FIELD name="ec_internationalorganizationeurinterests" type="boolean"><xsl:value-of select="./InternationalOrgEurInterest" /></FIELD> |
|
198 |
<FIELD name="ec_internationalorganization" type="boolean"><xsl:value-of select="./InternationalOrgEurInterest" /></FIELD> |
|
199 |
<FIELD name="ec_enterprise" type="boolean"><xsl:value-of select="./Enterprise" /></FIELD> |
|
200 |
<FIELD name="ec_smevalidated" type="boolean"><xsl:value-of select="./SMEValidated" /></FIELD> |
|
201 |
<FIELD name="countryclass"><xsl:value-of select="./OrganisationCountry" /></FIELD> |
|
202 |
<FIELD name="countryscheme">dnet:countries</FIELD> |
|
203 |
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD> |
|
204 |
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD> |
|
205 |
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD> |
|
206 |
<FIELD name="trust" type="float"><xsl:value-of select="0.91" /></FIELD> |
|
207 |
</ROW> |
|
208 |
|
|
209 |
<ROW table="project_organization"> |
|
210 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select='concat($projectId, "@@", $organizationId)' /></FIELD> |
|
211 |
<xsl:choose> |
|
212 |
<xsl:when test="string-length(translate(./ParticipantOrder, $whitelist, '')) > 0" > |
|
213 |
<FIELD name="participantnumber" type="int">9999</FIELD> |
|
214 |
</xsl:when> |
|
215 |
<xsl:otherwise> |
|
216 |
<FIELD name="participantnumber" type="int"><xsl:value-of select="./ParticipantOrder" /></FIELD> |
|
217 |
</xsl:otherwise> |
|
218 |
</xsl:choose> |
|
219 |
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD> |
|
220 |
<FIELD name="resporganization"><xsl:value-of select="$organizationId" /></FIELD> |
|
221 |
<xsl:choose> |
|
222 |
<xsl:when test="./ParticipantOrder = 1"> |
|
223 |
<FIELD name="contactperson"><xsl:value-of select="concat($projectId, '::', ..//CoordinatorContactPerson/PersonFirstName, '_', ../CoordinatorContactPerson/PersonLastName)"></xsl:value-of></FIELD> |
|
224 |
<FIELD name="semanticclass">coordinator</FIELD> |
|
225 |
</xsl:when> |
|
226 |
<xsl:otherwise> |
|
227 |
<FIELD name="contactperson"></FIELD> |
|
228 |
<FIELD name="semanticclass">participant</FIELD> |
|
229 |
</xsl:otherwise> |
|
230 |
</xsl:choose> |
|
231 |
<FIELD name="semanticscheme">dnet:project_organization_relations</FIELD> |
|
232 |
</ROW> |
|
233 |
</xsl:for-each> |
|
234 |
</ROWS> |
|
235 |
</metadata> |
|
236 |
</record> |
|
237 |
</xsl:template> |
|
238 |
</xsl:stylesheet> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/hbase/queryClaimsUpdate.sql | ||
---|---|---|
1 |
SELECT |
|
2 |
regexp_replace(xml, '<\?xml version="1\.0" encoding="UTF-8"\?>', '', 'i') AS xml, |
|
3 |
provenance |
|
4 |
FROM claims |
|
5 |
WHERE type = 'updates2actions' AND set = 'userclaim_dmf' |
|
6 |
|
|
7 |
|
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/opendoar_2_db.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
3 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:oaa="http://namespace.openaire.eu/oaa" |
|
4 |
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:fn="http://www.w3.org/2005/xpath-functions" |
|
5 |
xmlns:dnet="eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions" version="1.0"> |
|
6 |
|
|
7 |
<xsl:param name="parentDatasourceId"/> |
|
8 |
<xsl:param name="namespacePrefix"/> |
|
9 |
|
|
10 |
<xsl:template match="/"> |
|
11 |
<record xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
12 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
13 |
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
14 |
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"> |
|
15 |
|
|
16 |
<xsl:copy-of select=".//*[local-name()='header']"/> |
|
17 |
<metadata> |
|
18 |
<xsl:variable name="rid" select="normalize-space(//repository/@rID)"/> |
|
19 |
<xsl:variable name="datasourceId" select="concat($namespacePrefix, '::', $rid)"/> |
|
20 |
<xsl:variable name="oUrl" select="normalize-space(//oUrl)"/> |
|
21 |
<xsl:variable name="oName" select="normalize-space(//oName)"/> |
|
22 |
<xsl:variable name="organizationId" select="translate(concat($namespacePrefix, '::', $oName), ' ', '_')"/> |
|
23 |
<xsl:variable name="repositoryType"> |
|
24 |
<xsl:choose> |
|
25 |
<xsl:when test="normalize-space(//repositoryType) = 'Institutional'"> |
|
26 |
<xsl:value-of select="string('pubsrepository::institutional')"/> |
|
27 |
</xsl:when> |
|
28 |
<xsl:when test="normalize-space(//repositoryType) = 'Disciplinary'"> |
|
29 |
<xsl:value-of select="string('pubsrepository::thematic')"/> |
|
30 |
</xsl:when> |
|
31 |
<xsl:otherwise> |
|
32 |
<xsl:value-of select="string('pubsrepository::unknown')"/> |
|
33 |
</xsl:otherwise> |
|
34 |
</xsl:choose> |
|
35 |
</xsl:variable> |
|
36 |
|
|
37 |
<xsl:variable name="contenttypes"> |
|
38 |
<xsl:for-each select=".//contentType"> |
|
39 |
<xsl:if test="position() > 1">-</xsl:if> |
|
40 |
<xsl:value-of select="."/> |
|
41 |
</xsl:for-each> |
|
42 |
</xsl:variable> |
|
43 |
<xsl:variable name="languages"> |
|
44 |
<xsl:for-each select=".//lName"> |
|
45 |
<xsl:if test="position() > 1">,</xsl:if> |
|
46 |
<xsl:value-of select="."/> |
|
47 |
</xsl:for-each> |
|
48 |
</xsl:variable> |
|
49 |
<ROWS> |
|
50 |
<ROW table="datasources"> |
|
51 |
<FIELD name="id"> |
|
52 |
<xsl:value-of select="$datasourceId"/> |
|
53 |
</FIELD> |
|
54 |
<FIELD name="_dnet_resource_identifier_"> |
|
55 |
<xsl:value-of select="$datasourceId"/> |
|
56 |
</FIELD> |
|
57 |
<FIELD name="officialname"> |
|
58 |
<xsl:value-of select="normalize-space(//rName)"/> |
|
59 |
</FIELD> |
|
60 |
<FIELD name="englishname"> |
|
61 |
<xsl:value-of select="normalize-space(//rAcronym)"/> |
|
62 |
</FIELD> |
|
63 |
<FIELD name="od_contenttypes"> |
|
64 |
<xsl:value-of select="normalize-space($contenttypes)"/> |
|
65 |
</FIELD> |
|
66 |
<FIELD name="od_languages"> |
|
67 |
<xsl:value-of select="normalize-space($languages)"/> |
|
68 |
</FIELD> |
|
69 |
<FIELD name="od_numberofitems"> |
|
70 |
<xsl:value-of select="normalize-space(//rNumOfItems)"/> |
|
71 |
</FIELD> |
|
72 |
<FIELD name="od_numberofitemsdate"> |
|
73 |
<xsl:value-of select="normalize-space(//rDateHarvested)"/> |
|
74 |
</FIELD> |
|
75 |
<FIELD name="description"> |
|
76 |
<xsl:value-of select="normalize-space(//rDescription)"/> |
|
77 |
</FIELD> |
|
78 |
<FIELD name="contactEmail"> |
|
79 |
<xsl:value-of select="normalize-space(//pEmail)"/> |
|
80 |
</FIELD> |
|
81 |
<FIELD name="latitude" type="float"> |
|
82 |
<xsl:value-of select="normalize-space(//paLatitude)"/> |
|
83 |
</FIELD> |
|
84 |
<FIELD name="longitude" type="float"> |
|
85 |
<xsl:value-of select="normalize-space(//paLongitude)"/> |
|
86 |
</FIELD> |
|
87 |
<FIELD name="websiteurl"> |
|
88 |
<xsl:value-of select="normalize-space(//rUrl)"/> |
|
89 |
</FIELD> |
|
90 |
<FIELD name="logourl"></FIELD> |
|
91 |
<FIELD name="namespaceprefix"> |
|
92 |
<xsl:value-of select="dnet:generateNsPrefix('od', $rid)"/> |
|
93 |
</FIELD> |
|
94 |
<FIELD name="datasourceclass"> |
|
95 |
<xsl:value-of select="$repositoryType"/> |
|
96 |
</FIELD> |
|
97 |
<FIELD name="datasourcescheme">dnet:datasource_typologies</FIELD> |
|
98 |
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD> |
|
99 |
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD> |
|
100 |
<FIELD name="typology"> |
|
101 |
<xsl:value-of select="normalize-space(//rSoftWareName)"/> |
|
102 |
</FIELD> |
|
103 |
<FIELD name="optional1"></FIELD> |
|
104 |
<FIELD name="optional2"></FIELD> |
|
105 |
<FIELD name="collectedfrom"> |
|
106 |
<xsl:value-of select="$parentDatasourceId"/> |
|
107 |
</FIELD> |
|
108 |
</ROW> |
|
109 |
|
|
110 |
<xsl:for-each select=".//class"> |
|
111 |
<xsl:variable name="subjectId" select="normalize-space(concat($parentDatasourceId, '::', ./clCode))"/> |
|
112 |
<xsl:variable name="subjectValue" select="normalize-space(./clTitle)"/> |
|
113 |
<ROW table="subjects"> |
|
114 |
<FIELD name="id"> |
|
115 |
<xsl:value-of select="$subjectId"/> |
|
116 |
</FIELD> |
|
117 |
<FIELD name="name"> |
|
118 |
<xsl:value-of select="$subjectValue"/> |
|
119 |
</FIELD> |
|
120 |
<FIELD name="semanticclass">dnet:od_subjects</FIELD> |
|
121 |
<FIELD name="semanticscheme">dnet:subject_classification_typologies</FIELD> |
|
122 |
<FIELD name="_dnet_resource_identifier_"> |
|
123 |
<xsl:value-of select="$subjectId"/> |
|
124 |
</FIELD> |
|
125 |
</ROW> |
|
126 |
<ROW table="datasource_subject"> |
|
127 |
<FIELD name="datasource"> |
|
128 |
<xsl:value-of select="$datasourceId"/> |
|
129 |
</FIELD> |
|
130 |
<FIELD name="subject"> |
|
131 |
<xsl:value-of select="$subjectId"/> |
|
132 |
</FIELD> |
|
133 |
<FIELD name="_dnet_resource_identifier_"> |
|
134 |
<xsl:value-of select="concat($datasourceId, '@@', $subjectId)"/> |
|
135 |
</FIELD> |
|
136 |
</ROW> |
|
137 |
</xsl:for-each> |
|
138 |
|
|
139 |
<xsl:variable name="apiId" select="concat('api_________::', $datasourceId, '::0')"/> |
|
140 |
<ROW table="api"> |
|
141 |
<FIELD name="id"> |
|
142 |
<xsl:value-of select="$apiId"/> |
|
143 |
</FIELD> |
|
144 |
<FIELD name="_dnet_resource_identifier_"> |
|
145 |
<xsl:value-of select="$apiId"/> |
|
146 |
</FIELD> |
|
147 |
<FIELD name="protocolclass">oai</FIELD> |
|
148 |
<FIELD name="datasource"> |
|
149 |
<xsl:value-of select="$datasourceId"/> |
|
150 |
</FIELD> |
|
151 |
<FIELD name="contentdescriptionclass">metadata</FIELD> |
|
152 |
<FIELD name="typologyclass"> |
|
153 |
<xsl:value-of select="$repositoryType"/> |
|
154 |
</FIELD> |
|
155 |
</ROW> |
|
156 |
|
|
157 |
<ROW table="apicollections"> |
|
158 |
<FIELD name="api"> |
|
159 |
<xsl:value-of select="$apiId"/> |
|
160 |
</FIELD> |
|
161 |
<FIELD name="param">baseUrl</FIELD> |
|
162 |
<FIELD name="_dnet_resource_identifier_"> |
|
163 |
<xsl:value-of select="concat($apiId, '@@baseUrl')"/> |
|
164 |
</FIELD> |
|
165 |
<xsl:choose> |
|
166 |
<xsl:when test="string-length(normalize-space(//rOaiBaseUrl)) > 0"> |
|
167 |
<FIELD name="original"> |
|
168 |
<xsl:value-of select="normalize-space(//rOaiBaseUrl)"/> |
|
169 |
</FIELD> |
|
170 |
</xsl:when> |
|
171 |
<xsl:otherwise> |
|
172 |
<FIELD name="original">unknown</FIELD> |
|
173 |
</xsl:otherwise> |
|
174 |
</xsl:choose> |
|
175 |
</ROW> |
|
176 |
|
|
177 |
<ROW table="apicollections"> |
|
178 |
<FIELD name="api"> |
|
179 |
<xsl:value-of select="$apiId"/> |
|
180 |
</FIELD> |
|
181 |
<FIELD name="param">format</FIELD> |
|
182 |
<FIELD name="_dnet_resource_identifier_"> |
|
183 |
<xsl:value-of select="concat($apiId, '@@format')"/> |
|
184 |
</FIELD> |
|
185 |
<FIELD name="original">oai_dc</FIELD> |
|
186 |
</ROW> |
|
187 |
|
|
188 |
<ROW table="apicollections"> |
|
189 |
<FIELD name="api"> |
|
190 |
<xsl:value-of select="$apiId"/> |
|
191 |
</FIELD> |
|
192 |
<FIELD name="param">metadata_identifier_path</FIELD> |
|
193 |
<FIELD name="_dnet_resource_identifier_"> |
|
194 |
<xsl:value-of select="concat($apiId, '@@metadata_identifier_path')"/> |
|
195 |
</FIELD> |
|
196 |
<FIELD name="original">//*[local-name()='header']/*[local-name()='identifier']</FIELD> |
|
197 |
<FIELD name="accessparam" type="boolean">false</FIELD> |
|
198 |
</ROW> |
|
199 |
|
|
200 |
<ROW table="organizations"> |
|
201 |
<FIELD name="id"> |
|
202 |
<xsl:value-of select="$organizationId"/> |
|
203 |
</FIELD> |
|
204 |
<FIELD name="_dnet_resource_identifier_"> |
|
205 |
<xsl:value-of select="$organizationId"/> |
|
206 |
</FIELD> |
|
207 |
<FIELD name="legalname"> |
|
208 |
<xsl:value-of select="$oName"/> |
|
209 |
</FIELD> |
|
210 |
<FIELD name="legalshortname"> |
|
211 |
<xsl:value-of select="normalize-space(//oAcronym)"/> |
|
212 |
</FIELD> |
|
213 |
<FIELD name="websiteurl"> |
|
214 |
<xsl:choose> |
|
215 |
<xsl:when test="starts-with(normalize-space(//oUrl), 'http')"> |
|
216 |
<xsl:value-of select="normalize-space(//oUrl)" /> |
|
217 |
</xsl:when> |
|
218 |
<xsl:when test="string-length(normalize-space(//oUrl)) > 0"> |
|
219 |
<xsl:value-of select="concat('http://', normalize-space(//oUrl))" /> |
|
220 |
</xsl:when> |
|
221 |
</xsl:choose> |
|
222 |
</FIELD> |
|
223 |
<FIELD name="countryClass"> |
|
224 |
<xsl:choose> |
|
225 |
<xsl:when test="normalize-space(//cIsoCode) = 'GB'">UK</xsl:when> |
|
226 |
<xsl:otherwise> |
|
227 |
<xsl:value-of select="normalize-space(//cIsoCode)"></xsl:value-of> |
|
228 |
</xsl:otherwise> |
|
229 |
</xsl:choose> |
|
230 |
</FIELD> |
|
231 |
<FIELD name="countryScheme">dnet:countries</FIELD> |
|
232 |
<FIELD name="collectedfrom"> |
|
233 |
<xsl:value-of select="$parentDatasourceId"/> |
|
234 |
</FIELD> |
|
235 |
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD> |
|
236 |
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD> |
|
237 |
<FIELD name="trust" type="float">0.8</FIELD> |
|
238 |
</ROW> |
|
239 |
|
|
240 |
<ROW table="datasource_organization"> |
|
241 |
<FIELD name="datasource"> |
|
242 |
<xsl:value-of select="$datasourceId"/> |
|
243 |
</FIELD> |
|
244 |
<FIELD name="organization"> |
|
245 |
<xsl:value-of select="$organizationId"/> |
|
246 |
</FIELD> |
|
247 |
<FIELD name="_dnet_resource_identifier_"> |
|
248 |
<xsl:value-of select="concat($datasourceId,'@@',$organizationId)"/> |
|
249 |
</FIELD> |
|
250 |
</ROW> |
|
251 |
|
|
252 |
</ROWS> |
|
253 |
</metadata> |
|
254 |
</record> |
|
255 |
</xsl:template> |
|
256 |
|
|
257 |
</xsl:stylesheet> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/findContextsFromMDStore.wf.st | ||
---|---|---|
1 |
<NODE name="COLLECT" isStart="true" type="FetchMDStoreRecords"> |
|
2 |
<DESCRIPTION>Fetch records from MDStore</DESCRIPTION> |
|
3 |
<PARAMETERS> |
|
4 |
<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("orig_id")$</PARAM> |
|
5 |
<PARAM required="true" type="string" name="mdFormat" managedBy="system">$params.("orig_format")$</PARAM> |
|
6 |
<PARAM required="true" type="string" name="eprParam" managedBy="system">collected_epr</PARAM> |
|
7 |
</PARAMETERS> |
|
8 |
<ARCS> |
|
9 |
<ARC to="FIND_CONTEXTS"/> |
|
10 |
</ARCS> |
|
11 |
</NODE> |
|
12 |
|
|
13 |
<NODE name="FIND_CONTEXTS" type="ApplyXslt"> |
|
14 |
<DESCRIPTION>Find project contexts</DESCRIPTION> |
|
15 |
<PARAMETERS> |
|
16 |
<PARAM required="true" type="string" name="xsltClasspath" managedBy="user" function="listFiles('/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/xsl','xsl')"></PARAM> |
|
17 |
<PARAM required="true" type="string" name="inputEprParam" managedBy="system">collected_epr</PARAM> |
|
18 |
<PARAM required="true" type="string" name="outputEprParam" managedBy="system">contexts_epr</PARAM> |
|
19 |
</PARAMETERS> |
|
20 |
<ARCS> |
|
21 |
<ARC to="PROCESS_CONTEXTS"/> |
|
22 |
</ARCS> |
|
23 |
</NODE> |
|
24 |
|
|
25 |
<NODE name="PROCESS_CONTEXTS" type="ProcessContexts"> |
|
26 |
<DESCRIPTION>Process project contexts</DESCRIPTION> |
|
27 |
<PARAMETERS> |
|
28 |
<PARAM required="true" type="string" name="eprParam" managedBy="system">contexts_epr</PARAM> |
|
29 |
<PARAM required="true" type="string" name="contextObj" managedBy="system">contexts</PARAM> |
|
30 |
<PARAM required="true" type="string" name="contextId" managedBy="user"></PARAM> |
|
31 |
<PARAM required="true" type="string" name="contextLabel" managedBy="user"></PARAM> |
|
32 |
<PARAM required="true" type="string" name="contextType" managedBy="user">funding</PARAM> |
|
33 |
</PARAMETERS> |
|
34 |
<ARCS> |
|
35 |
<ARC to="PREPARE_DB_ENTRIES"/> |
|
36 |
</ARCS> |
|
37 |
</NODE> |
|
38 |
|
|
39 |
<NODE name="PREPARE_DB_ENTRIES" type="PrepareContextDbEntries"> |
|
40 |
<DESCRIPTION>Prepare the DB entries</DESCRIPTION> |
|
41 |
<PARAMETERS> |
|
42 |
<PARAM required="true" type="string" name="eprParam" managedBy="system">db_epr</PARAM> |
|
43 |
<PARAM required="true" type="string" name="contextObj" managedBy="system">contexts</PARAM> |
|
44 |
</PARAMETERS> |
|
45 |
<ARCS> |
|
46 |
<ARC to="UPDATE_DB"/> |
|
47 |
</ARCS> |
|
48 |
</NODE> |
|
49 |
|
|
50 |
<NODE name="UPDATE_DB" type="UpdateOpenaireDb"> |
|
51 |
<DESCRIPTION>Update Db</DESCRIPTION> |
|
52 |
<PARAMETERS> |
|
53 |
<PARAM required="true" type="string" name="eprParam" managedBy="system">db_epr</PARAM> |
|
54 |
</PARAMETERS> |
|
55 |
<ARCS> |
|
56 |
<ARC to="SAVE_PROFILE"/> |
|
57 |
</ARCS> |
|
58 |
</NODE> |
|
59 |
|
|
60 |
<NODE name="SAVE_PROFILE" type="SaveContextProfile"> |
|
61 |
<DESCRIPTION>Save the Context Profile</DESCRIPTION> |
|
62 |
<PARAMETERS> |
|
63 |
<PARAM required="true" type="string" name="contextObj" managedBy="system">contexts</PARAM> |
|
64 |
</PARAMETERS> |
|
65 |
<ARCS> |
|
66 |
<ARC to="success"/> |
|
67 |
</ARCS> |
|
68 |
</NODE> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/sfi_2_db.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
3 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
4 |
xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
5 |
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:fn="http://www.w3.org/2005/xpath-functions" |
|
6 |
exclude-result-prefixes="xs" version="1.0"> |
|
7 |
|
|
8 |
<xsl:param name="parentDatasourceId" /> |
|
9 |
<xsl:param name="namespacePrefix" /> |
|
10 |
|
|
11 |
<xsl:template match="/"> |
|
12 |
|
|
13 |
<xsl:variable name="prefix" select="string('sfi_________')" /> |
|
14 |
|
|
15 |
<record xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
16 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
17 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oaf="http://namespace.openaire.eu/oaf" |
|
18 |
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"> |
|
19 |
|
|
20 |
<xsl:copy-of select=".//*[local-name()='header']" /> |
|
21 |
|
|
22 |
<metadata> |
|
23 |
<ROWS> |
|
24 |
<xsl:if test="normalize-space(.//column[@name='Project Identifier']) and normalize-space(.//column[@name='Project Title'])"> |
|
25 |
<xsl:variable name="projectId" select="concat($namespacePrefix, '::', normalize-space(.//column[@name='Project Identifier']))" /> |
|
26 |
<xsl:variable name="startDate" select=".//column[@name='Start date']" /> |
|
27 |
<xsl:variable name="endDate" select=".//column[@name='End Date']" /> |
|
28 |
<ROW table="projects"> |
|
29 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$projectId" /></FIELD> |
|
30 |
<FIELD name="id"><xsl:value-of select="$projectId" /></FIELD> |
|
31 |
<FIELD name="code"><xsl:value-of select=".//column[@name='Project Identifier']" /></FIELD> |
|
32 |
<FIELD name="title"><xsl:value-of select=".//column[@name='Project Title']" /></FIELD> |
|
33 |
<FIELD name="startdate" type="date" format="dd/MM/yyyy"><xsl:value-of select="$startDate" /></FIELD> |
|
34 |
<FIELD name="enddate" type="date" format="dd/MM/yyyy"><xsl:value-of select="$endDate" /></FIELD> |
|
35 |
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD> |
|
36 |
<FIELD name="provenanceactionclass">sysimport:crosswalk:entityregistry</FIELD> |
|
37 |
</ROW> |
|
38 |
|
|
39 |
<xsl:if test="normalize-space(.//column[@name='Programme'])"> |
|
40 |
<xsl:variable name="funderId" select="concat($prefix, '::SFI')" /> |
|
41 |
<xsl:variable name="fundingId" select="concat($funderId, '::', normalize-space(.//column[@name='Programme']))" /> |
|
42 |
<ROW table="project_fundingpath"> |
|
43 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($fundingId, '@@', $projectId)" /></FIELD> |
|
44 |
<FIELD name="funding"><xsl:value-of select="$fundingId" /></FIELD> |
|
45 |
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD> |
|
46 |
<FIELD name="startdate" type="date" format="dd/MM/yyyy"><xsl:value-of select="$startDate" /></FIELD> |
|
47 |
<FIELD name="enddate" type="date" format="dd/MM/yyyy"><xsl:value-of select="$endDate" /></FIELD> |
|
48 |
</ROW> |
|
49 |
</xsl:if> |
|
50 |
|
|
51 |
<xsl:if test="normalize-space(.//column[@name='Research Body'])"> |
|
52 |
<xsl:variable name="organizationId" select="concat($namespacePrefix, '::', normalize-space(.//column[@name='Research Body']))" /> |
|
53 |
<ROW table="organizations"> |
|
54 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$organizationId" /></FIELD> |
|
55 |
<FIELD name="id"><xsl:value-of select="$organizationId" /></FIELD> |
|
56 |
<FIELD name="legalname"><xsl:value-of select=".//column[@name='Research Body']" /></FIELD> |
|
57 |
<FIELD name="countryclass">IE</FIELD> |
|
58 |
<FIELD name="countryscheme">dnet:countries</FIELD> |
|
59 |
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD> |
|
60 |
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD> |
|
61 |
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD> |
|
62 |
</ROW> |
|
63 |
<ROW table="project_organization"> |
|
64 |
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select='concat($projectId, "@@", $organizationId)' /></FIELD> |
|
65 |
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD> |
|
66 |
<FIELD name="resporganization"><xsl:value-of select="$organizationId" /></FIELD> |
|
67 |
<FIELD name="participantnumber" type="int">1</FIELD> |
|
68 |
<FIELD name="semanticclass">coordinator</FIELD> |
|
69 |
<FIELD name="semanticscheme">dnet:project_organization_relations</FIELD> |
|
70 |
</ROW> |
|
71 |
</xsl:if> |
|
72 |
</xsl:if> |
|
73 |
</ROWS> |
|
74 |
</metadata> |
|
75 |
</record> |
|
76 |
</xsl:template> |
|
77 |
|
|
78 |
</xsl:stylesheet> |
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-5.4.16/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/entityreg-contexts/xsl/fct_contexts.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<xsl:stylesheet version="1.0" |
|
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" |
|
5 |
exclude-result-prefixes="fn"> |
|
6 |
|
|
7 |
<xsl:variable name="namespacePrefix" select="string('fct_________')" /> |
|
8 |
<xsl:variable name="funderID" select="concat($namespacePrefix, '::FCT')" /> |
|
9 |
|
|
10 |
<xsl:template match="/"> |
|
11 |
<xsl:variable name="p1" select="normalize-space(.//funding/program)" /> |
|
12 |
<xsl:variable name="p2" select="normalize-space(.//funding/program2)" /> |
|
13 |
|
|
14 |
<fundingtree> |
|
15 |
<funder> |
|
16 |
<id><xsl:value-of select="$funderID" /></id> |
|
17 |
<shortname>FCT</shortname> |
|
18 |
<name>Fundação para a Ciência e a Tecnologia, I.P.</name> |
|
19 |
<jurisdiction>PT</jurisdiction> |
|
20 |
</funder> |
|
21 |
<xsl:if test="string-length($p1) > 0"> |
|
22 |
<xsl:choose> |
|
23 |
<xsl:when test="string-length($p2) > 0"> |
|
24 |
<xsl:variable name="level0" select="concat($funderID, '::', $p1)" /> |
|
25 |
<xsl:variable name="level1" select="concat($funderID, '::', $p1, '::', $p2)" /> |
|
26 |
<funding_level_1> |
|
27 |
<id><xsl:value-of select="$level1" /></id> |
|
28 |
<description><xsl:value-of select="$p2" /></description> |
|
29 |
<name><xsl:value-of select="$p2" /></name> |
|
30 |
<parent> |
|
31 |
<funding_level_0> |
|
32 |
<id><xsl:value-of select="$level0" /></id> |
|
33 |
<description><xsl:value-of select="$p1" /></description> |
|
34 |
<name><xsl:value-of select="$p1" /></name> |
|
35 |
<parent /> |
|
36 |
<class>fct:program</class> |
|
37 |
</funding_level_0> |
|
38 |
</parent> |
|
39 |
</funding_level_1> |
|
40 |
</xsl:when> |
|
41 |
<xsl:otherwise> |
|
42 |
<xsl:variable name="level0" select="concat($funderID, '::', $p1)" /> |
|
43 |
<funding_level_0> |
|
44 |
<id><xsl:value-of select="$level0" /></id> |
|
45 |
<description><xsl:value-of select="$p1" /></description> |
|
46 |
<name><xsl:value-of select="$p1" /></name> |
Also available in: Unified diff
[maven-release-plugin] copy for tag dnet-openaireplus-workflows-5.4.16