skohub-io / skohub-shapes

4 stars 2 forks source link

10 skohub shape #11

Closed sroertgen closed 10 months ago

sroertgen commented 10 months ago

Adds a basic skohub shape, which is not dependent on SPARQL-based constraints and can therefore be used with tools like https://github.com/zazuko/rdf-validate-shacl

The shape is based on the types and the code used in SkoHub Vocabs and therefore a bit more restrictive than the regular SKOS shape.

Test Cases for each constraint were added and tests adjusted.

acka47 commented 10 months ago

I started to look into this. Looks very thorough on first glance. A general question: What does the numbering in the file names (e.g. 01_cs, 26_c) refer to? Is it documented somewhere?

sroertgen commented 10 months ago

good point. it is correlated to the order of the constraints in the shape. But I could add a comment to each constraint indicating the referenced test. What do you think?

sth like:

:ConceptSchemeShape
  a sh:NodeShape ;
  sh:targetClass skos:ConceptScheme ;
  sh:property [
    sh:path dct:title ;
    sh:minCount 1;
    sh:datatype rdf:langString ;
    sh:message "Concept Scheme has no dct:title with a language tag!" ;
    sh:severity sh:Violation ;
    rdfs:comment "This is SkoHub specific. Tested with: 01_cs_no_title.ttl" ;
  ] ;