uploadDataPackage | R Documentation |
Upload all DataObjects contained in the DataPackage by calling uploadDataObject
on each of the members. Also a resourceMap object is created from the
recorded relationships between DataObjects, and this is uploaded as well.
uploadDataPackage(x, ...) ## S4 method for signature 'D1Client' uploadDataPackage( x, dp, replicate = NA, numberReplicas = NA, preferredNodes = NA, public = as.logical(FALSE), accessRules = NA, quiet = as.logical(TRUE), resolveURI = as.character(NA), packageId = as.character(NA), as = "character", ... )
x |
A D1Client instance. |
... |
(Not yet used.) |
dp |
The DataPackage instance to be submitted to DataONE for creation. |
replicate |
A value of type |
numberReplicas |
A value of type |
preferredNodes |
A list of |
public |
A |
accessRules |
Access rules of |
quiet |
A |
resolveURI |
A URI to prepend to identifiers (i.e. for use when creating the ResourceMap). See serializePackage |
packageId |
A value of type |
as |
A value of type |
The DataPackage describes the collection of data object and their associated metadata object, with the relationships and members serialized into a document stored under, and retrievable with, the packageId as it's own distinct object. Any objects in the data map that have a dateUploaded value are assumed to be pre-existing in the system, and skipped.
id The identifier of the resource map for this data package
Member objects are created serially, and most errors in creating one object will interrupt the create process for the whole, with the result that some members will be created, and the remainder not.
D1Client
class description.
## Not run: library(dataone) library(datapack) dp <- new("DataPackage") sampleData <- system.file("extdata/sample.csv", package="dataone") dataObj <- new("DataObject", format="text/csv", file=sampleData) dataObj <- setPublicAccess(dataObj) sampleEML <- system.file("extdata/strix-pacific-northwest.xml", package="dataone") metadataObj <- new("DataObject", format="eml://ecoinformatics.org/eml-2.1.1", file=sampleEML) metadataObj <- setPublicAccess(metadataObj) dp <- addMember(dp, do = dataObj, mo = metadataObj) d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") # Upload all members of the DataPackage to DataONE (requires authentication) packageId <- uploadDataPackage(d1c, dp, replicate=TRUE, public=TRUE, numberReplicas=2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.