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

Conflict in DCAT-AP 3.0.0 LicenseDocumentShape type properties #264

Closed kburger closed 11 months ago

kburger commented 11 months ago

There seems to be a conflict in LicenseDocumentShape's properties. The two properties both define constraints on the dc:type shacl path: one with sh:class skos:Concept and one with sh:nodeKind sh:BlankNodeOrIRI.

https://github.com/SEMICeu/DCAT-AP/blob/9db2a401868f8eb1de0ab7f38f762b66181f8e5a/releases/3.0.0/shacl/dcat-ap-SHACL.ttl#L2303-L2321

Given this example data graph:

@prefix dc: <http://purl.org/dc/terms/> .

<> a dc:LicenseDocument ;
    dc:type [ ] .

This produces the following validation report in the shacl playground:

@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix schema: <http://schema.org/> .

_:report a sh:ValidationReport ;
    sh:result [
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> sh:ValidationResult ;
        sh:resultSeverity sh:Violation ;
        sh:sourceConstraintComponent sh:ClassConstraintComponent ;
        sh:sourceShape <https://semiceu.github.io//DCAT-AP/releases/3.0.0#LicenceDocumentShape/322371a77364a50f049d46180f6192532eea26dc> ;
        sh:focusNode <> ;
        sh:resultPath <http://purl.org/dc/terms/type> ;
        sh:value _:g0 ;
    ] ;
    sh:conforms false .
init-dcat-ap-de commented 11 months ago

I don't see the problem, the blank node you created is not a skos:Concept. The following should be correct:

@prefix dc: <http://purl.org/dc/terms/> .

<> a dc:LicenseDocument ;
   dc:type [
      a <http://www.w3.org/2004/02/skos/core#Concept> .
   ] .
kburger commented 11 months ago

Ah of course, thanks for the correction.