Create the Object in the DataONE System

Description

Create the Object in the DataONE System

Usage

1
2
3
4
createD1Object(x, d1Object, ...)

## S4 method for signature 'D1Client,D1Object'
createD1Object(x, d1Object)

Arguments

x

: D1Client

d1Object

A D1Object instance to upload to DataONE

...

(not yet used)

Value

TRUE if the object was successfully uploaded, FALSE if not.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(dataone)
library(uuid)
d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2")
data <- readLines(system.file("extdata/sample-eml.xml", package="dataone"))
dataRaw <- charToRaw(paste(data, collapse="\n"))
newid <- sprintf("urn:node:%s", UUIDgenerate())
d1o <- new("D1Object", id=newid, data=dataRaw, format="text/plain")
d1o <- setPublicAccess(d1o)
# Upload the object to DataONE (requires authentication)
uploaded <- createD1Object(d1c, d1o)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.