diff --git a/fgsMetsMods/OAIMetadataFormatPlugin_FgsMetsMods.inc.php b/fgsMetsMods/OAIMetadataFormatPlugin_FgsMetsMods.inc.php index 5a90443..2ca2ab6 100644 --- a/fgsMetsMods/OAIMetadataFormatPlugin_FgsMetsMods.inc.php +++ b/fgsMetsMods/OAIMetadataFormatPlugin_FgsMetsMods.inc.php @@ -57,7 +57,7 @@ static function getNamespace() { } static function getVersion() { - return '1.1.2'; + return '1.1.3'; } static function getUrl() { diff --git a/fgsMetsMods/OAIMetadataFormat_FgsMetsMods.inc.php b/fgsMetsMods/OAIMetadataFormat_FgsMetsMods.inc.php index 5559258..7901f1b 100644 --- a/fgsMetsMods/OAIMetadataFormat_FgsMetsMods.inc.php +++ b/fgsMetsMods/OAIMetadataFormat_FgsMetsMods.inc.php @@ -29,7 +29,8 @@ function toXml($record, $format = null) { $galleys = $article->getGalleys(); $submissionFileService = Services::get('submissionFile'); $articleUrl = $request->getDispatcher()->url($request, ROUTE_PAGE, null, 'article', 'view', $article->getId()); - + $altObjectId = explode('kb.se/', $articleUrl)[1]; + $temporaryFileManager = new PrivateFileManager(); $basePath = $temporaryFileManager->getBasePath(); @@ -105,6 +106,7 @@ function toXml($record, $format = null) { 'journal' => $journal, 'article' => $article, 'articleUrl' => $articleUrl, + 'altObjectId' => $altObjectId, 'issue' => $record->getData('issue'), 'section' => $record->getData('section'), 'keywords' => $simpleKeywords, diff --git a/fgsMetsMods/templates/record.tpl b/fgsMetsMods/templates/record.tpl index 3437d4c..c76e09b 100644 --- a/fgsMetsMods/templates/record.tpl +++ b/fgsMetsMods/templates/record.tpl @@ -9,7 +9,11 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + {if $article->getStoredPubId('doi')} OBJID="doi:{$article->getStoredPubId('doi')|escape}" + {else} + OBJID="{$altObjectId|escape}" + {/if} TYPE="SIP" LABEL="{$article->getTitle($article->getLocale())|escape}" PROFILE="http://www.kb.se/namespace/mets/fgs/eARD_Paket_FGS-PUBL.xml"> @@ -92,15 +96,21 @@ {if $article->getStoredPubId('doi')} doi:{$article->getStoredPubId('doi')|escape} + {else} + {* Fallback alternative following (R101) in + http://www.kb.se/namespace/digark/deliveryspecification/deposit/fgs-publ/mods/MODS_enligt_FGS-PUBL.pdf *} + {$articleUrl|escape} {/if} {$journal->getName($journal->getPrimaryLocale())|escape} + {if $issue->getLocalizedTitle()} {$issue->getLocalizedTitle()|escape} + {/if} {$issue->getVolume()|escape} vol. @@ -148,9 +158,7 @@ {$abstract|escape} {/if} - - {$articleUrl|escape} - + {$articleUrl|escape} diff --git a/fgsMetsMods/version.xml b/fgsMetsMods/version.xml index ae30b34..f4187b4 100644 --- a/fgsMetsMods/version.xml +++ b/fgsMetsMods/version.xml @@ -13,6 +13,6 @@ fgsMetsMods plugins.oaiMetadataFormats - 1.1.2 - 2021-06-11 + 1.1.3 + 2021-08-27