Edit sysmeta
To edit the sysmeta of an object (data file, EML, or resource map, etc.) with a PID
, first load the sysmeta into R using the following command:
Then edit the sysmeta slots by using @
functionality. For example, to change the fileName
use the following command:
Note that some slots cannot be changed by simple text replace (particularly the accessPolicy
). There are various helper functions for changing the accessPolicy
and rightsHolder
such as datapack::addAccessRule()
(which takes the sysmeta as an input) or arcticdatautils::set_rights_and_access()
, which only requires a PID
. In general, you most frequently need to use dataone::getSystemMetadata()
to change either the formatId
or fileName
slots (see the DataONE list of format ids) for acceptable formats.
After you have changed the necessary slot, you can update the system metadata using the following command:
Identifiers and sysmeta
Importantly, changing the system metadata does NOT necessitate a change in the PID
of an object. This is because changes to the system metadata do not change the object itself, they are only changing the description of the object (although ideally the system metadata are accurate when an object is first published).