Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default_submitter and default_owner are not stored in the opersist database #27

Closed
iannesbitt opened this issue Aug 23, 2023 · 1 comment
Assignees
Labels
bug Something isn't working v0.1.1 Version 0.1.1 item
Milestone

Comments

@iannesbitt
Copy link
Contributor

Jing and I encountered an issue when attempting to index new records that two required fields in the XML—submitter and rightsHolder—were not filled in as expected. An example is reproduced below:

<?xml version="1.0" encoding="UTF-8"?>
<d1:systemMetadata xmlns:d1="http://ns.dataone.org/service/types/v2.0">
  <serialVersion>1</serialVersion>
  <identifier>sha256:23c93e736f08a214b61132e957a1dfb959b63cb54e7a706ab0223583ae0b51df</identifier>
  <seriesId>https://doi.org/10.5061/dryad.cr829</seriesId>
  <formatId>science-on-schema.org/Dataset;ld+json</formatId>
  <size>3603</size>
  <checksum algorithm="MD5">34f8b0fd99eb873c267c186a78cdc3aa</checksum>
  <submitter></submitter>
  <rightsHolder></rightsHolder>
  <accessPolicy>
    <allow>
      <subject>public</subject>
      <permission>read</permission>
    </allow>
  </accessPolicy>
  <replicationPolicy numberReplicas="3" replicationAllowed="true"></replicationPolicy>
  <archived>false</archived>
  <dateUploaded>2020-06-30T17:20:46Z</dateUploaded>
  <dateSysMetadataModified>2023-05-24T07:43:01Z</dateSysMetadataModified>
  <originMemberNode>urn:node:mnTestDRYAD3</originMemberNode>
  <authoritativeMemberNode>urn:node:mnTestDRYAD3</authoritativeMemberNode>
  <mediaType name="application/ld+json"></mediaType>
  <fileName>tmpormh6kb7</fileName>
</d1:systemMetadata>

On a tip from Dave I verified that these fields were not filled out in the database at harvest time. The solution then is to use the OPersist object setDefaultSubmitter and setDefaultOwner prior to harvesting any records.

Additionally, the replicationPolicy should be set prior to harvest time, although we have not yet seen that its absence causes an issue.

@iannesbitt iannesbitt added the bug Something isn't working label Aug 23, 2023
@iannesbitt iannesbitt self-assigned this Aug 23, 2023
iannesbitt added a commit that referenced this issue Aug 23, 2023
iannesbitt added a commit that referenced this issue Aug 23, 2023
@iannesbitt
Copy link
Contributor Author

The primary reason for this issue has been solved and can be closed. However, I have not found a way to set replicationPolicy yet and will create a new issue for it.

iannesbitt added a commit that referenced this issue Sep 26, 2023
@iannesbitt iannesbitt added this to the 0.1.1 milestone Oct 4, 2023
@iannesbitt iannesbitt added the v0.1.1 Version 0.1.1 item label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.1.1 Version 0.1.1 item
Projects
None yet
Development

No branches or pull requests

1 participant