ropensci / datapack

An R package to handle data packages
https://docs.ropensci.org/datapack
44 stars 9 forks source link

dc:creator not being updated correctly #93

Closed gothub closed 6 years ago

gothub commented 6 years ago

When a resource map is parsed, the dc:creator ("http://purl.org/dc/elements/1.1/creator"should be detected. When the resource map is later serialized, the modification time should be updated.

The parse/serialize steps were ignoring any existing dc:creator and adding a new dc:creator as "DataONE R Client", such that multiple dc:creators are inserted into the resource map.

This should be rectified by having the parse step filter out extraneous dc:creator triples, retaining the one with the oldest modification time. On serialization, the modification time should be updated to the current time.

mbjones commented 6 years ago

Or maybe it should update it and be sure the dc:creator that remains reflects the actual software and version that created this particular version of the resource map, i.e., the one that is writing out the resource map now. I've never understood why dc:creator is used for a software agent.

gothub commented 6 years ago

The original ntention was to update the dc:creator with the last software agent that modified the resource map. This is not what the MetacatUI editor does, so I was updating the behaviour of datapack to match MetacatUI, which does not change dc:creator but just updates the dc:modified date.

Whichever convention is adopted, it should be consistent across all software systems that modify DataONE content.

From my reading, the ORE spec isn't clear which approach to follow.

gothub commented 6 years ago

Updated in commit 5666aae6ca21caa3f089158763fbab4c103991dd