hasReservation | R Documentation |
The hasReservation method checks the reservation of an identifier that has
previously been reserved with the reserveIdentifier
method. The identifier must have
been reserved by the specified DataONE user identity (subject
).
hasReservation(x, ...) ## S4 method for signature 'CNode' hasReservation(x, pid, subject = as.character(NA))
x |
A CNode instance. |
... |
Additional parameters. |
pid |
The identifier that is being checked for existing as a reserved identifier or is in use as an identifier for an existing object |
subject |
The subject of the principal (user) that made the reservation. |
To determine the DataONE identity that is currently being used for DataONE
authentication, use the echoCredentials
method.
A logical value where TRUE means a reservation exists for the specified pid by the subject.
CNode
class description.
## Not run: library(dataone) cn <- CNode("STAGING") creds <- echoCredentials(cn) subject <- creds$person$subject # Previously reserved pid (using reserveIdentifeir()), e.g. DOI or uuid pid <- "urn:node:e27bb4f3-96bb-4af4-8902-f5914def077c" hasRes <- hasReservation(cn, pid, subject=subject) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.