GovDataOfficial / ckanext-dcatde

DE: Dieses Repository beinhaltet die Erweiterung von ckanext-dcat auf die Spezifikation DCAT-AP.de. EN: This is a DCAT-AP.de specific CKAN extension for providing and importing DCAT-AP.de-Profile data.
http://www.dcat-ap.de/
GNU Affero General Public License v3.0
11 stars 11 forks source link

Validating for GovData harvesting fails #14

Open ondics opened 2 years ago

ondics commented 2 years ago

When checking our datasets, the EU validator using Profile DCAT-AP.de 2.0 - Spezifikation (BETA.08-04.1)

https://offenedaten.frankfurt.de/catalog.rdf?fq=tags:GovData-Harvesting

we get these errors:

Test:[Shape] - [http://dcat-ap.de/def/dcatde/Distribution_dcat_mediaType_v_List] - [Wert] - [text/csv]
Test:[Shape] - [http://dcat-ap.de/def/dcatde/Distribution_dct_format_v_List] - [Wert] - [HTML]
Test:[Shape] - [http://dcat-ap.de/def/dcatde/Catalog_dct_language_v_List] - [Wert] - [de]

The fields come from the CKAN core and have semantic relevance in CKAN, so we cannot easily change values of those fields.

The easiest way to fix these errors for GovData harvesting would be to modify the creation of the RDF file catalog.rdf using some code like:

match ckanLanguage:
        case "de":
            rdfLanguage = "http://publications.europa.eu/resource/authority/language/DEU"
        case "en":
            rdfLanguage = "http://publications.europa.eu/resource/authority/language/ENG"
        case _:
            return "CKAN language not supported currently"

For a quick fix we could start with the most popular strings used in dcat_mediaType, dct_format and language_v.

Are there better fixes? Or maybe in other CKAN extensions?