Compare commits

..

No commits in common. "main" and "actionset_promote_sequential" have entirely different histories.

3 changed files with 430 additions and 504 deletions

View File

@ -1,54 +1,44 @@
<RESOURCE_PROFILE> <RESOURCE_PROFILE>
<HEADER> <HEADER>
<RESOURCE_IDENTIFIER <RESOURCE_IDENTIFIER value="2ad0cdd9-c96c-484c-8b0e-ed56d86891fe_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU=" />
value="2ad0cdd9-c96c-484c-8b0e-ed56d86891fe_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/> <RESOURCE_TYPE value="TransformationRuleDSResourceType" />
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/> <RESOURCE_KIND value="TransformationRuleDSResources" />
<RESOURCE_KIND value="TransformationRuleDSResources"/> <RESOURCE_URI value="" />
<RESOURCE_URI value=""/> <DATE_OF_CREATION value="2024-03-05T11:23:00+00:00" />
<DATE_OF_CREATION value="2024-03-05T11:23:00+00:00"/> </HEADER>
</HEADER> <BODY>
<BODY> <CONFIGURATION>
<CONFIGURATION> <SOURCE_METADATA_FORMAT interpretation="cleaned" layout="store" name="dc" />
<SOURCE_METADATA_FORMAT interpretation="cleaned" layout="store" name="dc"/> <SINK_METADATA_FORMAT name="odf_hbase" />
<SINK_METADATA_FORMAT name="odf_hbase"/> <IMPORTED />
<IMPORTED/> <SCRIPT>
<SCRIPT> <TITLE>xslt_base2odf_hadoop</TITLE>
<TITLE>xslt_base2odf_hadoop</TITLE> <CODE>
<CODE> <xsl:stylesheet xmlns:oaire="http://namespace.openaire.eu/schema/oaire/" xmlns:dateCleaner="http://eu/dnetlib/transform/dateISO" xmlns:base_dc="http://oai.base-search.net/base_dc/"
<xsl:stylesheet xmlns:oaire="http://namespace.openaire.eu/schema/oaire/" xmlns:datacite="http://datacite.org/schema/kernel-4" xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dateCleaner="http://eu/dnetlib/transform/dateISO" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vocabulary="http://eu/dnetlib/transform/clean" xmlns:oaf="http://namespace.openaire.eu/oaf"
xmlns:base_dc="http://oai.base-search.net/base_dc/" xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:datacite="http://datacite.org/schema/kernel-4" exclude-result-prefixes="xsl vocabulary dateCleaner base_dc" version="2.0">
xmlns:dr="http://www.driver-repository.eu/namespace/dr" <xsl:param name="varOfficialName" />
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <xsl:param name="varDataSourceId" />
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:param name="varFP7" select="'corda_______::'" />
xmlns:vocabulary="http://eu/dnetlib/transform/clean" <xsl:param name="varH2020" select="'corda__h2020::'" />
xmlns:oaf="http://namespace.openaire.eu/oaf" <xsl:param name="repoCode" select="substring-before(//*[local-name() = 'header']/*[local-name()='recordIdentifier'], ':')" />
xmlns:oai="http://www.openarchives.org/OAI/2.0/" <xsl:param name="index" select="0" />
xmlns:dri="http://www.driver-repository.eu/namespace/dri" <xsl:param name="transDate" select="current-dateTime()" />
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://purl.org/dc/elements/1.1/"
exclude-result-prefixes="xsl vocabulary dateCleaner base_dc" version="2.0">
<xsl:param name="varOfficialName"/>
<xsl:param name="varDataSourceId"/>
<xsl:param name="varFP7" select="'corda_______::'"/>
<xsl:param name="varH2020" select="'corda__h2020::'"/>
<xsl:param name="repoCode"
select="substring-before(//*[local-name() = 'header']/*[local-name()='recordIdentifier'], ':')"/>
<xsl:param name="index" select="0"/>
<xsl:param name="transDate" select="current-dateTime()"/>
<xsl:template name="terminate"> <xsl:template name="terminate">
<xsl:message terminate="yes"> record is not compliant, transformation is <xsl:message terminate="yes">
interrupted. </xsl:message> record is not compliant, transformation is interrupted.
</xsl:template> </xsl:message>
</xsl:template>
<xsl:template match="/"> <xsl:template match="/">
<record> <record>
<xsl:apply-templates select="//*[local-name() = 'header']"/> <xsl:apply-templates select="//*[local-name() = 'header']" />
<!-- NOT USED <!-- NOT USED
base_dc:global_id (I used oai:identifier) base_dc:global_id (I used oai:identifier)
base_dc:collection/text() base_dc:collection/text()
base_dc:continent base_dc:continent
@ -61,481 +51,422 @@
base_dc:link (I used dc:identifier) base_dc:link (I used dc:identifier)
--> -->
<metadata> <metadata>
<datacite:resource> <datacite:resource>
<xsl:for-each select="//base_dc:doi"> <xsl:for-each select="//base_dc:doi">
<datacite:identifier identifierType="DOI"> <datacite:identifier identifierType="DOI">
<xsl:value-of select="."/> <xsl:value-of select="." />
</datacite:identifier> </datacite:identifier>
</xsl:for-each> </xsl:for-each>
<datacite:alternateIdentifiers> <datacite:alternateIdentifiers>
<xsl:for-each <xsl:for-each
select="distinct-values(//dc:identifier[starts-with(., 'http') and (not(contains(., '://dx.doi.org/') or contains(., '://doi.org/') or contains(., '://hdl.handle.net/')))])"> select="distinct-values(//dc:identifier[starts-with(., 'http') and (not(contains(., '://dx.doi.org/') or contains(., '://doi.org/') or contains(., '://hdl.handle.net/')))])">
<datacite:identifier alternateIdentifierType="url"> <datacite:identifier alternateIdentifierType="url">
<xsl:value-of select="."/> <xsl:value-of select="." />
</datacite:identifier> </datacite:identifier>
</xsl:for-each> </xsl:for-each>
<xsl:for-each <xsl:for-each select="distinct-values(//dc:identifier[starts-with(., 'http') and contains(., '://hdl.handle.net/')]/substring-after(., 'hdl.handle.net/'))">
select="distinct-values(//dc:identifier[starts-with(., 'http') and contains(., '://hdl.handle.net/')]/substring-after(., 'hdl.handle.net/'))"> <datacite:identifier alternateIdentifierType="handle">
<datacite:identifier <xsl:value-of select="." />
alternateIdentifierType="handle"> </datacite:identifier>
<xsl:value-of select="."/> </xsl:for-each>
</datacite:identifier>
</xsl:for-each> <xsl:for-each select="distinct-values(//dc:identifier[starts-with(., 'urn:nbn:nl:') or starts-with(., 'URN:NBN:NL:')])">
<datacite:identifier alternateIdentifierType='urn'>
<xsl:for-each <xsl:value-of select="." />
select="distinct-values(//dc:identifier[starts-with(., 'urn:nbn:nl:') or starts-with(., 'URN:NBN:NL:')])"> </datacite:identifier>
<datacite:identifier alternateIdentifierType="urn"> </xsl:for-each>
<xsl:value-of select="."/>
</datacite:identifier> <datacite:identifier alternateIdentifierType="oai-original">
</xsl:for-each> <xsl:value-of
select="//oai:header/oai:identifier" />
<datacite:identifier </datacite:identifier>
alternateIdentifierType="oai-original">
<xsl:value-of select="//oai:header/oai:identifier"/> </datacite:alternateIdentifiers>
</datacite:identifier>
<datacite:relatedIdentifiers />
</datacite:alternateIdentifiers>
<datacite:relatedIdentifiers/> <xsl:for-each select="//base_dc:typenorm">
<datacite:resourceType><xsl:value-of select="vocabulary:clean(., 'base:normalized_types')" /></datacite:resourceType>
</xsl:for-each>
<xsl:for-each select="//base_dc:typenorm">
<datacite:resourceType> <datacite:titles>
<xsl:value-of <xsl:for-each select="//dc:title">
select="vocabulary:clean(., 'base:normalized_types')" <datacite:title>
/> <xsl:value-of select="normalize-space(.)" />
</datacite:resourceType> </datacite:title>
</xsl:for-each> </xsl:for-each>
</datacite:titles>
<datacite:titles>
<xsl:for-each select="//dc:title"> <datacite:creators>
<datacite:title> <xsl:for-each select="//dc:creator">
<xsl:value-of select="normalize-space(.)"/> <xsl:variable name="author" select="normalize-space(.)" />
</datacite:title> <datacite:creator>
</xsl:for-each> <datacite:creatorName>
</datacite:titles> <xsl:value-of select="$author" />
</datacite:creatorName>
<datacite:creators> <xsl:for-each select="//base_dc:authod_id[normalize-space(./base_dc:creator_name) = $author]/base_dc:creator_id ">
<xsl:for-each select="//dc:creator"> <xsl:if test="contains(.,'https://orcid.org/')">
<xsl:variable name="author" <nameIdentifier schemeURI="https://orcid.org/" nameIdentifierScheme="ORCID">
select="normalize-space(.)"/> <xsl:value-of select="substring-after(., 'https://orcid.org/')" />
<datacite:creator> </nameIdentifier>
<datacite:creatorName> </xsl:if>
<xsl:value-of select="$author"/> </xsl:for-each>
</datacite:creatorName> </datacite:creator>
<xsl:for-each </xsl:for-each>
select="//base_dc:authod_id[normalize-space(./base_dc:creator_name) = $author]/base_dc:creator_id "> </datacite:creators>
<xsl:if test="contains(.,'https://orcid.org/')">
<nameIdentifier schemeURI="https://orcid.org/" <datacite:contributors>
nameIdentifierScheme="ORCID"> <xsl:for-each select="//dc:contributor">
<xsl:value-of <datacite:contributor>
select="substring-after(., 'https://orcid.org/')" <datacite:contributorName>
/> <xsl:value-of select="normalize-space(.)" />
</nameIdentifier> </datacite:contributorName>
</xsl:if> </datacite:contributor>
</xsl:for-each> </xsl:for-each>
</datacite:creator> </datacite:contributors>
</xsl:for-each>
</datacite:creators> <datacite:descriptions>
<xsl:for-each select="//dc:description">
<datacite:contributors> <datacite:description descriptionType="Abstract">
<xsl:for-each select="//dc:contributor"> <xsl:value-of select="normalize-space(.)" />
<datacite:contributor> </datacite:description>
<datacite:contributorName> </xsl:for-each>
<xsl:value-of select="normalize-space(.)"/> </datacite:descriptions>
</datacite:contributorName>
</datacite:contributor> <datacite:subjects>
</xsl:for-each> <xsl:for-each select="//dc:subject">
</datacite:contributors> <datacite:subject>
<xsl:value-of select="normalize-space(.)" />
<datacite:descriptions> </datacite:subject>
<xsl:for-each select="//dc:description"> </xsl:for-each>
<datacite:description descriptionType="Abstract">
<xsl:value-of select="normalize-space(.)"/> <xsl:for-each select="//base_dc:classcode|//base_dc:autoclasscode">
</datacite:description> <datacite:subject subjectScheme="{@type}" classificationCode="{normalize-space(.)}">
</xsl:for-each> <!-- TODO the value should be obtained by the Code -->
</datacite:descriptions> <xsl:value-of select="normalize-space(.)" />
</datacite:subject>
<datacite:subjects> </xsl:for-each>
<xsl:for-each select="//dc:subject"> </datacite:subjects>
<datacite:subject>
<xsl:value-of select="normalize-space(.)"/> <xsl:for-each select="//dc:publisher">
</datacite:subject> <datacite:publisher>
</xsl:for-each> <xsl:value-of select="normalize-space(.)" />
</datacite:publisher>
<xsl:for-each </xsl:for-each>
select="//base_dc:classcode|//base_dc:autoclasscode">
<datacite:subject subjectScheme="{@type}" <xsl:for-each select="//base_dc:year">
classificationCode="{normalize-space(.)}"> <datacite:publicationYear>
<!-- TODO the value should be obtained by the Code --> <xsl:value-of select="normalize-space(.)" />
<xsl:value-of select="normalize-space(.)"/> </datacite:publicationYear>
</datacite:subject> </xsl:for-each>
</xsl:for-each>
</datacite:subjects> <datacite:formats>
<xsl:for-each select="//dc:format">
<xsl:for-each select="//dc:publisher"> <datacite:format>
<datacite:publisher> <xsl:value-of select="normalize-space(.)" />
<xsl:value-of select="normalize-space(.)"/> </datacite:format>
</datacite:publisher> </xsl:for-each>
</xsl:for-each> </datacite:formats>
<xsl:for-each select="//base_dc:year"> <datacite:language>
<datacite:publicationYear> <xsl:value-of select="vocabulary:clean( //base_dc:lang, 'dnet:languages')" />
<xsl:value-of select="normalize-space(.)"/> </datacite:language>
</datacite:publicationYear>
</xsl:for-each> <oaf:accessrights>
<xsl:if test="//base_dc:oa[.='0']">
<datacite:formats> <datacite:rights rightsURI="http://purl.org/coar/access_right/c_16ec">restricted access</datacite:rights>
<xsl:for-each select="//dc:format"> </xsl:if>
<datacite:format> <xsl:if test="//base_dc:oa[.='1']">
<xsl:value-of select="normalize-space(.)"/> <datacite:rights rightsURI="http://purl.org/coar/access_right/c_abf2">open access</datacite:rights>
</datacite:format> </xsl:if>
</xsl:for-each> <xsl:for-each select="//dc:rights|//base_dc:rightsnorm">
</datacite:formats> <datacite:rights><xsl:value-of select="vocabulary:clean(., 'dnet:access_modes')" /></datacite:rights>
</xsl:for-each>
<datacite:language> </oaf:accessrights>
<xsl:value-of
select="vocabulary:clean( //base_dc:lang, 'dnet:languages')" </datacite:resource>
/>
</datacite:language> <xsl:for-each select="//dc:relation">
<xsl:if test="matches(normalize-space(.), '(info:eu-repo/grantagreement/ec/fp7/)(\d\d\d\d\d\d)(.*)', 'i')">
<!--<datacite:rightsList> <oaf:projectid>
<xsl:if test="//base_dc:oa[.='0']"> <xsl:value-of select="concat($varFP7, replace(normalize-space(.), '(info:eu-repo/grantagreement/ec/fp7/)(\d\d\d\d\d\d)(.*)', '$2', 'i'))" />
<datacite:rights rightsURI="http://purl.org/coar/access_right/c_16ec">restricted access</datacite:rights> </oaf:projectid>
</xsl:if> </xsl:if>
<xsl:if test="//base_dc:oa[.='1']"> <xsl:if test="matches(normalize-space(.), '(info:eu-repo/grantagreement/ec/h2020/)(\d\d\d\d\d\d)(.*)', 'i')">
<datacite:rights rightsURI="http://purl.org/coar/access_right/c_abf2">open access</datacite:rights> <oaf:projectid>
</xsl:if> <xsl:value-of select="concat($varH2020, replace(normalize-space(.), '(info:eu-repo/grantagreement/ec/h2020/)(\d\d\d\d\d\d)(.*)', '$2', 'i'))" />
<xsl:for-each select="//dc:rights|//base_dc:rightsnorm"> </oaf:projectid>
<datacite:rights> </xsl:if>
<xsl:value-of select="vocabulary:clean(., 'dnet:access_modes')"/> </xsl:for-each>
</datacite:rights>
</xsl:for-each> <xsl:choose>
</datacite:rightsList>--> <!-- I used an inline mapping because the field typenorm could be repeated and I have to specify a list of priority -->
</datacite:resource> <!-- Book part -->
<xsl:when test="//base_dc:typenorm = '111'">
<xsl:for-each select="//dc:relation"> <dr:CobjCategory type="publication">0013</dr:CobjCategory>
<xsl:if </xsl:when>
test="matches(normalize-space(.), '(info:eu-repo/grantagreement/ec/fp7/)(\d\d\d\d\d\d)(.*)', 'i')">
<oaf:projectid> <!-- Book -->
<xsl:value-of <xsl:when test="//base_dc:typenorm = '11'">
select="concat($varFP7, replace(normalize-space(.), '(info:eu-repo/grantagreement/ec/fp7/)(\d\d\d\d\d\d)(.*)', '$2', 'i'))" <dr:CobjCategory type="publication">0002</dr:CobjCategory>
/> </xsl:when>
</oaf:projectid>
</xsl:if> <!-- Article contribution -->
<xsl:if <xsl:when test="//base_dc:typenorm = '121'">
test="matches(normalize-space(.), '(info:eu-repo/grantagreement/ec/h2020/)(\d\d\d\d\d\d)(.*)', 'i')"> <dr:CobjCategory type="publication">0001</dr:CobjCategory>
<oaf:projectid> </xsl:when>
<xsl:value-of
select="concat($varH2020, replace(normalize-space(.), '(info:eu-repo/grantagreement/ec/h2020/)(\d\d\d\d\d\d)(.*)', '$2', 'i'))"
/> <!-- Journal/Newspaper -->
</oaf:projectid> <xsl:when test="//base_dc:typenorm = '12'">
</xsl:if> <dr:CobjCategory type="publication">0043</dr:CobjCategory>
</xsl:for-each> </xsl:when>
<xsl:choose> <!-- Report -->
<!-- I used an inline mapping because the field typenorm could be repeated and I have to specify a list of priority --> <xsl:when test="//base_dc:typenorm = '14'">
<dr:CobjCategory type="publication">0017</dr:CobjCategory>
<!-- Book part --> </xsl:when>
<xsl:when test="//base_dc:typenorm = '111'">
<dr:CobjCategory type="publication" <!-- Review -->
>0013</dr:CobjCategory> <xsl:when test="//base_dc:typenorm = '15'">
</xsl:when> <dr:CobjCategory type="publication">0015</dr:CobjCategory>
</xsl:when>
<!-- Book -->
<xsl:when test="//base_dc:typenorm = '11'"> <!-- Lecture -->
<dr:CobjCategory type="publication" <xsl:when test="//base_dc:typenorm = '17'">
>0002</dr:CobjCategory> <dr:CobjCategory type="publication">0010</dr:CobjCategory>
</xsl:when> </xsl:when>
<!-- Article contribution --> <!-- Bachelor's thesis -->
<xsl:when test="//base_dc:typenorm = '121'"> <xsl:when test="//base_dc:typenorm = '181'">
<dr:CobjCategory type="publication" <dr:CobjCategory type="publication">0008</dr:CobjCategory>
>0001</dr:CobjCategory> </xsl:when>
</xsl:when>
<!-- Master's thesis -->
<xsl:when test="//base_dc:typenorm = '182'">
<!-- Journal/Newspaper --> <dr:CobjCategory type="publication">0007</dr:CobjCategory>
<xsl:when test="//base_dc:typenorm = '12'"> </xsl:when>
<dr:CobjCategory type="publication"
>0043</dr:CobjCategory> <!-- Doctoral and postdoctoral thesis -->
</xsl:when> <xsl:when test="//base_dc:typenorm = '183'">
<dr:CobjCategory type="publication">0006</dr:CobjCategory>
<!-- Report --> </xsl:when>
<xsl:when test="//base_dc:typenorm = '14'">
<dr:CobjCategory type="publication" <!-- Thesis -->
>0017</dr:CobjCategory> <xsl:when test="//base_dc:typenorm = '18'">
</xsl:when> <dr:CobjCategory type="publication">0044</dr:CobjCategory>
</xsl:when>
<!-- Review -->
<xsl:when test="//base_dc:typenorm = '15'"> <!-- Patent -->
<dr:CobjCategory type="publication" <xsl:when test="//base_dc:typenorm = '1A'">
>0015</dr:CobjCategory> <dr:CobjCategory type="publication">0019</dr:CobjCategory>
</xsl:when> </xsl:when>
<!-- Lecture --> <!-- Text -->
<xsl:when test="//base_dc:typenorm = '17'"> <xsl:when test="//base_dc:typenorm = '1'">
<dr:CobjCategory type="publication" <dr:CobjCategory type="publication">0001</dr:CobjCategory>
>0010</dr:CobjCategory> </xsl:when>
</xsl:when>
<!-- Software -->
<!-- Bachelor's thesis --> <xsl:when test="//base_dc:typenorm = '6'">
<xsl:when test="//base_dc:typenorm = '181'"> <dr:CobjCategory type="software">0029</dr:CobjCategory>
<dr:CobjCategory type="publication" </xsl:when>
>0008</dr:CobjCategory>
</xsl:when> <!-- Dataset -->
<xsl:when test="//base_dc:typenorm = '7'">
<!-- Master's thesis --> <dr:CobjCategory type="dataset">0021</dr:CobjCategory>
<xsl:when test="//base_dc:typenorm = '182'"> </xsl:when>
<dr:CobjCategory type="publication"
>0007</dr:CobjCategory> <!-- Still image -->
</xsl:when> <xsl:when test="//base_dc:typenorm = '51'">
<dr:CobjCategory type="other">0025</dr:CobjCategory>
<!-- Doctoral and postdoctoral thesis --> </xsl:when>
<xsl:when test="//base_dc:typenorm = '183'">
<dr:CobjCategory type="publication" <!-- Moving image/Video -->
>0006</dr:CobjCategory> <xsl:when test="//base_dc:typenorm = '52'">
</xsl:when> <dr:CobjCategory type="other">0024</dr:CobjCategory>
</xsl:when>
<!-- Thesis -->
<xsl:when test="//base_dc:typenorm = '18'"> <!-- Image/Video -->
<dr:CobjCategory type="publication" <xsl:when test="//base_dc:typenorm = '5'">
>0044</dr:CobjCategory> <dr:CobjCategory type="other">0033</dr:CobjCategory>
</xsl:when> </xsl:when>
<!-- Patent --> <!-- Audio -->
<xsl:when test="//base_dc:typenorm = '1A'"> <xsl:when test="//base_dc:typenorm = '4'">
<dr:CobjCategory type="publication" <dr:CobjCategory type="other">0030</dr:CobjCategory>
>0019</dr:CobjCategory> </xsl:when>
</xsl:when>
<!-- Musical notation -->
<!-- Text --> <xsl:when test="//base_dc:typenorm = '2'">
<xsl:when test="//base_dc:typenorm = '1'"> <dr:CobjCategory type="other">0020</dr:CobjCategory>
<dr:CobjCategory type="publication" </xsl:when>
>0001</dr:CobjCategory>
</xsl:when> <!-- Map -->
<xsl:when test="//base_dc:typenorm = '3'">
<!-- Software --> <dr:CobjCategory type="other">0020</dr:CobjCategory>
<xsl:when test="//base_dc:typenorm = '6'"> </xsl:when>
<dr:CobjCategory type="software">0029</dr:CobjCategory>
</xsl:when> <!-- Other non-article -->
<xsl:when test="//base_dc:typenorm = '122'">
<!-- Dataset --> <dr:CobjCategory type="publication">0038</dr:CobjCategory>
<xsl:when test="//base_dc:typenorm = '7'"> </xsl:when>
<dr:CobjCategory type="dataset">0021</dr:CobjCategory>
</xsl:when> <!-- Course material -->
<xsl:when test="//base_dc:typenorm = '16'">
<!-- Still image --> <dr:CobjCategory type="publication">0038</dr:CobjCategory>
<xsl:when test="//base_dc:typenorm = '51'"> </xsl:when>
<dr:CobjCategory type="other">0025</dr:CobjCategory>
</xsl:when> <!-- Manuscript -->
<xsl:when test="//base_dc:typenorm = '19'">
<!-- Moving image/Video --> <dr:CobjCategory type="publication">0038</dr:CobjCategory>
<xsl:when test="//base_dc:typenorm = '52'"> </xsl:when>
<dr:CobjCategory type="other">0024</dr:CobjCategory>
</xsl:when> <!-- Conference object -->
<xsl:when test="//base_dc:typenorm = '13'">
<!-- Image/Video --> <dr:CobjCategory type="publication">0004</dr:CobjCategory>
<xsl:when test="//base_dc:typenorm = '5'"> </xsl:when>
<dr:CobjCategory type="other">0033</dr:CobjCategory>
</xsl:when> <!-- Unknown -->
<xsl:when test="//base_dc:typenorm = 'F'">
<!-- Audio --> <dr:CobjCategory type="other">0000</dr:CobjCategory>
<xsl:when test="//base_dc:typenorm = '4'"> </xsl:when>
<dr:CobjCategory type="other">0030</dr:CobjCategory> <xsl:otherwise>
</xsl:when> <dr:CobjCategory type="other">0000</dr:CobjCategory>
</xsl:otherwise>
<!-- Musical notation --> </xsl:choose>
<xsl:when test="//base_dc:typenorm = '2'">
<dr:CobjCategory type="other">0020</dr:CobjCategory> <oaf:accessrights>
</xsl:when> <xsl:choose>
<xsl:when test="//base_dc:oa[.='0']">CLOSED</xsl:when>
<!-- Map --> <xsl:when test="//base_dc:oa[.='1']">OPEN</xsl:when>
<xsl:when test="//base_dc:typenorm = '3'"> <xsl:when test="//base_dc:oa[.='2']">UNKNOWN</xsl:when>
<dr:CobjCategory type="other">0020</dr:CobjCategory> <xsl:when test="//base_dc:rightsnorm">
</xsl:when> <xsl:value-of select="vocabulary:clean(//base_dc:rightsnorm, 'dnet:access_modes')" />
</xsl:when>
<!-- Other non-article --> <xsl:when test="//dc:rights">
<xsl:when test="//base_dc:typenorm = '122'"> <xsl:value-of select="vocabulary:clean( //dc:rights, 'dnet:access_modes')" />
<dr:CobjCategory type="publication" </xsl:when>
>0038</dr:CobjCategory> <xsl:otherwise>UNKNOWN</xsl:otherwise>
</xsl:when> </xsl:choose>
</oaf:accessrights>
<!-- Course material -->
<xsl:when test="//base_dc:typenorm = '16'"> <xsl:for-each select="//base_dc:doi">
<dr:CobjCategory type="publication" <oaf:identifier identifierType="doi">
>0038</dr:CobjCategory> <xsl:value-of select="." />
</xsl:when> </oaf:identifier>
</xsl:for-each>
<!-- Manuscript -->
<xsl:when test="//base_dc:typenorm = '19'"> <xsl:for-each
<dr:CobjCategory type="publication" select="distinct-values(//dc:identifier[starts-with(., 'http') and ( not(contains(., '://dx.doi.org/') or contains(., '://doi.org/') or contains(., '://hdl.handle.net/')))])">
>0038</dr:CobjCategory> <oaf:identifier identifierType="url">
</xsl:when> <xsl:value-of select="." />
</oaf:identifier>
<!-- Conference object --> </xsl:for-each>
<xsl:when test="//base_dc:typenorm = '13'">
<dr:CobjCategory type="publication" <xsl:for-each select="distinct-values(//dc:identifier[starts-with(., 'http') and contains(., '://hdl.handle.net/')]/substring-after(., 'hdl.handle.net/'))">
>0004</dr:CobjCategory> <oaf:identifier identifierType="handle">
</xsl:when> <xsl:value-of select="." />
</oaf:identifier>
<!-- Unknown --> </xsl:for-each>
<xsl:when test="//base_dc:typenorm = 'F'">
<dr:CobjCategory type="other">0000</dr:CobjCategory> <xsl:for-each select="distinct-values(//dc:identifier[starts-with(., 'urn:nbn:nl:') or starts-with(., 'URN:NBN:NL:')])">
</xsl:when> <oaf:identifier identifierType='urn'>
<xsl:otherwise> <xsl:value-of select="." />
<dr:CobjCategory type="other">0000</dr:CobjCategory> </oaf:identifier>
</xsl:otherwise> </xsl:for-each>
</xsl:choose>
<oaf:identifier identifierType="oai-original">
<oaf:accessrights> <xsl:value-of
<xsl:choose> select="//oai:header/oai:identifier" />
<xsl:when test="//base_dc:oa[.='0']">CLOSED</xsl:when> </oaf:identifier>
<xsl:when test="//base_dc:oa[.='1']">OPEN</xsl:when>
<xsl:when test="//base_dc:oa[.='2']">UNKNOWN</xsl:when> <oaf:hostedBy>
<xsl:when test="//base_dc:rightsnorm"> <xsl:attribute name="name">
<xsl:value-of <xsl:value-of select="//base_dc:collname" />
select="vocabulary:clean(//base_dc:rightsnorm, 'dnet:access_modes')" </xsl:attribute>
/> <xsl:attribute name="id">
</xsl:when> <xsl:value-of select="concat('opendoar____::', //base_dc:collection/@opendoar_id)" />
<xsl:when test="//dc:rights"> </xsl:attribute>
<xsl:value-of </oaf:hostedBy>
select="vocabulary:clean( //dc:rights, 'dnet:access_modes')"
/> <oaf:collectedFrom>
</xsl:when> <xsl:attribute name="name">
<xsl:otherwise>UNKNOWN</xsl:otherwise> <xsl:value-of select="$varOfficialName" />
</xsl:choose> </xsl:attribute>
</oaf:accessrights> <xsl:attribute name="id">
<xsl:value-of select="$varDataSourceId" />
<xsl:if test="//base_dc:rightsnorm and not(contains(//base_dc:rightsnorm, ';'))"> </xsl:attribute>
<oaf:license><xsl:value-of select="vocabulary:clean(//base_dc:rightsnorm, 'dnet:licenses')" /></oaf:license> </oaf:collectedFrom>
</xsl:if>
<oaf:dateAccepted>
<xsl:for-each select="//base_dc:doi"> <xsl:value-of select="dateCleaner:dateISO( //dc:date[1] )" />
<oaf:identifier identifierType="doi"> </oaf:dateAccepted>
<xsl:value-of select="."/>
</oaf:identifier> <xsl:if test="//base_dc:oa[.='1']">
</xsl:for-each> <xsl:for-each select="//dc:relation[starts-with(., 'http')]">
<oaf:fulltext>
<xsl:for-each <xsl:value-of select="normalize-space(.)" />
select="distinct-values(//dc:identifier[starts-with(., 'http') and ( not(contains(., '://dx.doi.org/') or contains(., '://doi.org/') or contains(., '://hdl.handle.net/')))])"> </oaf:fulltext>
<oaf:identifier identifierType="url"> </xsl:for-each>
<xsl:value-of select="."/> </xsl:if>
</oaf:identifier>
</xsl:for-each> <xsl:for-each select="//base_dc:collection/@ror_id">
<oaf:relation relType="resultOrganization" subRelType="affiliation" relClass="hasAuthorInstitution" targetType="organization">
<xsl:for-each <xsl:choose>
select="distinct-values(//dc:identifier[starts-with(., 'http') and contains(., '://hdl.handle.net/')]/substring-after(., 'hdl.handle.net/'))"> <xsl:when test="contains(.,'https://ror.org/')">
<oaf:identifier identifierType="handle"> <xsl:value-of select="concat('ror_________::', normalize-space(.))" />
<xsl:value-of select="."/> </xsl:when>
</oaf:identifier> <xsl:otherwise>
</xsl:for-each> <xsl:value-of select="concat('ror_________::https://ror.org/', normalize-space(.))" />
</xsl:otherwise>
<xsl:for-each </xsl:choose>
select="distinct-values(//dc:identifier[starts-with(., 'urn:nbn:nl:') or starts-with(., 'URN:NBN:NL:')])"> </oaf:relation>
<oaf:identifier identifierType="urn"> </xsl:for-each>
<xsl:value-of select="."/>
</oaf:identifier> <oaf:datainfo>
</xsl:for-each> <oaf:inferred>false</oaf:inferred>
<oaf:deletedbyinference>false</oaf:deletedbyinference>
<oaf:identifier identifierType="oai-original"> <oaf:trust>0.89</oaf:trust>
<xsl:value-of select="//oai:header/oai:identifier"/> <oaf:inferenceprovenance/>
</oaf:identifier> <oaf:provenanceaction classid="sysimport:crosswalk:aggregator"
classname="sysimport:crosswalk:aggregator"
<oaf:hostedBy> schemeid="dnet:provenanceActions"
<xsl:attribute name="name"> schemename="dnet:provenanceActions"/>
<xsl:value-of select="//base_dc:collname"/> </oaf:datainfo>
</xsl:attribute> </metadata>
<xsl:attribute name="id"> <xsl:copy-of select="//*[local-name() = 'about']" />
<xsl:value-of </record>
select="concat('opendoar____::', //base_dc:collection/@opendoar_id)" </xsl:template>
/>
</xsl:attribute> <xsl:template match="//*[local-name() = 'header']">
</oaf:hostedBy> <xsl:if test="//oai:header/@status='deleted'">
<xsl:call-template name="terminate" />
<oaf:collectedFrom> </xsl:if>
<xsl:attribute name="name"> <xsl:copy>
<xsl:value-of select="$varOfficialName"/> <xsl:apply-templates select="node()|@*" />
</xsl:attribute> <xsl:element name="dr:dateOfTransformation">
<xsl:attribute name="id"> <xsl:value-of select="$transDate" />
<xsl:value-of select="$varDataSourceId"/> </xsl:element>
</xsl:attribute> </xsl:copy>
</oaf:collectedFrom> </xsl:template>
<oaf:dateAccepted> <xsl:template match="node()|@*">
<xsl:value-of select="dateCleaner:dateISO( //dc:date[1] )"/> <xsl:copy>
</oaf:dateAccepted> <xsl:apply-templates select="node()|@*" />
</xsl:copy>
<xsl:if test="//base_dc:oa[.='1']"> </xsl:template>
<xsl:for-each select="//dc:relation[starts-with(., 'http')]"> </xsl:stylesheet>
<oaf:fulltext> </CODE>
<xsl:value-of select="normalize-space(.)"/> </SCRIPT>
</oaf:fulltext> </CONFIGURATION>
</xsl:for-each> <STATUS />
</xsl:if> <SECURITY_PARAMETERS />
</BODY>
<xsl:for-each select="//base_dc:collection/@ror_id">
<oaf:relation relType="resultOrganization"
subRelType="affiliation" relClass="hasAuthorInstitution"
targetType="organization">
<xsl:choose>
<xsl:when test="contains(.,'https://ror.org/')">
<xsl:value-of
select="concat('ror_________::', normalize-space(.))"
/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="concat('ror_________::https://ror.org/', normalize-space(.))"
/>
</xsl:otherwise>
</xsl:choose>
</oaf:relation>
</xsl:for-each>
<oaf:datainfo>
<oaf:inferred>false</oaf:inferred>
<oaf:deletedbyinference>false</oaf:deletedbyinference>
<oaf:trust>0.89</oaf:trust>
<oaf:inferenceprovenance/>
<oaf:provenanceaction
classid="sysimport:crosswalk:aggregator"
classname="sysimport:crosswalk:aggregator"
schemeid="dnet:provenanceActions"
schemename="dnet:provenanceActions"/>
</oaf:datainfo>
</metadata>
<xsl:copy-of select="//*[local-name() = 'about']"/>
</record>
</xsl:template>
<xsl:template match="//*[local-name() = 'header']">
<xsl:if test="//oai:header/@status='deleted'">
<xsl:call-template name="terminate"/>
</xsl:if>
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
<xsl:element name="dr:dateOfTransformation">
<xsl:value-of select="$transDate"/>
</xsl:element>
</xsl:copy>
</xsl:template>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
</CODE>
</SCRIPT>
</CONFIGURATION>
<STATUS/>
<SECURITY_PARAMETERS/>
</BODY>
</RESOURCE_PROFILE> </RESOURCE_PROFILE>

