reserveIdentifier {dataone}R Documentation

Reserve a identifier that is unique in the DataONE network.

Description

The reserveIdentifier method contains the DataONE CN and reserves the specified identifier that the user has provided. Once a an identifier has been reserved, it and can not be used by any other user.

Usage

reserveIdentifier(x, ...)

## S4 method for signature 'CNode'
reserveIdentifier(x, id)

## S4 method for signature 'D1Client'
reserveIdentifier(x, id)

Arguments

x

The coordinating node to query for its registered Member Nodes

...

Additional parameters.

id

The identifier that is to be reserved.

Details

This method requires a DataONE authentication token or X.509 Certificate. The reservation is made for the DataONE user identity that created the current authentication token or X.509 certificate.

Value

The reserved pid if it was successfully reserved, otherwise NULL

See Also

CNode class description.

Examples

## Not run: 
library(dataone)
library(uuid)
cn <- CNode("STAGING")
myId <- sprintf("urn:uuid:%s", UUIDgenerate())
newId <- reserveIdentifier(cn, myId)

## End(Not run)

[Package dataone version 2.2.2 Index]