updateObject {dataone}R Documentation

Update an object on a Member Node, by creating a new object that replaces an original.

Description

This method provides the ability to update a data or metadata object to the Member Node provided in the 'x' parameter. In DataONE, both the original object and the new object are maintained, each with its own persistent identifier, and the 'obsoletes' field in the SystemMetadata is used to reflect the fact that the new object replaces the old. Both objects remain accessible.

Usage

updateObject(x, ...)

## S4 method for signature 'MNode'
updateObject(x, pid, file = as.character(NA), newpid, sysmeta, dataobj = NULL)

Arguments

x

The MNode instance on which the object will be created

...

(Not yet used.)

pid

The identifier of the object to be updated

file

the absolute file location of the object to be uploaded

newpid

The identifier of the new object to be created

sysmeta

a SystemMetadata instance describing properties of the object

dataobj

a raw object to use for the upload, instead of the contents of the file argument.

Details

In the version 2.0 library and higher, this operation can utilize an 'dataone_token' option to provide credentials for write operations in DataONE. The authentication token is obtained from DataONE (see your profile on https://search.dataone.org). See the vignette("dataone-overview") for details. Alternatively, the version 1.0 approach of using an X.509 certificate in a default location of the file system can also be used. This certificate provides authentication credentials from CILogon https://cilogon.org/?skin=DataONE. See vignette("dataone-overview") for details.

Value

A character containing the identifier if successful.

Note

Please see the vignette *upload-data* for an example: vignette("upload-data")

See Also

https://purl.dataone.org/architecture/apis/MN_APIs.html#MNStorage.update


[Package dataone version 2.2.2 Index]