1
|
<RESOURCE_PROFILE>
|
2
|
<HEADER>
|
3
|
<RESOURCE_IDENTIFIER value="9099673b-b46d-4aae-9f56-321607cbacba_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6
|
<RESOURCE_URI value=""/>
|
7
|
<DATE_OF_CREATION value="2015-02-27T17:15:30+00:00"/>
|
8
|
</HEADER>
|
9
|
<BODY>
|
10
|
<CONFIGURATION>
|
11
|
<SOURCE_METADATA_FORMAT name="dbmf" layout="store" interpretation="cleaned"/>
|
12
|
<SINK_METADATA_FORMAT name="oaf_hbase"/>
|
13
|
<IMPORTED/>
|
14
|
<SCRIPT>
|
15
|
<TITLE>xslt_mapping_projectContactperson2hbase</TITLE>
|
16
|
<CODE>
|
17
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
18
|
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
19
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:oaa="http://namespace.openaire.eu/oaa"
|
20
|
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:dnet="eu.dnetlib.data.transform.xml.DbmfToHbaseXsltFunctions"
|
21
|
version="1.0">
|
22
|
|
23
|
<xsl:output omit-xml-declaration="yes" indent="yes"/>
|
24
|
|
25
|
<xsl:template match="/">
|
26
|
|
27
|
<xsl:variable name="projectId" select="dnet:oafSplitId('project', //FIELD[@name = 'project'])"/>
|
28
|
<xsl:variable name="contactpersonId" select="dnet:oafSplitId('person', //FIELD[@name = 'contactperson'])"/>
|
29
|
|
30
|
<ROWS>
|
31
|
<xsl:if test="string-length($projectId) > 0 and string-length($contactpersonId) > 0">
|
32
|
|
33
|
<xsl:variable name="projectcontactperson"
|
34
|
select="dnet:oafRel('projectPerson', $projectId, $contactpersonId, //FIELD[not(@isNull)], 'hasContact', 'dnet:project_person_relations')"/>
|
35
|
<xsl:variable name="contactpersonproject"
|
36
|
select="dnet:oafRel('projectPerson', $contactpersonId, $projectId, //FIELD[not(@isNull)], 'isContact', 'dnet:project_person_relations')"/>
|
37
|
|
38
|
<ROW key="{$projectId}" columnFamily="projectPerson_contactPerson_hasContact">
|
39
|
<QUALIFIER name="{$contactpersonId}" type="base64">
|
40
|
<xsl:value-of select="$projectcontactperson"/>
|
41
|
</QUALIFIER>
|
42
|
</ROW>
|
43
|
<ROW key="{$contactpersonId}" columnFamily="projectPerson_contactPerson_isContact">
|
44
|
<QUALIFIER name="{$projectId}" type="base64">
|
45
|
<xsl:value-of select="$contactpersonproject"/>
|
46
|
</QUALIFIER>
|
47
|
</ROW>
|
48
|
</xsl:if>
|
49
|
</ROWS>
|
50
|
|
51
|
</xsl:template>
|
52
|
|
53
|
</xsl:stylesheet>
|
54
|
</CODE>
|
55
|
</SCRIPT>
|
56
|
</CONFIGURATION>
|
57
|
<STATUS/>
|
58
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
59
|
</BODY>
|
60
|
</RESOURCE_PROFILE>
|