Unify logic for setting metadata via files and via the api/process
The parsing of metadata files should use the same validation logic as when setting values using the API.
The parsing of metadata files should use the same validation logic as when setting values using the API.