getPackage function

Download a data package from a member node.

Download a data package from a member node.

Given a valid identifier, download a file containing all of the package members of the corresponding DataONE data package.

getPackage(x, ...) ## S4 method for signature 'MNode' getPackage( x, identifier, format = "application/bagit-097", dirPath = NULL, unzip = FALSE )

Arguments

  • x: A MNode instance representing a DataONE Member Node repository.
  • ...: (not yet used)
  • identifier: The identifier of the package to retrieve. The identifier can be for the resource map, metadata file, data file, or any other package member.
  • format: The format to send the package in.
  • dirPath: The directory path to save the package to.
  • unzip: (logical) If the dirPath is specified, the package can also be unzipped automatically (unzip=TRUE).

Returns

The location of the package file downloaded from the member node.

Details

The default data package file format is a Bagit file (https://tools.ietf.org/html/draft-kunze-bagit-09). The downloaded package file is compressed using the ZIP format and will be located in an R session temporary file. Other packaging formats can be requested if they have been implemented by the requested member node.

Examples

## Not run: cn <- CNode() mn <- getMNode(cn, "urn:node:KNB") packageFileName <- getPackage(mn, id="resourceMap_Blandy.76.2") ## End(Not run)

See Also

MNodeclass description.

  • Maintainer: Matthew B. Jones
  • License: Apache License 2.0
  • Last published: 2022-06-10