oai datacite metadata

This commit is contained in:
Arno Kaimbacher 2018-12-17 17:10:17 +01:00
parent 3c50618c8a
commit e7d8dc21a0
7 changed files with 308 additions and 109 deletions

View File

@ -5,6 +5,7 @@ use App\Models\Title;
use App\Models\License; use App\Models\License;
use App\Models\Person; use App\Models\Person;
use App\Models\File; use App\Models\File;
use App\Models\GeolocationBox;
/** /**
* DatasetExtension short summary. * DatasetExtension short summary.
@ -19,7 +20,7 @@ trait DatasetExtension
protected $externalFields = array( protected $externalFields = array(
'TitleMain' => array( 'TitleMain' => array(
'model' => Title::class, 'model' => Title::class,
'options' => array('type' => 'main'), 'options' => array('type' => ['main', 'alternative', 'subtitle', 'other']),
'fetch' => 'eager' 'fetch' => 'eager'
), ),
'TitleAbstract' => array( 'TitleAbstract' => array(
@ -56,6 +57,11 @@ trait DatasetExtension
'relation' => 'files', 'relation' => 'files',
'fetch' => 'eager' 'fetch' => 'eager'
), ),
'GeolocationBox' => array(
'model' => GeolocationBox::class,
'relation' => 'geolocation',
'fetch' => 'eager'
),
); );
protected $internalFields = array(); protected $internalFields = array();
@ -229,9 +235,17 @@ trait DatasetExtension
if (isset($this->externalFields[$fieldname]['options'])) { if (isset($this->externalFields[$fieldname]['options'])) {
$options = $this->externalFields[$fieldname]['options']; $options = $this->externalFields[$fieldname]['options'];
foreach ($options as $column => $value) { foreach ($options as $column => $value) {
// $searchString = ',';
// if (strpos($value, $searchString) !== false) {
// $arr = explode(",", $value);
if (is_array($value)) {
$arr = $value;
$select->whereIn($column, $arr);
} else {
$select = $select->where($column, $value); $select = $select->where($column, $value);
} }
} }
}
// Get dependent rows // Get dependent rows

View File

@ -12,6 +12,7 @@ use App\Models\XmlCache;
use App\Models\File; use App\Models\File;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon; use Carbon\Carbon;
use App\Models\GeolocationBox;
class Dataset extends Model class Dataset extends Model
{ {
@ -51,6 +52,14 @@ class Dataset extends Model
// $this->_init(); // $this->_init();
} }
/**
* Get the user that owns the phone.
*/
public function geolocation()
{
return $this->belongsTo(GeolocationBox::class, 'dataset_id', 'id');
}
/** /**
* Get the project that the dataset belongs to. * Get the project that the dataset belongs to.
*/ */

View File

@ -0,0 +1,25 @@
<?php
namespace App\Models;
use App\Models\Dataset;
use Illuminate\Database\Eloquent\Model;
class GeolocationBox extends Model
{
protected $table = 'geolocation_box';
public $timestamps = false;
protected $fillable = ['xmin', 'xmax', 'ymin', 'ymax'];
protected $casts = [
'xmin' => 'float',
'xmax' => 'float',
'ymin' => 'float',
'ymax' => 'float'
];
public function dataset()
{
return $this->belongsTo(Dataset::class, 'dataset_id', 'id');
}
}

84
composer.lock generated
View File

