hasReservation: Checks to determine if the supplied subject is the owner of...

Description Usage Arguments Details Value See Also Examples

Description

The hasReservation method checks the reservation of an identfier that has previously been reserved with the reserveIdentifier method. The identifier must have been reserved by the specified DataONE user identity (subject).

Usage

1
2
3
4
hasReservation(x, ...)

## S4 method for signature 'CNode'
hasReservation(x, pid, subject = as.character(NA))

Arguments

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.

Details

To determine the DataONE identity that is currently being used for DataONE authentication, use the echoCredentials method.

Value

A logical value where TRUE means a reservation exists for the specified pid by the subject.

See Also

CNode class description.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

dataone documentation built on July 2, 2018, 1:02 a.m.