Use sensible defaults to publish an object on a Member Node. If identifier is provided, use it, otherwise generate a UUID. If clone_id is provided, then retrieve the system metadata for that identifier and use it to provide rightsHolder, accessPolicy, and replicationPolicy metadata. Note that this function only uploads the object to the Member Node, and does not add it to a data package, which can be done separately.
publish_object( mn, path, format_id = NULL, pid = NULL, sid = NULL, clone_pid = NULL, public = TRUE )
mn | (MNode) The Member Node to publish the object to. |
---|---|
path | (character) The path to the file to be published. |
format_id | (character) Optional. The format ID to set for the object.
When not set, |
pid | (character) Optional. The PID to use with the object. |
sid | (character) Optional. The SID to use with the new object. |
clone_pid | (character) PID of object to clone System Metadata from. |
public | (logical) Whether object should be given public read access. |
pid (character) The PID of the published object.
if (FALSE) { cn <- CNode("STAGING2") mn <- getMNode(cn,"urn:node:mnTestKNB") my_path <- "/home/Documents/myfile.csv" pid <- publish_object(mn, path = my_path, format_id = "text/csv", public = FALSE) }