ropensci / datapack

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

Verify / lookup IANA Media Type for DataObject creating #120

Open gothub opened 4 years ago

gothub commented 4 years ago

Currently when a DataObject is created, any string can be entered for the formatId, and this value will be used in the system metadata and the Solr index. The value does not have to be a recognized IANA Media Type or a registered DataONE formatId.

Should the DataObject constructor guess the type if it is not provided, and add it to the SystemMetadata object that is contained in the DataObject, either in the <formatId> or <mediaType> field, or both?