Project

General

Profile

1
<RESOURCE_PROFILE>
2
	<HEADER>
3
		<RESOURCE_IDENTIFIER value="30383440-fec9-4889-8ce8-147410d6e63c_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_datasources2hbase</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
							<xsl:variable name="datasourceid" select="dnet:oafSplitId('datasource', /ROW/FIELD[@name = 'datasourceid'])"/>
27
							<xsl:variable name="identities" select="/ROW/FIELD[@name = 'identities']/ITEM"/>
28
							<xsl:variable name="dateofcollection" select="/ROW/FIELD[@name = 'dateofcollection']"/>
29
							<xsl:variable name="dateoftransformation" select="/ROW/FIELD[@name = 'dateoftransformation']"/>
30
							<xsl:variable name="collectedfromid" select="dnet:oafSplitId('datasource', /ROW/FIELD[@name = 'collectedfromid'])"/>
31
							<xsl:variable name="collectedfromname" select="/ROW/FIELD[@name = 'collectedfromname']"/>
32

    
33
							<xsl:variable name="datasource"
34
							              select="dnet:oafEntity('datasource', $datasourceid, $collectedfromid, $collectedfromname, $identities, $dateofcollection, $dateoftransformation, /ROW/FIELD[not(@isNull)])"/>
35

    
36
							<ROWS>
37
								<xsl:if test="string-length($datasourceid) &gt; 0">
38
									<ROW key="{$datasourceid}" columnFamily="datasource">
39
										<QUALIFIER name="body" type="base64">
40
											<xsl:value-of select="$datasource"/>
41
										</QUALIFIER>
42
									</ROW>
43
								</xsl:if>
44
							</ROWS>
45

    
46
						</xsl:template>
47

    
48
					</xsl:stylesheet>
49
				</CODE>
50
			</SCRIPT>
51
		</CONFIGURATION>
52
		<STATUS/>
53
		<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
54
	</BODY>
55
</RESOURCE_PROFILE>
(9-9/85)