Closed seitenbau-govdata closed 1 year ago
@seitenbau-govdata if you restart the failed py2 jobs they should pass now (there was a problem with ckanext-harvest reqs, which is fixed now)
@amercader The pull request is now ready for review. Maybe you have a good idea and suggestion how the new profile could be described and announced/introduced in the documentation.
@amercader I do not want to be annoying. But do you think that you will find some time to have a look at the pull request? Or gladly also someone else if you are too busy or on vacation. Thanks in advance.
Sorry @seitenbau-govdata I'm busy with different open fronts (and school holidays!) but will definitely try to find some time for this. I had a quick look and it looks great. Do any of these changes break compatibility with DCAT-AP 1.1? ie are there changes in how existing fields where parsed/serialized or this just adds new fields?
@amercader Thanks that you will have a look and this despite the circumstances. There are no breaking changes with DCAT-AP 1.1. Only some fields are added to the graph or stored in the database if the imported graph contains properties supported by DCAT-AP 2.
The only existing properties affected by the changes are the property dct:spatial
and dct:temporal
.
1) In the property dct:spatial
the properties dcat:bbox
and dcat:centroid
are added within the class dct:Location
analogous to locn:geometry
.
2) The property dct:temporal
is added another time, containing the properties dcat:startDate
and dcat:endDate
, additionally to the property dct:temporal
containing the properties schema:startDate
and schema:endDate
.
@seitenbau-govdata thanks for your work on this, it all looks good.
In terms of introducing these changes and given they are backwards compatible, I think the best approach would be:
euro_dcat_ap_2
one. So change it here:
https://github.com/ckan/ckanext-dcat/blob/27db0318ccfeb9ffde6ab70357be3572d82092c8/ckanext/dcat/processors.py#L31For users that really want to stick with the old profile, we document how to enable it if they upgrade ckanet-dcat (I'm saying it's "partially compatible with DCAT-AP 2.1" because IIUC your PR does not cover all new fields introduced in DCAT-AP 2 right):
diff --git a/README.md b/README.md
index 0b2c50d..91077c0 100644
--- a/README.md
+++ b/README.md
@@ -670,7 +670,12 @@ In most cases the default profile will provide a good mapping that will cover mo
need custom logic, you can write a custom to profile that extends or replaces the default one.
The default profile is mostly based in the
-[DCAT application profile for data portals in Europe](https://joinup.ec.europa.eu/asset/dcat_application_profile/description). It is actually fully-compatible with [DCAT-AP v1.1](https://joinup.ec.europa.eu/asset/dcat_application_profile/asset_release/dcat-ap-v11). As mentioned before though, it should be generic enough for most DCAT based representations.
+[DCAT application profile for data portals in Europe](https://joinup.ec.europa.eu/asset/dcat_application_profile/description). It is actually fully-compatible with [DCAT-AP v1.1](https://joinup.ec.europa.eu/asset/dcat_application_profile/asset_release/dcat-ap-v11), and partially compatible with [DCAT-AP v2.1.0](https://joinup.ec.europa.eu/collection/semantic-interoperability-community-semic/solution/dcat-application-profile-data-portals-europe/release/210). As mentioned before though, it should be generic enough for most DCAT based representations.
+Sites that want to support a particular version of the DCAT-AP can enable a specific profile using one of the methods below:
+ DCAT-AP v2.1.0 (default): euro_dcat_ap_2
+ DCAT-AP v1.1.1: euro_dcat_ap
This plugin also contains a profile to serialize a CKAN dataset to a schema.org Dataset called schemaorg
. This is especially useful to provide JSON-LD structured data.
We can release 1.3.0 after this is merged.
@amercader Thanks for your input. I have changed the default profile and updated the documentation. In addition I have fixed the RDFSerializer tests for the DCAT-AP 1 profile euro_dcat_ap
and added some basic tests for the default RDFSerializer.
Feel free to comment the latest changes and/or merge the pull request. 😃
Many thanks @seitenbau-govdata, this is a long requested feature! (even if partially supported)
I won't be able to work on this in the next two weeks. Do you mind doing the new release yourself (basically updating the version, tagging and changelog)? I think 1.3.0 makes sense for this one. Thanks!
@amercader Sure, we can do the new release. 1.3.0 as new version sounds good.
We want to add support for the following DCAT-AP 2.1 properties (covers https://github.com/ckan/ckanext-dcat/issues/168):
prov:wasGeneratedByodrl:hasPolicySpecification: https://www.w3.org/TR/vocab-dcat-2/
We start by creating a new DCAT-AP 2 profile (plugin
euro_dcat_ap_2
) that inherits the profileEuropeanDCATAPProfile
(plugineuro_dcat_ap
).