feature bugs oai

This commit is contained in:
Arno Kaimbacher 2022-02-04 17:07:30 +01:00
parent 526b48b06e
commit 46a68e5418
4 changed files with 67 additions and 42 deletions

View File

@ -34,12 +34,12 @@ trait DatasetExtension
),
'TitleAbstract' => array(
'model' => Description::class,
'options' => array('type' => ['Abstract']),
'options' => array('type' => ['Abstract', 'Translated']),
'fetch' => 'eager'
),
'TitleAbstractAdditional' => array(
'model' => Description::class,
'options' => array('type' => ['Translated', 'Methods', 'Technical_info', 'Series_information', 'Other']),
'options' => array('type' => ['Methods', 'Technical_info', 'Series_information', 'Other']),
'fetch' => 'eager'
),
'Licence' => array(

View File

@ -17,7 +17,7 @@
<xsl:output method="xml" indent="yes" encoding="utf-8" />
<xsl:param name="responseDate" />
<xsl:param name="unixTimestamp" />
<xsl:param name="unixTimestamp" />
<xsl:param name="email" />
<xsl:param name="earliestDatestamp" />
<xsl:param name="setPubType" />
@ -381,9 +381,9 @@
<!-- dc:language -->
<xsl:apply-templates select="@Language" mode="oai_dc" />
<!-- dc:relation -->
<xsl:if test="Identifier">
<xsl:apply-templates select="Identifier" mode="oai_dc" />
</xsl:if>
<xsl:if test="Identifier">
<xsl:apply-templates select="Identifier" mode="oai_dc" />
</xsl:if>
<xsl:apply-templates select="Reference" mode="oai_dc" />
<!-- dc:coverage -->
<xsl:apply-templates select="Coverage" mode="oai_dc" />
@ -434,7 +434,7 @@
<xsl:template match="TitleMain" mode="oai_dc">
<dc:title>
<xsl:attribute name="xml:lang">
<xsl:attribute name="xml:lang">
<xsl:value-of select="@Language" />
</xsl:attribute>
<xsl:value-of select="@Value"/>
@ -443,7 +443,7 @@
<xsl:template match="TitleAdditional" mode="oai_dc">
<dc:title>
<xsl:attribute name="xml:lang">
<xsl:attribute name="xml:lang">
<xsl:value-of select="@Language" />
</xsl:attribute>
<xsl:value-of select="@Value"/>
@ -540,14 +540,14 @@
</xsl:template>
<xsl:template match="EmbargoDate" mode="oai_dc">
<xsl:if test="$unixTimestamp &lt; ./@UnixTimestamp" >
<dc:date>
<xsl:text>info:eu-repo/date/embargoEnd/</xsl:text>
<xsl:value-of select="./@Year"/>
- <xsl:value-of select="format-number(./@Month,'00')"/>
- <xsl:value-of select="format-number(./@Day,'00')"/>
</dc:date>
</xsl:if>
<xsl:if test="$unixTimestamp &lt; ./@UnixTimestamp">
<dc:date>
<xsl:text>info:eu-repo/date/embargoEnd/</xsl:text>
<xsl:value-of select="./@Year"/>
- <xsl:value-of select="format-number(./@Month,'00')"/>
- <xsl:value-of select="format-number(./@Day,'00')"/>
</dc:date>
</xsl:if>
</xsl:template>
@ -564,23 +564,30 @@
<xsl:template match="File/@MimeType" mode="oai_dc">
<dc:format>
<xsl:value-of select="." />
<xsl:choose>
<xsl:when test=". = 'application/x-sqlite3'">
<xsl:text>application/geopackage+sqlite3</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="." />
</xsl:otherwise>
</xsl:choose>
</dc:format>
</xsl:template>
<!-- <xsl:template match="File" mode="oai_dc">
<!-- <xsl:template match="File" mode="oai_dc">
<dc:identifier>
<xsl:value-of select="@PathName" />
<xsl:value-of select="concat($downloadLink, @Id)" />
</dc:identifier>
</xsl:template> -->
<xsl:template match="Identifier" mode="oai_dc">
<dc:relation>
<!-- <xsl:value-of select="concat($doiLink, @Value)" /> -->
<xsl:value-of select="concat($doiPrefix, @Value)" />
</dc:relation>
</xsl:template>
<xsl:template match="Identifier" mode="oai_dc">
<dc:relation>
<!-- <xsl:value-of select="concat($doiLink, @Value)" /> -->
<xsl:value-of select="concat($doiPrefix, @Value)" />
</dc:relation>
</xsl:template>
<xsl:template match="@CreatingCorporation" mode="oai_dc">
<dc:language>

View File

@ -183,7 +183,8 @@
</xsl:attribute>
<xsl:if test="@Type != ''">
<xsl:attribute name="descriptionType">
<xsl:value-of select="@Type" />
<!-- <xsl:value-of select="@Type" /> -->
<xsl:text>Abstract</xsl:text>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="@Value" />

View File

@ -185,7 +185,8 @@
</xsl:attribute>
<xsl:if test="@Type != ''">
<xsl:attribute name="descriptionType">
<xsl:value-of select="@Type" />
<!-- <xsl:value-of select="@Type" /> -->
<xsl:text>Abstract</xsl:text>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="@Value" />
@ -261,11 +262,20 @@
<xsl:value-of select="@Language" />
</xsl:attribute>
</xsl:if>
<xsl:if test="@Type != '' and @Type != 'Main'">
<xsl:attribute name="titleType">
<xsl:value-of select="@Type" />
</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="@Type != '' and @Type != 'Sub' and @Type != 'Main'">
<xsl:attribute name="titleType">
<xsl:value-of select="@Type" />
<xsl:text>Title</xsl:text>
</xsl:attribute>
</xsl:when>
<xsl:when test="@Type = 'Sub'">
<xsl:attribute name="titleType">
<xsl:value-of select="@Type" />
<xsl:text>title</xsl:text>
</xsl:attribute>
</xsl:when>
</xsl:choose>
<xsl:value-of select="@Value"/>
</title>
</xsl:template>
@ -353,7 +363,7 @@
<familyName>
<xsl:value-of select="@LastName" />
</familyName>
<affiliation>GBA</affiliation>
<affiliation>GBA</affiliation>
</xsl:if>
<xsl:if test="@IdentifierOrcid != ''">
@ -371,7 +381,14 @@
<xsl:template match="File/@MimeType" mode="oai_datacite"
xmlns="http://datacite.org/schema/kernel-4">
<format>
<xsl:value-of select="." />
<xsl:choose>
<xsl:when test=". = 'application/x-sqlite3'">
<xsl:text>application/geopackage+sqlite3</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="." />
</xsl:otherwise>
</xsl:choose>
</format>
</xsl:template>
@ -393,7 +410,7 @@
<xsl:text>SPDX</xsl:text>
</xsl:attribute>
<xsl:attribute name="rightsIdentifier">
<xsl:value-of select="@Name" />
<xsl:value-of select="@Name" />
</xsl:attribute>
<xsl:value-of select="@NameLong" />
</rights>