@ -279,16 +279,16 @@
}, },
{ {
"name": "egulias/email-validator", "name": "egulias/email-validator",
"version": "2.1.6", "version": "2.1.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/egulias/EmailValidator.git", "url": "https://github.com/egulias/EmailValidator.git",
"reference": "0578b32b30b22de3e8664f797cf846fc9246f786" "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0578b32b30b22de3e8664f797cf846fc9246f786", "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/709f21f92707308cdf8f9bcfa1af4cb26586521e",
"reference": "0578b32b30b22de3e8664f797cf846fc9246f786", "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -332,7 +332,7 @@
"validation", "validation",
"validator" "validator"
], ],
"time": "2018-09-25T20:47:26+00:00" "time": "2018-12-04T22:38:24+00:00"
}, },
{ {
"name": "erusev/parsedown", "name": "erusev/parsedown",
@ -1747,7 +1747,7 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
@ -1816,16 +1816,16 @@
}, },
{ {
"name": "symfony/contracts", "name": "symfony/contracts",
"version": "v1.0.1", "version": "v1.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/contracts.git", "url": "https://github.com/symfony/contracts.git",
"reference": "3edf0ab943d1985a356721952cba36ff31bd6e5f" "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/contracts/zipball/3edf0ab943d1985a356721952cba36ff31bd6e5f", "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf",
"reference": "3edf0ab943d1985a356721952cba36ff31bd6e5f", "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1880,11 +1880,11 @@
"interoperability", "interoperability",
"standards" "standards"
], ],
"time": "2018-11-24T09:35:08+00:00" "time": "2018-12-05T08:06:11+00:00"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v4.2.0", "version": "v4.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
@ -1937,16 +1937,16 @@
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/debug.git", "url": "https://github.com/symfony/debug.git",
"reference": "2016b3eec2e49c127dd02d0ef44a35c53181560d" "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/2016b3eec2e49c127dd02d0ef44a35c53181560d", "url": "https://api.github.com/repos/symfony/debug/zipball/a2233f555ddf55e5600f386fba7781cea1cb82d3",
"reference": "2016b3eec2e49c127dd02d0ef44a35c53181560d", "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1989,20 +1989,20 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-11-11T19:48:54+00:00" "time": "2018-11-27T12:43:10+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "d365fc4416ec4980825873962ea5d1b1bca46f1a" "reference": "cc35e84adbb15c26ae6868e1efbf705a917be6b5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d365fc4416ec4980825873962ea5d1b1bca46f1a", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc35e84adbb15c26ae6868e1efbf705a917be6b5",
"reference": "d365fc4416ec4980825873962ea5d1b1bca46f1a", "reference": "cc35e84adbb15c26ae6868e1efbf705a917be6b5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2052,11 +2052,11 @@
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-11-26T10:17:44+00:00" "time": "2018-11-30T18:07:24+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
@ -2105,7 +2105,7 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
@ -2159,16 +2159,16 @@
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "78528325d90e5ad54a6e9eca750fe176932bc4fa" "reference": "31f20eb6e00467ae85501dd98770aef17cd9aba7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/78528325d90e5ad54a6e9eca750fe176932bc4fa", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/31f20eb6e00467ae85501dd98770aef17cd9aba7",
"reference": "78528325d90e5ad54a6e9eca750fe176932bc4fa", "reference": "31f20eb6e00467ae85501dd98770aef17cd9aba7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2244,7 +2244,7 @@
], ],
"description": "Symfony HttpKernel Component", "description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-11-26T14:04:48+00:00" "time": "2018-12-06T14:59:33+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@ -2424,7 +2424,7 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
@ -2473,16 +2473,16 @@
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/routing.git", "url": "https://github.com/symfony/routing.git",
"reference": "86eb1a581279b5e40ca280a4f63a15e37d51d16c" "reference": "94a3dd89bda078bef0c3bf79eb024fe136dd58f9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/86eb1a581279b5e40ca280a4f63a15e37d51d16c", "url": "https://api.github.com/repos/symfony/routing/zipball/94a3dd89bda078bef0c3bf79eb024fe136dd58f9",
"reference": "86eb1a581279b5e40ca280a4f63a15e37d51d16c", "reference": "94a3dd89bda078bef0c3bf79eb024fe136dd58f9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2546,25 +2546,25 @@
"uri", "uri",
"url" "url"
], ],
"time": "2018-11-26T08:40:22+00:00" "time": "2018-12-03T13:20:34+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v4.2.0", "version": "v4.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "ff9a878c9b8f8bcd4d9138e2d32f508c942773d9" "reference": "c0e2191e9bed845946ab3d99767513b56ca7dcd6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/ff9a878c9b8f8bcd4d9138e2d32f508c942773d9", "url": "https://api.github.com/repos/symfony/translation/zipball/c0e2191e9bed845946ab3d99767513b56ca7dcd6",
"reference": "ff9a878c9b8f8bcd4d9138e2d32f508c942773d9", "reference": "c0e2191e9bed845946ab3d99767513b56ca7dcd6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1.3", "php": "^7.1.3",
"symfony/contracts": "^1.0", "symfony/contracts": "^1.0.2",
"symfony/polyfill-mbstring": "~1.0" "symfony/polyfill-mbstring": "~1.0"
}, },
"conflict": { "conflict": {
@ -2619,11 +2619,11 @@
], ],
"description": "Symfony Translation Component", "description": "Symfony Translation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-11-27T07:20:32+00:00" "time": "2018-12-06T10:45:32+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v3.4.19", "version": "v3.4.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",

View File

