eml_add_distribution: Add distribution information to EML

View source: R/eml.R

eml_add_distributionR Documentation

Add distribution information to EML

Description

Adds a landing page URL to the dataset, and corrects the metadata identifier by replacing the existing identifier with that which is passed. Note that this function constructs landing page URLs for the Arctic Data Center only and will not work correctly on other repositories.

Usage

eml_add_distribution(doc, identifier)

Arguments

doc

(emld) An EML document

identifier

(character) A pre-issued, unassigned identifier (as from dataone::generateIdentifier())

Value

doc (emld) An EML document with distribution added

Examples

## Not run: 
library(EML)
d1c <- dataone::D1Client("STAGING", "mnTestARCTIC")
# read in any EML document
doc <- read_eml(system.file("extdata/strix-pacific-northwest.xml", package="dataone"))
# generate a doi
id <- generateIdentifier(d1c@mn, "doi")
doc <- eml_add_distribution(doc, id)

## End(Not run)


NCEAS/arcticdatautils documentation built on Aug. 28, 2023, 12:10 p.m.