Learn R Programming

OAIHarvester (version 0.3-4)

size: 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)

Value

A numeric giving the number of items available for (selective) harvesting, or NA_real_ if the number could not be determined without harvesting.

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 strptime). The trailing Z must be used when including time. OAI-PMH implies UTC for data/time specifications.

set

a character vector giving the sets to be considered for selective harvesting (i.e., only consider records in the given sets), or NULL.

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab