Skip to content

Commit

Permalink
pkp/pkp-lib#9926 add download url to onix export data
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitlinnewson authored and asmecher committed Jun 18, 2024
1 parent 85d9195 commit 9eabb4a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public function createProductNode($doc, $submission, $publicationFormat)
$textContentNode->appendChild($this->_buildTextNode($doc, 'TextType', '03')); // description
$textContentNode->appendChild($this->_buildTextNode($doc, 'ContentAudience', '00')); // Any audience
$textContentNode->appendChild($this->_buildTextNode($doc, 'Text', $abstract)); // Any audience

$supportingResourceNode = $doc->createElementNS($deployment->getNamespace(), 'SupportingResource');
$collateralDetailNode->appendChild($supportingResourceNode);
$supportingResourceNode->appendChild($this->_buildTextNode($doc, 'ResourceContentType', '01')); // Front cover
Expand Down Expand Up @@ -505,6 +505,19 @@ public function createProductNode($doc, $submission, $publicationFormat)
$websiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteRole', '18')); // 18 -> Publisher's B2C website
$websiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteLink', $request->getDispatcher()->url($request, Application::ROUTE_PAGE, $context->getPath(), urlLocaleForPage: '')));

$websiteNode = $doc->createElementNS($deployment->getNamespace(), 'Website');
$publisherNode->appendChild($websiteNode);

$websiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteRole', '29')); // 29 -> Web page for full content

$submissionBestId = $publication->getData('submissionId');

if ($publication->getData('urlPath') != '') {
$submissionBestId = $publication->getData('urlPath');
}

$websiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteLink', $request->url($context->getPath(), 'catalog', 'book', $submissionBestId)));

/* --- Publishing Dates --- */

$publicationDates = $publicationFormat->getPublicationDates();
Expand Down Expand Up @@ -667,6 +680,13 @@ public function createProductNode($doc, $submission, $publicationFormat)

unset($supplierWebsiteNode);
}

$supplierWebsiteNode = $doc->createElementNS($deployment->getNamespace(), 'Website');
$supplierNode->appendChild($supplierWebsiteNode);

$supplierWebsiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteRole', '29')); // 29 -> Web page for full content
$supplierWebsiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteLink', $request->url($context->getPath(), 'catalog', 'book', $submissionBestId)));

unset($supplierNode);
} else { // No suppliers specified, use the Press settings instead.
$supplierNode = $doc->createElementNS($deployment->getNamespace(), 'Supplier');
Expand Down

0 comments on commit 9eabb4a

Please sign in to comment.