View File

@ -130,7 +130,6 @@ public class ResultTagger implements Serializable {
// log.info("Remove constraints for " + communityId); // log.info("Remove constraints for " + communityId);
if (conf.getRemoveConstraintsMap().keySet().contains(communityId) && if (conf.getRemoveConstraintsMap().keySet().contains(communityId) &&
conf.getRemoveConstraintsMap().get(communityId).getCriteria() != null && conf.getRemoveConstraintsMap().get(communityId).getCriteria() != null &&
!conf.getRemoveConstraintsMap().get(communityId).getCriteria().isEmpty() &&
conf conf
.getRemoveConstraintsMap() .getRemoveConstraintsMap()
.get(communityId) .get(communityId)
@ -162,30 +161,29 @@ public class ResultTagger implements Serializable {
// Tagging for datasource // Tagging for datasource
final Set<String> datasources = new HashSet<>(); final Set<String> datasources = new HashSet<>();
final Set<String> cfhb = new HashSet<>(); final Set<String> collfrom = new HashSet<>();
final Set<String> hostdby = new HashSet<>(); final Set<String> hostdby = new HashSet<>();
if (Objects.nonNull(result.getInstance())) { if (Objects.nonNull(result.getInstance())) {
for (Instance i : result.getInstance()) { for (Instance i : result.getInstance()) {
if (Objects.nonNull(i.getCollectedfrom()) && Objects.nonNull(i.getCollectedfrom().getKey())) { if (Objects.nonNull(i.getCollectedfrom()) && Objects.nonNull(i.getCollectedfrom().getKey())) {
cfhb.add(i.getCollectedfrom().getKey()); collfrom.add(i.getCollectedfrom().getKey());
} }
if (Objects.nonNull(i.getHostedby()) && Objects.nonNull(i.getHostedby().getKey())) { if (Objects.nonNull(i.getHostedby()) && Objects.nonNull(i.getHostedby().getKey())) {
cfhb.add(i.getHostedby().getKey());
hostdby.add(i.getHostedby().getKey()); hostdby.add(i.getHostedby().getKey());
} }
} }
cfhb collfrom
.forEach( .forEach(
dsId -> datasources dsId -> datasources
.addAll( .addAll(
conf.getCommunityForDatasource(dsId, param))); conf.getCommunityForDatasource(dsId, param)));
hostdby.forEach(dsId -> { hostdby.forEach(dsId -> {
// datasources datasources
// .addAll( .addAll(
// conf.getCommunityForDatasource(dsId, param)); conf.getCommunityForDatasource(dsId, param));
if (conf.isEoscDatasource(dsId)) { if (conf.isEoscDatasource(dsId)) {
datasources.add("eosc"); datasources.add("eosc");
} }
@ -228,7 +226,6 @@ public class ResultTagger implements Serializable {
.forEach(communityId -> { .forEach(communityId -> {
if (!removeCommunities.contains(communityId) && if (!removeCommunities.contains(communityId) &&
conf.getSelectionConstraintsMap().get(communityId).getCriteria() != null && conf.getSelectionConstraintsMap().get(communityId).getCriteria() != null &&
!conf.getSelectionConstraintsMap().get(communityId).getCriteria().isEmpty() &&
conf conf
.getSelectionConstraintsMap() .getSelectionConstraintsMap()
.get(communityId) .get(communityId)

View File

@ -33,8 +33,6 @@ public class SelectionConstraints implements Serializable {
// Constraints in or // Constraints in or
public boolean verifyCriteria(final Map<String, List<String>> param) { public boolean verifyCriteria(final Map<String, List<String>> param) {
if (criteria.isEmpty())
return true;
for (Constraints selc : criteria) { for (Constraints selc : criteria) {
if (selc.verifyCriteria(param)) { if (selc.verifyCriteria(param)) {
return true; return true;