Project

General

Profile

« Previous | Next » 

Revision 57276

Transformation rules modified to consider also funded amount and summary for the projects. Not all the rules consider both the updates (not all the funders provide both funded amount and summary for the project) ref #4965

View differences:

modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/rsf2db.xml
74 74
                            <FIELD name="contactfullname">
75 75
                                <xsl:value-of select=".//column[@name='Project Lead']"/>
76 76
                            </FIELD>
77
                           <!-- <FIELD name="amount"> it was optional1 before
78
                                <xsl:value-of select="concat(.//column[@name='Funding'], ' €')"/>
79
                            </FIELD> -->
77

  
80 78
                            <FIELD name="summary">
81 79
                                <xsl:value-of select=".//column[@name='Annotation']"/>
82 80
                            </FIELD>
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/aka2db.xml
68 68
                            <FIELD name="call_identifier">
69 69
                                <xsl:value-of select=".//column[@name='Call']"/>
70 70
                            </FIELD>
71
                            <FIELD name="optional1">
72
                                <xsl:value-of select="concat(.//column[@name='Funding'], ' €')"/>
71
                            <FIELD name="fundedamount" type="float">
72
                                <xsl:value-of select="translate(.//column[@name='Funding'],',','')"/>
73 73
                            </FIELD>
74
                            <FIELD name="currency">
75
                            	<xsl:value-of select="string('EUR')"/>
76
                            </FIELD>
74 77
                            <FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
75 78
                            <FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
76 79
                            <FIELD name="collectedfrom">
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/cordah2020_2_db.xml
103 103
							<FIELD name="optional2">
104 104
								<xsl:value-of select="./ProjectTopicDescr"/>
105 105
							</FIELD>
106
							<FIELD name="summary">
107
                                <xsl:value-of select="./ProjectAbstract"/>
108
                            </FIELD>
109
                            <FIELD name="totalcost" type="float">
110
                                <xsl:value-of select="./ProjectTotalCosts"/>
111
                            </FIELD>
112
                            <FIELD name="fundedamount" type="float">
113
                                <xsl:value-of select="/ProjectRequestedEUContrib"/>
114
                            </FIELD>
115
                            <FIELD name="currency">
116
                                <xsl:value-of select="string('EUR')"/>
117
                            </FIELD>
106 118
							<xsl:variable name="personSurname" select="normalize-space(./CoordinatorContactPerson/PersonLastName)"/>
107 119
							<xsl:variable name="personFirstName" select="normalize-space(./CoordinatorContactPerson/PersonFirstName)"/>
108 120
							<xsl:variable name="contactfullname">
......
229 241
								<FIELD name="resporganization">
230 242
									<xsl:value-of select="$organizationId"/>
231 243
								</FIELD>
244
							<FIELD name="contribution" type="float">
245
                                    <xsl:value-of select="./ParticipantRequestedEUContrib"/>
246
                                </FIELD>
232 247
								<xsl:choose>
233 248
									<xsl:when test="./ParticipantOrder = 1">
234 249
										<FIELD name="semanticclass">coordinator</FIELD>
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/rcuk_2_db.xml
115 115
														select="concat(.//*[local-name() = 'valuePounds']/@*[local-name() = 'amount'], ' ', .//*[local-name() = 'valuePounds']/@*[local-name() = 'currencyCode'])"
116 116
												/>
117 117
											</FIELD>
118
<FIELD name="fundedamount" type="float">
119
                            <xsl:value-of
120
                                select=".//*[local-name() = 'valuePounds']/@*[local-name() = 'amount']"
121
                            />
122
                        </FIELD>
118 123

  
124
                        <FIELD name="currency">
125
                           <xsl:value-of select=".//*[local-name() = 'valuePounds']/@*[local-name() = 'currencyCode']"/>
126
                        </FIELD>
127
                       <FIELD name="summary">
128
                           <xsl:value-of select=".//*[local-name() = 'abstractText']"/>
129
                       </FIELD>
119 130
											<xsl:variable name="principalInvestigators">
120 131
												<xsl:apply-templates
121 132
														select=".//*[local-name() = 'person']"/>
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/arc_2_db.xml
76 76
							<FIELD name="keywords">
77 77
								<xsl:value-of select="normalize-space($keywords)"/>
78 78
							</FIELD>
79
							<FIELD name="summary">
80
                                <xsl:value-of select="//ands:description[@type='brief']"/>
81
                            </FIELD>
82
                            <xsl:if test="//ands:description[@type='fundingAmount']">
83
                                <FIELD name="fundedamount" type="float">
84
                                    <xsl:value-of select="translate(//ands:description[@type='fundingAmount'],'$,','')"/>
85
                                </FIELD>
86
                                <FIELD name="currency">
87
                                    <xsl:value-of select="string('AUD')"/>
88
                                </FIELD>
89
                            </xsl:if>
79 90
							<FIELD name="collectedfrom">