@ -11,6 +11,9 @@
<!--<xsl:param name="urnResolverUrl" />--> <!--<xsl:param name="urnResolverUrl" />-->
<!-- add include here for each new metadata format -->
<xsl:include href="prefixes/oai_datacite.xslt" />
<xsl:output method="xml" indent="yes" encoding="utf-8" /> <xsl:output method="xml" indent="yes" encoding="utf-8" />
@ -157,7 +160,6 @@
<xsl:text>http://www.openarchives.org/OAI/2.0/oai_dc/</xsl:text> <xsl:text>http://www.openarchives.org/OAI/2.0/oai_dc/</xsl:text>
</metadataNamespace> </metadataNamespace>
</metadataFormat> </metadataFormat>
<metadataFormat> <metadataFormat>
<metadataPrefix> <metadataPrefix>
<xsl:text>oai_datacite</xsl:text> <xsl:text>oai_datacite</xsl:text>
@ -169,7 +171,6 @@
http://datacite.org/schema/kernel-4 http://datacite.org/schema/kernel-4
</metadataNamespace> </metadataNamespace>
</metadataFormat> </metadataFormat>
</ListMetadataFormats> </ListMetadataFormats>
</xsl:template> </xsl:template>
@ -276,7 +277,6 @@
<!--loop--> <!--loop-->
<xsl:apply-templates select="SetSpec" /> <xsl:apply-templates select="SetSpec" />
</header> </header>
<xsl:choose> <xsl:choose>
<!-- nicht bei ListIdentifiers--> <!-- nicht bei ListIdentifiers-->
<xsl:when test="$oai_verb!='ListIdentifiers' and @ServerState!='deleted'"> <xsl:when test="$oai_verb!='ListIdentifiers' and @ServerState!='deleted'">
@ -290,7 +290,6 @@
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</metadata> </metadata>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
@ -301,59 +300,6 @@
</setSpec> </setSpec>
</xsl:template> </xsl:template>
<xsl:template match="Rdr_Dataset" mode="oai_datacite">
<resource xmlns="http://datacite.org/schema/kernel-4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
<!-- <isReferenceQuality>true</isReferenceQuality>
<schemaVersion>4.1</schemaVersion>
<datacentreSymbol>RDR.GBA</datacentreSymbol> -->
<identifier>
<xsl:text>oai:</xsl:text>
<xsl:value-of select="$repIdentifier" />
<xsl:text>:</xsl:text>
<xsl:value-of select="@Id" />
</identifier>
<!--<datacite:creator>-->
<creators>
<xsl:apply-templates select="PersonAuthor" mode="oai_datacite" />
</creators>
<publicationYear><xsl:value-of select="@PublishedYear" /></publicationYear>
</resource>
</xsl:template>
<xsl:template match="PersonAuthor" mode="oai_datacite">
<creator>
<creatorName>
<xsl:if test="@NameType != ''" >
<xsl:attribute name="nameType">
<xsl:value-of select="@NameType" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="@LastName" />
<xsl:if test="@FirstName != ''" >
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:value-of select="@FirstName" />
<xsl:if test="@AcademicTitle != ''" >
<xsl:text> (</xsl:text>
<xsl:value-of select="@AcademicTitle" />
<xsl:text>)</xsl:text>
</xsl:if>
</creatorName>
<givenName><xsl:value-of select="@FirstName" /></givenName>
<familyName><xsl:value-of select="@LastName" /></familyName>
<xsl:if test="@IdentifierOrcid != ''" >
<nameIdentifier schemeURI="http://orcid.org/" nameIdentifierScheme="ORCID" ><xsl:value-of select="@IdentifierOrcid" /></nameIdentifier>
</xsl:if>
<!--
<nameType><xsl:value-of select="@NameType" /></nameType>
</xsl:if> -->
<affiliation>GBA</affiliation>
</creator>
</xsl:template>
<xsl:template match="Rdr_Dataset" mode="oai_dc"> <xsl:template match="Rdr_Dataset" mode="oai_dc">
<oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> <oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<!-- dc:title --> <!-- dc:title -->
@ -361,7 +307,17 @@
<!-- dc:description --> <!-- dc:description -->
<xsl:apply-templates select="TitleAbstract" mode="oai_dc" /> <xsl:apply-templates select="TitleAbstract" mode="oai_dc" />
<!--<dc:creator>--> <!--<dc:creator>-->
<!-- Creator: Autor (falls vorhanden), sonst Herausgeber (falls vorhanden), sonst Urhebende Koerperschaft -->
<xsl:choose>
<xsl:when test="PersonAuthor">
<xsl:apply-templates select="PersonAuthor" mode="oai_dc" /> <xsl:apply-templates select="PersonAuthor" mode="oai_dc" />
</xsl:when>
<xsl:when test="@CreatingCorporation">
<dc:creator>
<xsl:value-of select="@CreatingCorporation" />
</dc:creator>
</xsl:when>
</xsl:choose>
<!-- dc:contributor --> <!-- dc:contributor -->
<xsl:apply-templates select="PersonContributor" mode="oai_dc" /> <xsl:apply-templates select="PersonContributor" mode="oai_dc" />
<!-- dc:date (call-template, weil die 'Funktion' nur einmal aufgerufen werden soll, nicht einmal für jedes Date--> <!-- dc:date (call-template, weil die 'Funktion' nur einmal aufgerufen werden soll, nicht einmal für jedes Date-->
@ -381,7 +337,6 @@
<xsl:apply-templates select="@Language" mode="oai_dc" /> <xsl:apply-templates select="@Language" mode="oai_dc" />
<!-- dc:rights --> <!-- dc:rights -->
<xsl:apply-templates select="Licence" mode="oai_dc" /> <xsl:apply-templates select="Licence" mode="oai_dc" />
</oai_dc:dc> </oai_dc:dc>
</xsl:template> </xsl:template>
@ -400,7 +355,7 @@
</dc:description> </dc:description>
</xsl:template> </xsl:template>
<xsl:template match="PersonAuthor|PersonEditor" mode="oai_dc"> <!-- <xsl:template match="PersonAuthor|PersonEditor" mode="oai_dc">
<dc:creator> <dc:creator>
<xsl:value-of select="@LastName" /> <xsl:value-of select="@LastName" />
<xsl:if test="@FirstName != ''" > <xsl:if test="@FirstName != ''" >
@ -413,7 +368,7 @@
<xsl:text>)</xsl:text> <xsl:text>)</xsl:text>
</xsl:if> </xsl:if>
</dc:creator> </dc:creator>
</xsl:template> </xsl:template> -->
<xsl:template match="PersonContributor" mode="oai_dc"> <xsl:template match="PersonContributor" mode="oai_dc">
<dc:contributor> <dc:contributor>
@ -453,6 +408,7 @@
</dc:date> </dc:date>
</xsl:template> </xsl:template>
<!-- für ListRecords --> <!-- für ListRecords -->
<xsl:template match="@Type" mode="oai_dc"> <xsl:template match="@Type" mode="oai_dc">
<dc:type> <dc:type>
@ -488,6 +444,4 @@
</dc:rights> </dc:rights>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* This file is part of RDR.
*
* LICENCE
* RDR is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the Licence, or any later version.
* OPUS is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details. You should have received a copy of the GNU General Public License
* along with OPUS; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @category Application
* @package Module_Oai
* @author Michael Lang <lang@zib.de>
* @author Jens Schwidder <schwidder@zib.de>
* @copyright Copyright (c) 2008-2016, OPUS 4 development team
* @license http://www.gnu.org/licenses/gpl.html General Public License
*/
-->
<!--
/**
* Transforms the xml representation of an RDR model dataset to datacite
* xml as required by the OAI-PMH protocol.
*/
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
<xsl:output method="xml" indent="yes" />
<xsl:template match="Rdr_Dataset" mode="oai_datacite">
<resource xmlns="http://datacite.org/schema/kernel-4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
<!-- <isReferenceQuality>true</isReferenceQuality>
<schemaVersion>4.1</schemaVersion>
<datacentreSymbol>RDR.GBA</datacentreSymbol> -->
<identifier>
<xsl:text>oai:</xsl:text>
<xsl:value-of select="$repIdentifier" />
<xsl:text>:</xsl:text>
<xsl:value-of select="@Id" />
</identifier>
<!--<datacite:creator>-->
<creators>
<xsl:apply-templates select="PersonAuthor" mode="oai_datacite" />
</creators>
<titles>
<xsl:apply-templates select="TitleMain" mode="oai_datacite" />
</titles>
<publisher>
<xsl:value-of select="@PublisherName" />
</publisher>
<publicationYear>
<xsl:value-of select="ServerDatePublished/@Year"/>
</publicationYear>
<language>
<xsl:value-of select="@Language" />
</language>
<resourceType resourceTypeGeneral="Dataset">
<xsl:text>Dataset</xsl:text>
<!-- <xsl:value-of select="@Type" /> -->
</resourceType>
<rightsList>
<xsl:apply-templates select="Licence" mode="oai_datacite" />
</rightsList>
<sizes>
<size>
<xsl:value-of select="count(File)"/>
<xsl:text> datasets</xsl:text>
</size>
</sizes>
<formats>
<xsl:apply-templates select="File/@MimeType" mode="oai_datacite" />
</formats>
<descriptions>
<xsl:apply-templates select="TitleAbstract" mode="oai_datacite" />
</descriptions>
<geoLocations>
<xsl:apply-templates select="GeolocationBox" mode="oai_datacite" />
<!-- <geoLocation>
<geoLocationBox>
<westBoundLongitude>6.58987</westBoundLongitude>
<eastBoundLongitude>6.83639</eastBoundLongitude>
<southBoundLatitude>50.16</southBoundLatitude>
<northBoundLatitude>50.18691</northBoundLatitude>
</geoLocationBox>
</geoLocation> -->
</geoLocations>
</resource>
</xsl:template>
<xsl:template match="GeolocationBox" mode="oai_datacite">
<geoLocation>
<geoLocationBox>
<westBoundLongitude><xsl:value-of select="@Xmin" /></westBoundLongitude>
<eastBoundLongitude><xsl:value-of select="@Xmax" /></eastBoundLongitude>
<southBoundLatitude><xsl:value-of select="@Ymin" /></southBoundLatitude>
<northBoundLatitude><xsl:value-of select="@Ymax" /></northBoundLatitude>
</geoLocationBox>
</geoLocation>
</xsl:template>
<xsl:template match="TitleAbstract" mode="oai_datacite">
<description>
<xsl:attribute name="xml:lang">
<xsl:value-of select="@Language" />
</xsl:attribute>
<xsl:if test="@Type != ''">
<xsl:attribute name="descriptionType">
<xsl:value-of select="@Type" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="@Value" />
</description>
</xsl:template>
<xsl:template match="TitleMain" mode="oai_datacite">
<title>
<xsl:if test="@Language != ''">
<xsl:attribute name="xml:lang">
<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:value-of select="@Value"/>
</title>
</xsl:template>
<xsl:template match="PersonAuthor" mode="oai_datacite">
<creator>
<creatorName>
<xsl:if test="@NameType != ''">
<xsl:attribute name="nameType">
<xsl:value-of select="@NameType" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="@LastName" />
<xsl:if test="@FirstName != ''">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:value-of select="@FirstName" />
<xsl:if test="@AcademicTitle != ''">
<xsl:text> (</xsl:text>
<xsl:value-of select="@AcademicTitle" />
<xsl:text>)</xsl:text>
</xsl:if>
</creatorName>
<givenName>
<xsl:value-of select="@FirstName" />
</givenName>
<familyName>
<xsl:value-of select="@LastName" />
</familyName>
<xsl:if test="@IdentifierOrcid != ''">
<nameIdentifier schemeURI="http://orcid.org/" nameIdentifierScheme="ORCID">
<xsl:value-of select="@IdentifierOrcid" />
</nameIdentifier>
</xsl:if>
<!--
<nameType><xsl:value-of select="@NameType" /></nameType>
</xsl:if> -->
<affiliation>GBA</affiliation>
</creator>
</xsl:template>
<xsl:template match="File/@MimeType" mode="oai_datacite">
<format>
<xsl:value-of select="." />
</format>
</xsl:template>
<xsl:template match="Licence" mode="oai_datacite">
<rights>
<xsl:if test="@LinkLicence != ''">
<xsl:attribute name="rightsURI">
<xsl:value-of select="@LinkLicence" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="@NameLong" />
</rights>
</xsl:template>
</xsl:stylesheet>

View File

@ -18,7 +18,7 @@
</conditions> </conditions>
<action type="Rewrite" url="index.php" /> <action type="Rewrite" url="index.php" />
</rule> </rule>
<rule name="Ruke 3" stopProcessing="true"> <rule name="Rule 3" stopProcessing="true">
<match url="^(CHANGELOG\.md|composer\.(json|lock))" ignoreCase="false" /> <match url="^(CHANGELOG\.md|composer\.(json|lock))" ignoreCase="false" />
<action type="Rewrite" url="index.php?404" appendQueryString="false" /> <action type="Rewrite" url="index.php?404" appendQueryString="false" />
</rule> </rule>