size {OAIHarvester} | R Documentation |
OAI-PMH Repository Size
Description
Determine the number of items available for (selective) harvesting in an OAI repository.
Usage
oaih_size(baseurl, from = NULL, until = NULL, set = NULL)
Arguments
baseurl |
a character string giving the base URL of the repository. |
from , until |
character strings or Date or
POSIXt date/time objects giving
datestamps to be used as lower or upper bounds, respectively, for
datestamp-based selective harvesting (i.e., only consider records
with datestamps in the given range). If character, dates and times
must be encoded using ISO 8601 in either ‘%F’ or
‘%FT%TZ’ format (see |
set |
a character vector giving the sets to be considered for
selective harvesting (i.e., only consider records in the given
sets), or |
Details
Determining the number of items without actually harvesting these is
only possible if the repository's flow control mechanism provides
resumptionToken
elements with completeListSize
attributes (see
https://www.openarchives.org/OAI/openarchivesprotocol.html), or
flow control is not applied when listing identifiers in the selected
range.
Value
A numeric giving the number of items available for (selective)
harvesting, or NA_real_
if the number could not be determined
without harvesting.
Examples
tryCatch({
## Run inside tryCatch() so that checks fail gracefully if OAI-PMH
## requests time out or fail otherwise.
oaih_size("https://www.jstatsoft.org/oai")
##
}, error = identity)