80 91
								<xsl:value-of select="$varDatasourceId"/>
81 92
							</FIELD>
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/nhmrc_2_db.xml
67 67
									<xsl:value-of select="concat('31-12-', normalize-space(.))"/>
68 68
								</FIELD>
69 69
							</xsl:for-each>
70

  
70
 <xsl:variable name="funds" select="tokenize(./ands:description[@type='fundingAmount'],' ')"/>
71
                            <FIELD name="fundedamount" type="float">
72
                                <xsl:value-of select="translate($funds[2],',','')"/>
73
                            </FIELD>
74
                            <FIELD name="currency">
75
                                <xsl:value-of select="substring($funds[1],2)"/>
76
                            </FIELD>
77
                            <FIELD name="summary">
78
                                <xsl:value-of select="./ands:description[@type='brief']"/>
79
                            </FIELD>
71 80
							<xsl:variable name="keywords">
72 81
								<xsl:for-each select="./ands:subject[@type='local']">
73 82
									<xsl:if test="position() != 1">,</xsl:if>
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/snsf_2_db.xml
54 54
                                <xsl:value-of select=".//column[@name='Project Title']"/>
55 55
                            </FIELD>
56 56
                            <xsl:if test="number(.//column[@name='Approved Amount'])">
57
                                <FIELD name="optional1">
58
                                	<xsl:value-of select=".//column[@name='Approved Amount']"/>
59
                            	</FIELD>
57
                                <FIELD name="fundedamount" type="float">
58
                                    <xsl:value-of select=".//column[@name='Approved Amount']"/>
59
                                </FIELD>
60
                                <FIELD name="currency">
61
                                    <xsl:value-of select="string('CHF')"/>
62
                                </FIELD>
60 63
                            </xsl:if>
61 64
                            <FIELD name="keywords">
62 65
                                <xsl:value-of select=".//column[@name='Discipline Name Hierarchy']"/>
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/wellcometrust_2_db.xml
92 92
							<FIELD name="collectedfrom">
93 93
								<xsl:value-of select="$varDataSourceId"/>
94 94
							</FIELD>
95
							<FIELD name="optional1">
96
								<xsl:value-of select="concat(.//Grant/Amount, ' ', .//Grant/Amount/@Currency)"/>
97
							</FIELD>
95
							 <xsl:if test=".//Grant/Abstract">
96
                                <FIELD name="summary">
97
                                    <xsl:value-of select=".//Grant/Abstract"/>
98
                                </FIELD>
99
                            </xsl:if>
100
                            <xsl:if test=".//Grant/Amount">
101
                                <FIELD name="fundedamount" type="float">
102
                                    <xsl:value-of select=".//Grant/Amount"/>
103
                                </FIELD>
104
                                <FIELD name="currency">
105
                                    <xsl:value-of select=".//Grant/Amount/@Currency"/>
106
                                </FIELD>
107
                            </xsl:if>
98 108
							<xsl:if test="string-length(normalize-space(.//Grant/Alias[1]/text())) > 0">
99 109
								<xsl:variable name="projectAlias">
100 110
									<xsl:call-template name="getJson">
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/fwf_2_db.xml
76 76
							<FIELD name="keywords">
77 77
								<xsl:value-of select=".//column[@name='keywords']"/>
78 78
							</FIELD>
79
							<FIELD name="optional1">
80
								<xsl:variable name="grantAmount" select=".//column[@name='grants awarded']"/>
81
								<xsl:variable name="tmp" select="substring(normalize-space($grantAmount),1,1)"/>
82
								<xsl:value-of select="concat($tmp,' ',substring-after($grantAmount,$tmp))"/>
83
							</FIELD>
79
							<FIELD name="fundedamount" type="float">
80
                                <xsl:variable name="grantAmount" select=".//column[@name='grants awarded']"/>
81
                                <xsl:variable name="tmp" select="substring(normalize-space($grantAmount),1,1)"/>
82
                                <xsl:value-of select="translate(substring-after($grantAmount,$tmp),',','')"/>
83
                            </FIELD>
84
                            <FIELD name="currency">
85
                                <xsl:value-of select="string('EUR')"/>
86
                            </FIELD>
84 87

  
88

  
85 89
							<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
86 90
							<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
87 91
							<FIELD name="collectedfrom">
......
137 141

  
138 142
								 <FIELD name="lastupdate" type="date"><xsl:value-of select="current-dateTime()"/></FIELD>
139 143
							</ROW>
140
						</xsl:if>
141
						<xsl:if test="string-length($organizationId) &gt; 0">
144
						<!--</xsl:if>
145
						<xsl:if test="string-length($organizationId) &gt; 0">-->
142 146
							<ROW table="project_organization">
143 147
								<FIELD name="_dnet_resource_identifier_">
144 148
									<xsl:value-of select="concat($projectID, '@@', concat($namespacePrefix, '::',$organizationId))"/>

Also available in: Unified diff