-
Notifications
You must be signed in to change notification settings - Fork 19
/
getDataPackage.Rd
71 lines (63 loc) · 2.87 KB
/
getDataPackage.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/D1Client.R
\name{getDataPackage}
\alias{getDataPackage}
\alias{getDataPackage,D1Client-method}
\title{Download data from the DataONE Federation as a DataPackage.}
\usage{
getDataPackage(x, identifier, ...)
\S4method{getDataPackage}{D1Client}(
x,
identifier,
lazyLoad = FALSE,
limit = "1MB",
quiet = TRUE,
checksumAlgorithm = as.character(NA)
)
}
\arguments{
\item{x}{A D1Client object.}
\item{identifier}{The identifier of a package, package metadata or other package member}
\item{...}{(not yet used)}
\item{lazyLoad}{A \code{logical} value. If TRUE, then only package member system metadata is downloaded and not data.
The default is \code{FALSE}.}
\item{limit}{A \code{character} value specifying maximum package member size to download. Specified with "KB", "MB" or "TB"
for example: "100KB", "10MB", "20GB", "1TB". The default is "1MB". Only takes effect if 'lazyLoad=FALSE'.}
\item{quiet}{A \code{'logical'}. If TRUE (the default) then informational messages will not be printed.}
\item{checksumAlgorithm}{A \code{character} value specifying the algorithm to use to re-calculate (after download) the system metadata checksum
for the object's data bytes for example: "SHA-256". The default is "NA", which specifies that this re-calculation will not be performed.}
}
\value{
A DataPackage or NULL if the package was not found in DataONE
}
\description{
This is convenience method that will download all the members in a DataONE data package
and insert them into a DataPackage, including associated SystemMetadata for each package
member.
}
\details{
A 'data package' that resides on a DataONE member node is defined as a collection of
digital objects that are described by a metadata document. \cr\cr
The \code{lazyLoad} parameter controls whether the data bytes for a DataONE package member are downloaded (the system
metadata is always downloaded). When \code{lazyLoad}=FALSE, the \code{limit} parameter can be used to specify
the maximum size of a data file that will be downloaded. If \code{lazyLoad} is TRUE, then \code{limit}
is ignored. The \code{lazyLoad} and \code{limit} parameters can be used together in the following ways:
\tabular{lllll}{
\tab 'lazyLoad' \tab 'limit' \tab result \tab comments \cr
\tab ---------- \tab ------- \tab ------ \tab --------------------- \cr
\tab TRUE \tab Any value \tab Data bytes are not downloaded \tab The 'limit' parameter is ignored \cr
\tab FALSE \tab Not specified \tab Data bytes are download if less than 1MB \tab The default 'limit' of 1MB is used \cr
\tab FALSE \tab 10MB \tab Data bytes are downloaded if less than 10MB \tab The specified 'limit' values is used \cr
}
}
\examples{
\dontrun{
library(dataone)
d1c <- D1Client("PROD", "urn:node:KNB")
pid <- "solson.5.1"
pkg <- getDataPackage(d1c, pid)
}
}
\seealso{
\code{\link[=D1Client-class]{D1Client}}{ class description.}
}