update_resource_map | R Documentation |
This function first generates a new resource map RDF/XML document locally and
then uses the dataone::updateObject()
function to update an object on the
specified MN.
update_resource_map(
mn,
resource_map_pid,
metadata_pid,
data_pids = NULL,
child_pids = NULL,
other_statements = NULL,
identifier = NULL,
public = TRUE,
check_first = TRUE
)
mn |
(MNode) The Member Node. |
resource_map_pid |
(character) The PID of the resource map to be updated. |
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. |
other_statements |
(data.frame) Extra statements to add to the resource map. |
identifier |
(character) Manually specify the identifier for the new metadata object. |
public |
(logical) Whether or not to make the new resource map public read. |
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 |
If you only want to generate resource map RDF/XML, see generate_resource_map()
.
This function also can be used to add a new child packages to a parent package. For example, if you have:
Parent A B
and want to add C as a sibling package to A and B, e.g.:
Parent A B C
then you could use this function.
Note: This function currently replaces the rightsHolder on the resource map temporarily to allow updating but sets it back to the rightsHolder that was in place before the update.
(character) The PID of the updated resource map.
## Not run:
cn <- CNode('STAGING2')
mn <- getMNode(cn,"urn:node:mnTestKNB")
rm_pid <- "resource_map_urn:uuid:23c7cae4-0fc8-4241-96bb-aa8ed94d71fe"
meta_pid <- "urn:uuid:23c7cae4-0fc8-4241-96bb-aa8ed94d71fe"
data_pids <- c("urn:uuid:3e5307c4-0bf3-4fd3-939c-112d4d11e8a1",
"urn:uuid:23c7cae4-0fc8-4241-96bb-aa8ed94d71fe")
rm_new <- update_resource_map(mn, rm_pid, meta_pid, data_pids)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.