dvEditStudy: Edit a study

Description Usage Arguments Details Value Author(s) References See Also

View source: R/dvEditStudy.r

Description

Use Data Deposit API to replace a study's metadata.

Usage

1
2
3
dvEditStudy(objectid, xmlfile, dv=getOption('dvn'),
            user=getOption('dvn.user'), pwd=getOption('dvn.pwd'), 
            browser=FALSE, ...)

Arguments

objectid

Either a character string containing the id for a dataverse study (a handle) or an object of class “dvStudyAtom”. This could be returned from dvUserStudies (or, dvSearch, from the Data Sharing API).

xmlfile

The path to an XML file (or a character string of that XML) containing a Qualified Dublin Core Atom/XML document, which specifies the metadata necessary to create the study. See references for an example and dvBuildMetadata.

dv

An optional character string specifying the Dataverse to query. Default is the Harvard IQSS Dataverse.

user

A character string containing a dataverse username. Default is options('dvn.user').

pwd

A character string containing the corresponding dataverse password. Default is options('dvn.pwd').

browser

A logical specifying whether the query should be executed in a web browser. Default is FALSE.

...

Optionally, additional arguments passed to curlPerform via dvDepositQuery.

Details

This function replaces a study's metadata. That is, it is not possible to edit some fields of a study's metadata. The SWORD implementation only allows an entire metadata record to be replaced. Thus, if one only wants to edit one field, a complete Qualified Dublin Core XML document. Probably, it is best to store this locally to simply making any future changes.

Note: Editing a study only changes the study in “draft”. To make those changes public, the study needs to be subsequently released. A released study can be “deaccessioned” (replacing its public record with a publicly visible record about its previous release) using dvDeleteStudy but cannot be deleted.

Value

If successful, a list containing:

bibliographicCitation

A full citation for the study, compiled from metadata.

generator

A vector containing details about the SWORD application.

id

The full URI for the study.

objectId

The objectId for the study.

xml

A character string containing an XML data structure that includes a study citation and handle.

If successful, the request will reflect the contents of xmlfile.

Author(s)

Thomas J. Leeper

References

Atom entry specification

Qualified Dublin Core XML example 1

Qualified Dublin Core XML example 2

See Also

dvBuildMetadata dvAddFile dvCreateStudy dvReleaseStudy dvDeleteStudy


leeper/dvn documentation built on May 21, 2019, 12:36 a.m.