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

sword/native api mismatch for data deposit #921

Closed
raprasad opened this issue Sep 13, 2014 · 7 comments
Closed

sword/native api mismatch for data deposit #921

raprasad opened this issue Sep 13, 2014 · 7 comments
Assignees

Comments

@raprasad
Copy link
Contributor

(may be a duplicate)

The SWORD data deposit API does not require contact email or subject.

/dvn/api/data-deposit/v1/swordv2/collection/dataverse

However, the GUI does require these fields.
he_huffed_and_he_puffed_-_root_dataverse

@raprasad raprasad added this to the In Review - Dataverse 4.0 milestone Sep 13, 2014
@pdurbin pdurbin modified the milestones: Beta 8 - Dataverse 4.0, In Review - Dataverse 4.0 Oct 21, 2014
@pdurbin pdurbin self-assigned this Oct 21, 2014
@pdurbin
Copy link
Member

pdurbin commented Oct 21, 2014

All these fields are discussed in "Dataverse 4.0 Data Deposit API Backward Compatibility and Migration Guide for Collaborators" at https://docs.google.com/document/d/11DpdKyp1tagmaJAAzRqQBEZEZ69WOOOYsoqhz8UsfNM/edit?usp=sharing

I'll move this ticket to QA when I'm finished testing.

@pdurbin
Copy link
Member

pdurbin commented Oct 22, 2014

@scolapasta I need help with this. If you look at 19ae153 I'm obviously doing something wrong with controlled vocabulary because "Other" appears twice:

roasting_at_home_-top_dataverse_of_pete_dataverse-_2014-10-22_10 46 12

@pdurbin
Copy link
Member

pdurbin commented Oct 23, 2014

We don't have a way to express "Contact E-mail" or "Subject" in dcterms so we now populate the former with the email address of the parent dataverse and the later with "Other". (The longer term plan in #769 is to have datasets created by SWORD inherit the subject of the parent dataverse.)

Centralized validation is being worked on in #605 but for now some quick and dirty validation is in place. If you try to create a dataset without any dcterms:creator elements, for example, you should get the error "Can't create/update dataset. http://purl.org/dc/terms/ equivalent of required field not found: authorName".

Moving to QA (though I haven't looked at the native API at all... maybe that should be a separate ticket).

@pdurbin pdurbin removed their assignment Oct 23, 2014
@esotiri esotiri self-assigned this Oct 24, 2014
@esotiri
Copy link
Contributor

esotiri commented Oct 24, 2014

when creating dataset via sword, required fields email and subject are auto completed with creator email and subject other.

@esotiri
Copy link
Contributor

esotiri commented Oct 27, 2014

issue resolved

@esotiri esotiri closed this as completed Oct 27, 2014
@pdurbin
Copy link
Member

pdurbin commented Oct 27, 2014

when creating dataset via sword, required fields email and subject are auto completed with creator email and subject other.

@esotiri can you please also test other required fields? In some cases, the required field is not auto-completed. Rather, you should expect to see an error indicating that the field is required.

In addition, there's some discussion at #457 (comment) with @posixeleni over create vs. edit.

These are the fields that were possible in DVN 3.6: https://github.com/IQSS/dvn/blob/develop/doc/sphinx/source/dataverse-api-main.rst#data-deposit-api

We can't use dcterms:rights yet, per #805.

@esotiri
Copy link
Contributor

esotiri commented Oct 29, 2014

create a study-missmatch:
Testing two other required fields, author and description, commenting them out from the atom-entry.

Below is the result of sword error: equivalent of required field not found

<?xml version="1.0" encoding="ISO-8859-1"?>
<sword:error xmlns:sword="http://purl.org/net/sword/terms/" href="http://purl.org/net/sword/error/ErrorBadRequest">
  <atom:title xmlns:atom="http://www.w3.org/2005/Atom">ERROR</atom:title>
  <atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2014-10-29T10:57:32Z</atom:updated>
  <atom:generator xmlns:atom="http://www.w3.org/2005/Atom" uri="http://www.swordapp.org/" version="2.0"/>
  <sword:treatment>Processing failed</sword:treatment>
  <atom:summary xmlns:atom="http://www.w3.org/2005/Atom">Can't create/update dataset. http://purl.org/dc/terms/ equivalent of required field not found: dsDescription</atom:summary>
</sword:error>

 <sword:treatment>Processing failed</sword:treatment>
  <atom:summary xmlns:atom="http://www.w3.org/2005/Atom">Can't create/update dataset. http://purl.org/dc/terms/ equivalent of required field not found: authorName</atom:summary>
</sword:error>
  • Note: It would be good that the actual dcterms xml element is not displayed at the failed message. Right now you can look the mapping at foreignmetadatamapping.
    I will open a new ticket for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants