- composer updates
- Formatierungsfehler bei Coverage im XML-Output von dc:coverage wurde behoben - DataCite: AlternateIdentifier zeigt nun die Landing Page zum Datensatz an - statt "Datum der Freischaltung" wird nun "Embargo-Ende" auf der Landing Page angezeigt - Projekte werden nun bei der OAI-ListSets-Abfrage angezeigt siehe: https://repository.geologie.ac.at/oai?verb=ListSets - Abstand vor dem Titel in den Suchergebnissen
This commit is contained in:
parent
7b69477712
commit
35e71a13c3
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Oai;
|
||||||
use App\Exceptions\OaiModelException;
|
use App\Exceptions\OaiModelException;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Dataset;
|
use App\Models\Dataset;
|
||||||
|
use App\Models\Project;
|
||||||
use App\Models\Oai\Configuration as OaiModelConfiguration;
|
use App\Models\Oai\Configuration as OaiModelConfiguration;
|
||||||
use App\Models\Oai\OaiModelError;
|
use App\Models\Oai\OaiModelError;
|
||||||
use App\Models\Oai\ResumptionTokens;
|
use App\Models\Oai\ResumptionTokens;
|
||||||
|
@ -118,6 +119,7 @@ class RequestController extends Controller
|
||||||
// set OAI base url
|
// set OAI base url
|
||||||
$uri = explode('?', $_SERVER['REQUEST_URI'], 2);
|
$uri = explode('?', $_SERVER['REQUEST_URI'], 2);
|
||||||
$this->proc->setParameter('', 'baseURL', url('/') . $uri[0]);
|
$this->proc->setParameter('', 'baseURL', url('/') . $uri[0]);
|
||||||
|
$this->proc->setParameter('', 'repURL', url('/'));
|
||||||
|
|
||||||
// $resumptionPath = $this->configuration->getResumptionTokenPath();
|
// $resumptionPath = $this->configuration->getResumptionTokenPath();
|
||||||
|
|
||||||
|
@ -298,12 +300,13 @@ class RequestController extends Controller
|
||||||
|
|
||||||
//$oaiSets = new Oai_Model_Sets();
|
//$oaiSets = new Oai_Model_Sets();
|
||||||
$sets = array(
|
$sets = array(
|
||||||
'bibliography:true' => 'Set for bibliographic entries',
|
// 'bibliography:true' => 'Set for bibliographic entries',
|
||||||
'bibliography:false' => 'Set for non-bibliographic entries',
|
// 'bibliography:false' => 'Set for non-bibliographic entries',
|
||||||
);
|
);
|
||||||
$sets = array_merge(
|
$sets = array_merge(
|
||||||
$sets,
|
$sets,
|
||||||
$this->getSetsForDocumentTypes()
|
$this->getSetsForDocumentTypes(),
|
||||||
|
$this->getSetsForProjects(),
|
||||||
);
|
);
|
||||||
//$sets = $this->getSetsForDocumentTypes();
|
//$sets = $this->getSetsForDocumentTypes();
|
||||||
|
|
||||||
|
@ -387,12 +390,21 @@ class RequestController extends Controller
|
||||||
$finder->whereIn('server_state', $this->deliveringDocumentStates);
|
$finder->whereIn('server_state', $this->deliveringDocumentStates);
|
||||||
if (array_key_exists('set', $oaiRequest)) {
|
if (array_key_exists('set', $oaiRequest)) {
|
||||||
$setarray = explode(':', $oaiRequest['set']);
|
$setarray = explode(':', $oaiRequest['set']);
|
||||||
|
|
||||||
if ($setarray[0] == 'data-type') {
|
if ($setarray[0] == 'data-type') {
|
||||||
if (count($setarray) === 2 and !empty($setarray[1])) {
|
if (count($setarray) === 2 and !empty($setarray[1])) {
|
||||||
$finder->where('type', $setarray[1]);
|
$finder->where('type', $setarray[1]);
|
||||||
}
|
}
|
||||||
|
} elseif ($setarray[0] == 'project') {
|
||||||
|
if (count($setarray) === 2 and !empty($setarray[1])) {
|
||||||
|
// $finder->where('type', $setarray[1]);
|
||||||
|
$finder->whereHas('project', function ($q) use ($setarray) {
|
||||||
|
$q->where('label', $setarray[1]);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$totalIds = $finder->count();
|
$totalIds = $finder->count();
|
||||||
$reldocIds = $finder->pluck('id')->toArray();
|
$reldocIds = $finder->pluck('id')->toArray();
|
||||||
}
|
}
|
||||||
|
@ -522,6 +534,31 @@ class RequestController extends Controller
|
||||||
return $xmlModel->getDomDocument()->getElementsByTagName('Rdr_Dataset')->item(0);
|
return $xmlModel->getDomDocument()->getElementsByTagName('Rdr_Dataset')->item(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns oai sets for projects.
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function getSetsForProjects()
|
||||||
|
{
|
||||||
|
$setSpecPattern = self::SET_SPEC_PATTERN;
|
||||||
|
$sets = array();
|
||||||
|
|
||||||
|
$projects = Project::pluck('name', 'label')->toArray();
|
||||||
|
foreach ($projects as $doctype => $row) {
|
||||||
|
if (0 == preg_match("/^$setSpecPattern$/", $doctype)) {
|
||||||
|
$msg = "Invalid SetSpec (doctype='" . $doctype . "')."
|
||||||
|
. " Allowed characters are [$setSpecPattern].";
|
||||||
|
Log::error("OAI-PMH: $msg");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$setSpec = 'project:' . $doctype;
|
||||||
|
// $count = $row['count'];
|
||||||
|
$sets[$setSpec] = "Set for project '$doctype'";
|
||||||
|
}
|
||||||
|
return $sets;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns oai sets for document types.
|
* Returns oai sets for document types.
|
||||||
* @return array
|
* @return array
|
||||||
|
@ -576,7 +613,7 @@ class RequestController extends Controller
|
||||||
|
|
||||||
$identify = $sxe->addChild('Identify');
|
$identify = $sxe->addChild('Identify');
|
||||||
$identify->addChild('repositoryName', "Data Research Repository");
|
$identify->addChild('repositoryName', "Data Research Repository");
|
||||||
$identify->addChild('baseURL', "http://tethys.geologie.ac.at/");
|
$identify->addChild('baseURL', "https://tethys.at/");
|
||||||
$identify->addChild('protocolVersion', '2.0');
|
$identify->addChild('protocolVersion', '2.0');
|
||||||
$identify->addChild('adminEmail', 'repository@geologie.ac.at');
|
$identify->addChild('adminEmail', 'repository@geologie.ac.at');
|
||||||
//$identify->addChild('earliestDatestamp', '2017-04-07');
|
//$identify->addChild('earliestDatestamp', '2017-04-07');
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"davejamesmiller/laravel-breadcrumbs": "5.x",
|
"davejamesmiller/laravel-breadcrumbs": "5.x",
|
||||||
"felixkiss/uniquewith-validator": "^3.1",
|
"felixkiss/uniquewith-validator": "^3.1",
|
||||||
"fideloper/proxy": "^4.0",
|
"fideloper/proxy": "^4.0",
|
||||||
"laravel/framework": "^6.0",
|
"laravel/framework": "^6.2",
|
||||||
"laravel/tinker": "^1.0",
|
"laravel/tinker": "^1.0",
|
||||||
"laravelcollective/html": "^6.1",
|
"laravelcollective/html": "^6.1",
|
||||||
"mcamara/laravel-localization": "^1.3",
|
"mcamara/laravel-localization": "^1.3",
|
||||||
|
|
22
composer.lock
generated
22
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "7b170cd659a0ccd3c23b01d9b459f749",
|
"content-hash": "413b881be459667c601f26e12d21c034",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "arifhp86/laravel-clear-expired-cache-file",
|
"name": "arifhp86/laravel-clear-expired-cache-file",
|
||||||
|
@ -1030,16 +1030,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravelcollective/html",
|
"name": "laravelcollective/html",
|
||||||
"version": "v6.1.0",
|
"version": "v6.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/LaravelCollective/html.git",
|
"url": "https://github.com/LaravelCollective/html.git",
|
||||||
"reference": "64f2268bf41bf02b3a9dd3c30f102e934d721664"
|
"reference": "895115187e6fca81350a0b1152b5804f52a8ac28"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/LaravelCollective/html/zipball/64f2268bf41bf02b3a9dd3c30f102e934d721664",
|
"url": "https://api.github.com/repos/LaravelCollective/html/zipball/895115187e6fca81350a0b1152b5804f52a8ac28",
|
||||||
"reference": "64f2268bf41bf02b3a9dd3c30f102e934d721664",
|
"reference": "895115187e6fca81350a0b1152b5804f52a8ac28",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1094,7 +1094,7 @@
|
||||||
],
|
],
|
||||||
"description": "HTML and Form Builders for the Laravel Framework",
|
"description": "HTML and Form Builders for the Laravel Framework",
|
||||||
"homepage": "https://laravelcollective.com",
|
"homepage": "https://laravelcollective.com",
|
||||||
"time": "2020-03-02T16:41:28+00:00"
|
"time": "2020-05-17T20:19:55+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/commonmark",
|
"name": "league/commonmark",
|
||||||
|
@ -1198,16 +1198,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "1.0.68",
|
"version": "1.0.69",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "3e4198372276ec99ac3409a21d7c9d1ced9026e4"
|
"reference": "7106f78428a344bc4f643c233a94e48795f10967"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3e4198372276ec99ac3409a21d7c9d1ced9026e4",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967",
|
||||||
"reference": "3e4198372276ec99ac3409a21d7c9d1ced9026e4",
|
"reference": "7106f78428a344bc4f643c233a94e48795f10967",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1284,7 +1284,7 @@
|
||||||
"type": "other"
|
"type": "other"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-12T20:33:44+00:00"
|
"time": "2020-05-18T15:13:39+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mcamara/laravel-localization",
|
"name": "mcamara/laravel-localization",
|
||||||
|
|
1
public/css/search_style.css
vendored
1
public/css/search_style.css
vendored
|
@ -65,6 +65,7 @@ section.search {
|
||||||
.record-elem .h4, .record-elem h4 {
|
.record-elem .h4, .record-elem h4 {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
letter-spacing: .05em;
|
letter-spacing: .05em;
|
||||||
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
.record-detail h1, .record-detail p,
|
.record-detail h1, .record-detail p,
|
||||||
.record-elem h4,
|
.record-elem h4,
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
<xsl:param name="oai_error_code" />
|
<xsl:param name="oai_error_code" />
|
||||||
<xsl:param name="oai_error_message" />
|
<xsl:param name="oai_error_message" />
|
||||||
<xsl:param name="baseURL" />
|
<xsl:param name="baseURL" />
|
||||||
|
<xsl:param name="repURL" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -394,7 +395,7 @@
|
||||||
)" />
|
)" />
|
||||||
<xsl:value-of select="$geolocation" />
|
<xsl:value-of select="$geolocation" />
|
||||||
|
|
||||||
<xsl:text>
</xsl:text>
|
<!-- <xsl:text>
</xsl:text> -->
|
||||||
<xsl:if test="@ElevationMin != '' and @ElevationMax != ''">
|
<xsl:if test="@ElevationMin != '' and @ElevationMax != ''">
|
||||||
<xsl:value-of select="concat(' * ELEVATION MIN: ', @ElevationMin, ' * ELEVATION MAX: ', @ElevationMax)" />
|
<xsl:value-of select="concat(' * ELEVATION MIN: ', @ElevationMin, ' * ELEVATION MAX: ', @ElevationMax)" />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
@ -402,7 +403,7 @@
|
||||||
<xsl:value-of select="concat(' * ELEVATION ABSOLUT: ', @ElevationAbsolut)" />
|
<xsl:value-of select="concat(' * ELEVATION ABSOLUT: ', @ElevationAbsolut)" />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:text>
</xsl:text>
|
<!-- <xsl:text>
</xsl:text> -->
|
||||||
<xsl:if test="@DepthMin != '' and @DepthMax != ''">
|
<xsl:if test="@DepthMin != '' and @DepthMax != ''">
|
||||||
<xsl:value-of select="concat(' * DEPTH MIN: ', @DepthMin, ' * DEPTH MAX: ', @DepthMax)" />
|
<xsl:value-of select="concat(' * DEPTH MIN: ', @DepthMin, ' * DEPTH MAX: ', @DepthMax)" />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
@ -410,7 +411,7 @@
|
||||||
<xsl:value-of select="concat(' * DEPTH ABSOLUT: ', @DepthAbsolut)" />
|
<xsl:value-of select="concat(' * DEPTH ABSOLUT: ', @DepthAbsolut)" />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:text>
</xsl:text>
|
<!-- <xsl:text>
</xsl:text> -->
|
||||||
<xsl:if test="@TimeMin != '' and @TimeMax != ''">
|
<xsl:if test="@TimeMin != '' and @TimeMax != ''">
|
||||||
<xsl:value-of select="concat(' * TIME MIN: ', @TimeMin, ' * TIME MAX: ', @TimeMax)" />
|
<xsl:value-of select="concat(' * TIME MIN: ', @TimeMin, ' * TIME MAX: ', @TimeMax)" />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
|
@ -82,6 +82,11 @@
|
||||||
<xsl:text>Dataset</xsl:text>
|
<xsl:text>Dataset</xsl:text>
|
||||||
<!-- <xsl:value-of select="@Type" /> -->
|
<!-- <xsl:value-of select="@Type" /> -->
|
||||||
</resourceType>
|
</resourceType>
|
||||||
|
|
||||||
|
<alternateIdentifiers>
|
||||||
|
<xsl:call-template name="AlternateIdentifier"/>
|
||||||
|
</alternateIdentifiers>
|
||||||
|
|
||||||
<xsl:if test="Reference">
|
<xsl:if test="Reference">
|
||||||
<relatedIdentifiers>
|
<relatedIdentifiers>
|
||||||
<xsl:apply-templates select="Reference" mode="oai_datacite" />
|
<xsl:apply-templates select="Reference" mode="oai_datacite" />
|
||||||
|
@ -237,6 +242,17 @@
|
||||||
</subject>
|
</subject>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="AlternateIdentifier" mode="oai_datacite"
|
||||||
|
xmlns="http://datacite.org/schema/kernel-4">
|
||||||
|
<alternateIdentifier >
|
||||||
|
<xsl:attribute name="alternateIdentifierType">
|
||||||
|
<xsl:text>url</xsl:text>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:variable name="identifier" select="concat($repURL, '/dataset/', @Id)" />
|
||||||
|
<xsl:value-of select="$identifier" />
|
||||||
|
</alternateIdentifier >
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="Reference" mode="oai_datacite"
|
<xsl:template match="Reference" mode="oai_datacite"
|
||||||
xmlns="http://datacite.org/schema/kernel-4">
|
xmlns="http://datacite.org/schema/kernel-4">
|
||||||
<relatedIdentifier>
|
<relatedIdentifier>
|
||||||
|
@ -269,7 +285,6 @@
|
||||||
</contributor>
|
</contributor>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="PersonAuthor" mode="oai_datacite"
|
<xsl:template match="PersonAuthor" mode="oai_datacite"
|
||||||
xmlns="http://datacite.org/schema/kernel-4">
|
xmlns="http://datacite.org/schema/kernel-4">
|
||||||
<creator>
|
<creator>
|
||||||
|
|
|
@ -113,10 +113,10 @@
|
||||||
<p class="dataset__abstract">Size: {{ $dataset->files()->count() }} </p>
|
<p class="dataset__abstract">Size: {{ $dataset->files()->count() }} </p>
|
||||||
|
|
||||||
@if($dataset->embargo_date != null)
|
@if($dataset->embargo_date != null)
|
||||||
<p class="dataset__abstract">Datum der Freischaltung:
|
<p class="dataset__abstract">Embargo-Ende:
|
||||||
{{ $dataset->embargo_date->toDateString() }}</p>
|
{{ $dataset->embargo_date->toDateString() }}</p>
|
||||||
{{-- @else
|
{{-- @else
|
||||||
<p class="dataset__abstract">Datum der Freischaltung: - </p> --}}
|
<p class="dataset__abstract">Embargo-Ende: - </p> --}}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($dataset->hasEmbargoPassed() == true)
|
@if($dataset->hasEmbargoPassed() == true)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user