View source: R/clone_package.R
clone_object | R Documentation |
Clones objects between DataONE Member Nodes. Note:
the dateUploaded, obsoletes, and obsoletedBy fields in the sysmeta will be reset on the cloned object.
the limit of the file size is set at a default of 1TB
clone_object(
pid,
from,
to,
add_access_to,
change_auth_node,
public = FALSE,
new_pid = TRUE
)
pid |
(character) Object PID. |
from |
(D1Client) D1Client to clone objects from. (Objects must be public) |
to |
(D1Client) D1Client to clone objects to. (Token must be set for this node) |
add_access_to |
(character, vector) Will give read, write, and changePermission access to all strings in vector.
If no additional access is desired, set to |
change_auth_node |
(logical) Will change the authoritativeMemberNode in the system metadata to the cloned member node
if |
public |
(logical) Optional. Will set public read access. Defaults to |
new_pid |
(logical) Optional. Will give the clone a new PID. Defaults to |
(character) PID of cloned object. NULL
if could not clone.
## Not run:
# First set up the member nodes we're cloning between
# (in this example they are the same but could be different)
to <- dataone::D1Client("STAGING", "urn:node:mnTestARCTIC")
from <- dataone::D1Client("STAGING", "urn:node:mnTestARCTIC")
# Choose an object to clone (here a new one is created)
pid <- arcticdatautils::create_dummy_object(to@mn)
# Clone object
cloned_pid <- clone_object(pid = pid,
from = from,
to = to,
add_access_to = arcticdatautils:::get_token_subject(),
change_auth_node = TRUE,
public = TRUE,
new_pid = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.