create_resource_map: Create a resource map object on a Member Node

View source: R/editing.R

create_resource_mapR Documentation

Create a resource map object on a Member Node

Description

This function first generates a new resource map RDF/XML document locally and then uses the dataone::createObject() function to create the object on the specified MN.

Usage

create_resource_map(
  mn,
  metadata_pid,
  data_pids = NULL,
  child_pids = NULL,
  check_first = TRUE,
  ...
)

Arguments

mn

(MNode) The Member Node

metadata_pid

(character) The PID of the metadata object to go in the package.

data_pids

(character) The PID(s) of the data objects to go in the package.

child_pids

(character) The resource map PIDs of the packages to be nested under the package.

check_first

(logical) Optional. Whether to check the PIDs passed in as arguments exist on the MN before continuing. This speeds up the function, especially when data_pids has many elements.

...

Additional arguments that can be passed into publish_object().

Details

If you only want to generate resource map RDF/XML, see generate_resource_map().

Value

(character) The PID of the created resource map.

Examples

## Not run: 
cn <- CNode('STAGING2')
mn <- getMNode(cn,"urn:node:mnTestKNB")

meta_pid <- 'urn:uuid:23c7cae4-0fc8-4241-96bb-aa8ed94d71fe'
dat_pid <- c('urn:uuid:3e5307c4-0bf3-4fd3-939c-112d4d11e8a1',
'urn:uuid:23c7cae4-0fc8-4241-96bb-aa8ed94d71fe')

create_resource_map(mn, metadata_pid = meta_pid, data_pids = dat_pid)

## End(Not run)

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