If the content of a nexml object is modified, this function can add a provenance record documenting the modification. The provenance documentation is added to the toplevel metadata (i.e., at the "nexml" level).
add_provenance_record(nexml, cmd = NA, creator = Sys.getenv("USER"))the nexml object to which to add provenance documentation
character, the command (such as a function invocation) to document
in the provenance record. If NA (the default), the invocation of the
function calling this one will be used as the command.
character, a value identifying the person running the
software. The default is the system's USER environment variable.
A nexml object with provenance records added.
At present, for each invocation this implementation will do the following:
If the top-level metadata for the nexml object contains
dc:description annotations(s), they are moved to being nested
within a dcterms:provenance annotation, and prefixed with
"Original description:".
A dcterms:provenance annotation is added, with nested properties
dc:creator (see parameter creator), dcterms:modified (current
time), and dc:description. The latter gives the command to document,
see parameter cmd.
A provenance record using Prov-O
(a W3C recommendation) nested within prov:wasGeneratedBy is added.
In RDF Turtle representation, the record would have the following structure
(cf. obo:IAO_0000591):