Learn R Programming

dataone (version 2.3.0)

generateIdentifier: Get a unique identifier that is generated by the Member Node repository and guaranteed to be unique.

Description

Creating objects requires use of a unique persistent identifier (pid) when calling the create function. Member Nodes may optionally provide the generateIdentifier service to issue such identifiers, ensuring that they are unique. Each identifier conforms to an identifier scheme, which determines the syntax and rules for how the identifier that is generated is formatted. All Member Nodes that implement this method must support the UUID scheme, but may also support other schemes such as DOI and others.

Usage

generateIdentifier(x, ...)

# S4 method for MNode generateIdentifier(x, scheme = "UUID", fragment = NULL)

Value

the character string of the generated unique identifier

Arguments

x

The MNode instance on which the object will be created

...

(Not yet used.)

scheme

The identifier scheme to be used, such as DOI, UUID, etc.

fragment

An optional fragment to be prepended to the identifier for schemes that support it (not all do).

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("v01-dataone-overview") for details.

See Also

Examples

Run this code
if (FALSE) {
library(dataone)
cn <- CNode("STAGING")
mn <- getMNode(cn, "urn:node:mnStageUCSB2")
newid <- generateIdentifier(mn, "UUID")
}

Run the code above in your browser using DataLab