Project

General

Profile

1
<RESOURCE_PROFILE>
2
	<HEADER>
3
		<RESOURCE_IDENTIFIER value="760183e7-a5d4-4827-9218-3d49ff9fcbd1_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_datasourceOrganization2hbase</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="datasourceId" select="dnet:oafSplitId('datasource', //FIELD[@name = 'datasource'])"/>
28
							<xsl:variable name="organizationId" select="dnet:oafSplitId('organization', //FIELD[@name = 'organization'])"/>
29

    
30
							<ROWS>
31
								<xsl:if test="string-length($datasourceId) &gt; 0 and string-length($organizationId) &gt; 0">
32

    
33
									<xsl:variable name="datasourceorganization"
34
									              select="dnet:oafRel('datasourceOrganization', $datasourceId, $organizationId, //FIELD[not(@isNull)], 'provides', 'dnet:datasources_organizations_typologies')"/>
35
									<xsl:variable name="organizationdatasource"
36
									              select="dnet:oafRel('datasourceOrganization', $organizationId, $datasourceId, //FIELD[not(@isNull)], 'isProvidedBy', 'dnet:datasources_organizations_typologies')"/>
37

    
38
									<ROW key="{$datasourceId}" columnFamily="datasourceOrganization_provision_provides">
39
										<QUALIFIER name="{$organizationId}" type="base64">
40
											<xsl:value-of select="$datasourceorganization"/>
41
										</QUALIFIER>
42
									</ROW>
43
									<ROW key="{$organizationId}" columnFamily="datasourceOrganization_provision_isProvidedBy">
44
										<QUALIFIER name="{$datasourceId}" type="base64">
45
											<xsl:value-of select="$organizationdatasource"/>
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>
(8-8/85)