DataONEorg / rdataone

R package for reading and writing data at DataONE data repositories
http://doi.org/10.5063/F1M61H5X
36 stars 19 forks source link

updateObject should check sysmeta values #267

Open gothub opened 3 years ago

gothub commented 3 years ago

The argument list for updateObject() contains the values for the pid that will be obsoleted and the pid that will be obsoleting the existing pid:

setMethod("updateObject", signature("MNode"), function(x, pid, file=as.character(NA), newpid, sysmeta, dataobj=NULL) {

This method should check that the sysmeta@obsoletes value matches the argument pid and that the sysmeta@identifier matches the argument newpid. If these values are set incorrectly in the sysmeta argument, then the call to DataONE will fail.