DCAT-US writer required fields
hmaier-fws opened this issue · comments
Proposed mapping of mdJSON to DCAT-US required fields. For information on the DCAT-US schema see:
- https://resources.data.gov/schemas/dcat-us/v1.1/schema/dataset.json
- https://resources.data.gov/resources/dcat-us
- https://github.com/adiwg/mdTranslator/blob/feature/dcat-us-writer/notes.md
title
mdJSON source: citation.title
description
mdJSON source: resourceInfo.abstract
keyword
mdJSON source: resourceInfo.keyword.keyword
Conditions:
- Flatten all keywords into a single array of strings
modified
mdJSON source: resourceInfo.citation.date
Conditions:
- WHERE: resourceInfo.citation.date.dateType IN ("lastUpdated", "lastRevised", "revision")
- SELECT most recent of above
ELSE
- IF resourceInfo.citation.date EXISTS
- SELECT most recent date
publisher
mdJSON source:
- IF citation.responsibleParty.role = "publisher"
- SELECT contactId -> contact.name WHERE isOrganization = TRUE
ELSE
- IF exists resourceDistribution.distributor.contact [first contact]
- SELECT contactId -> contact.name where isOrganization = TRUE
subOrganizationOf (publisher parent)
if citation.responsibleParty.role = "publisher"
and exists contactId -> memberOfOrganization[0]
and isOrganization is true
contactId -> contact.name
ELSE
if exists resourceDistribution.distributor.contact
and exists contactId -> memberOfOrganization[0]
and isOrganization IS TRUE
contactId -> contact.name
contactPoint
mdJSON source: resourceInfo.pointOfContact.parties
- contactPoint.fn: resourceInfo.pointOfContact.parties[0].contactId -> contact.name
- contactPoint.hasEmail: resourceInfo.pointOfContact.parties[0].contactId -> contact.eMailList[0]
identifier
Mapping of the DCAT-US identifier field requires further discussion and has been assigned to separate issue. See: #265
accessLevel
Mapping of the DCAT-US accessLevel field requires further discussion and has been assigned to a separate issue. See: #266
Description element missing
Modified element missing as test data did not include revisions or updates, only original publication. This is a required field therefore logic should probably include whatever date is there for the primary citation if there are no revisions or updates.
Program code and Bureau code should be identified in this issue as part of the required elements with notations that they require discussion with spun off issues.
Program code and Bureau code should be identified in this issue as part of the required elements with notations that they require discussion with spun off issues.
@dwalt there is already an separate issue for required federal fields (see: #267). They are not listed in this issue because they are actually conditional fields, which become mandatory if the data being described relates to the U.S. Federal Government (see DCAT-US USG note).
@hmaier-fws thanks for clarification