getPackage: Download a data package from a member node.

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
2
3
4
5
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).

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.

Value

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

See Also

MNode class description.

Examples

1
2
3
4
5
6
## Not run: 
cn <- CNode()
mn <- getMNode(cn, "urn:node:KNB")
packageFileName <- getPackage(mn, id="resourceMap_Blandy.76.2")

## End(Not run)

dataone documentation built on July 2, 2018, 1:02 a.m.