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.

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().

Value

(character) The PID of the created resource map.

Details

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

Examples

if (FALSE) { 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) }