SEMICeu / DCAT-AP

This is the issue tracker for the maintenance of DCAT-AP
https://joinup.ec.europa.eu/solution/dcat-application-profile-data-portals-europe
72 stars 24 forks source link

Add URIs to property shapes #224

Closed init-dcat-ap-de closed 4 weeks ago

init-dcat-ap-de commented 2 years ago

Turned all properties into named nodes so it is possible to extend them if necessary.

Instead of

:Agent_Shape
sh:property [
    sh:minCount 1 ;
    sh:nodeKind sh:Literal ;
    sh:path foaf:name ;
    sh:severity sh:Violation
] .

it is now

:Agent_Property_dct_type
    sh:maxCount 1 ;
    sh:path dct:type ;
    sh:severity sh:Violation .

:Agent_Shape
    sh:property :Agent_Property_dct_type .

This allows us to use the file as it is in a SHACL Validator and still extend it, e.g. adding error messages (sh:message) or turn some tests off (sh:deactivated), by adding an additional file containing:

:Agent_Property_foaf_name
    sh:message "Ein foaf:Agent MUSS über einen foaf:name verfügen!" @de .

:Agent_Property_dct_type
    sh:deactivated true .
bertvannuffelen commented 2 years ago

Thanks for the improvements. A short question for the future, do you rely in your tooling on the specific URI of the individual elements? Because if for some reason these are changed later (e.g. because a tool would produce the URIs).

bertvannuffelen commented 4 weeks ago

The manual one have not got a URI assigned, those that are generated have now a unique URI assigned.