1
|
<RESOURCE_PROFILE>
|
2
|
<HEADER>
|
3
|
<RESOURCE_IDENTIFIER value="a3a05526-a544-4087-b446-a53c22b06159_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_dissimilarity2hbase</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="type" select="/ROW/FIELD[@name = 'entitytype']"/>
|
28
|
<xsl:variable name="source" select="dnet:oafSimpleId($type, /ROW/FIELD[@name = 'id1'])"/>
|
29
|
<xsl:variable name="target" select="dnet:oafSimpleId($type, /ROW/FIELD[@name = 'id2'])"/>
|
30
|
|
31
|
<xsl:variable name="columnFamily">
|
32
|
<xsl:choose>
|
33
|
<xsl:when test="$type = 'result'">resultResult_dedupSimilarity_isSimilarTo</xsl:when>
|
34
|
<xsl:when test="$type = 'person'">personPerson_dedupSimilarity_isSimilarTo</xsl:when>
|
35
|
<xsl:when test="$type = 'organization'">organizationOrganization_dedupSimilarity_isSimilarTo</xsl:when>
|
36
|
</xsl:choose>
|
37
|
</xsl:variable>
|
38
|
|
39
|
<ROWS>
|
40
|
<xsl:if test="string-length($source) > 0 and string-length($target) > 0 and string-length($columnFamily) > 0">
|
41
|
<ROW key="{$source}" columnFamily="{$columnFamily}">
|
42
|
<QUALIFIER name="{$target}" type="base64"></QUALIFIER>
|
43
|
</ROW>
|
44
|
<ROW key="{$target}" columnFamily="{$columnFamily}">
|
45
|
<QUALIFIER name="{$source}" type="base64"></QUALIFIER>
|
46
|
</ROW>
|
47
|
</xsl:if>
|
48
|
</ROWS>
|
49
|
|
50
|
</xsl:template>
|
51
|
|
52
|
</xsl:stylesheet>
|
53
|
|
54
|
</CODE>
|
55
|
</SCRIPT>
|
56
|
</CONFIGURATION>
|
57
|
<STATUS/>
|
58
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
59
|
</BODY>
|
60
|
</RESOURCE_PROFILE>
|