pressbooks / excalibur

Excalibur is a SWORD protocol client for Pressbooks.
GNU General Public License v3.0
3 stars 1 forks source link

No licence data in DSpace #14

Open steven1350 opened 6 years ago

steven1350 commented 6 years ago

Prerequisites

Check the boxes below by changing them from [ ] to [x].

Description

License data is not submitted into Dspace metadata when the book is exported

Steps to Reproduce

  1. Set the license of your book under the Copyright heading in the "Book Info" tab
  2. Submit the book to DSpace

Expected behavior: License data is included in the metadata

Actual behavior: License data is missing from the metadata

dac514 commented 6 years ago

The packaging format we use alledgedly supports: http://dublincore.org/documents/dcmi-terms/#terms-rights

In excalibur\inc\dspace\class-deposit.php look for the commented out code:

// Information about rights held in and over the resource.
// $package->addRights( '' );

And change to

// Information about rights held in and over the resource.
$licensing = new \Pressbooks\Licensing();
$rights = $licensing->doLicense( $metadata );
$rights = wp_strip_all_tags( $rights );
$package->addRights( $rights );

Does this do what you expect?

steven1350 commented 5 years ago

I have made the changes, and ran into some issues. In the mets.xml files included in the SWORD deposit, there is a field like the following

<epdcx:statement epdcx:propertyURI="http://purl.org/dc/terms/rights">
<epdcx:valueString>Database Design - 2nd Edition  by Adrienne Watt and Nelson Eng is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.</epdcx:valueString>
</epdcx:statement>

The issue is that this field doesn't get added to the record it creates in DSpace