Skip to content

Commit 9fe2940

Browse files
committed
Allow some more properties for describing the concept scheme #14
1 parent e41c74b commit 9fe2940

File tree

4 files changed

+217
-17
lines changed

4 files changed

+217
-17
lines changed

skohub.shacl.ttl

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
@prefix dct: <http://purl.org/dc/terms/> .
1010
@prefix sdo: <https://schema.org> .
1111
@prefix vann: <http://purl.org/vocab/vann/> .
12+
@prefix dc: <http://purl.org/dc/elements/1.1/> .
1213

1314
# rdfs:comment holds info with what file under ./tests/invalid/skohub.shacl.ttl
1415
# the constraint is tested
@@ -17,14 +18,32 @@
1718
:ConceptSchemeShape
1819
a sh:NodeShape ;
1920
sh:targetClass skos:ConceptScheme ;
20-
sh:property [
21-
sh:path dct:title ;
22-
sh:minCount 1;
23-
sh:datatype rdf:langString ;
24-
sh:message "Concept Scheme has no dct:title with a language tag!" ;
25-
sh:severity sh:Violation ;
26-
rdfs:comment "Tested with 01_cs_no_title.ttl" ;
27-
] ;
21+
sh:or (
22+
[
23+
sh:path dct:title ;
24+
sh:minCount 1;
25+
sh:datatype rdf:langString ;
26+
sh:message "Concept Scheme has no dct:title with a language tag!" ;
27+
sh:severity sh:Violation ;
28+
rdfs:comment "Tested with 01_cs_no_title.ttl" ;
29+
]
30+
[
31+
sh:path skos:prefLabel ;
32+
sh:minCount 1;
33+
sh:datatype rdf:langString ;
34+
sh:message "Concept Scheme has no skos:prefLabel with a language tag!" ;
35+
sh:severity sh:Violation ;
36+
rdfs:comment "Tested with 01_cs_no_title.ttl" ;
37+
]
38+
[
39+
sh:path dc:title ;
40+
sh:minCount 1;
41+
sh:datatype rdf:langString ;
42+
sh:message "Concept Scheme has no dc:title with a language tag!" ;
43+
sh:severity sh:Violation ;
44+
rdfs:comment "Tested with 01_cs_no_title.ttl" ;
45+
]
46+
);
2847
sh:property [
2948
sh:path skos:hasTopConcept ;
3049
sh:minCount 1 ;
@@ -40,15 +59,26 @@
4059
sh:message "The target class for hasTopConcept should be skos:Concept" ;
4160
rdfs:comment "Tested with 03_cs_target_class_hasTopConcept.ttl" ;
4261
] ;
43-
sh:property [
44-
sh:path dct:description ;
45-
sh:datatype rdf:langString ;
46-
sh:severity sh:Warning ;
47-
sh:minCount 1 ;
48-
sh:message: "A description of the Concept Scheme should be provided." ;
49-
rdfs:comment "Tested with 04_cs_no_description.ttl" ;
50-
rdfs:comment "Tested with 05_cs_description_no_langstring.ttl" ;
51-
] ;
62+
sh:or (
63+
[
64+
sh:path dct:description ;
65+
sh:datatype rdf:langString ;
66+
sh:severity sh:Warning ;
67+
sh:minCount 1 ;
68+
sh:message: "A description of the Concept Scheme should be provided." ;
69+
rdfs:comment "Tested with 04_cs_no_description.ttl" ;
70+
rdfs:comment "Tested with 05_cs_description_no_langstring.ttl" ;
71+
]
72+
[
73+
sh:path dc:description ;
74+
sh:datatype rdf:langString ;
75+
sh:severity sh:Warning ;
76+
sh:minCount 1 ;
77+
sh:message: "A description of the Concept Scheme should be provided." ;
78+
rdfs:comment "Tested with 04_cs_no_description.ttl" ;
79+
rdfs:comment "Tested with 05_cs_description_no_langstring.ttl" ;
80+
]
81+
) ;
5282
sh:property [
5383
sh:path dct:license ;
5484
sh:minCount 1 ;
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
@base <http://w3id.org/> .
2+
@prefix dct: <http://purl.org/dc/terms/> .
3+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
4+
@prefix schema: <http://schema.org/> .
5+
@prefix vann: <http://purl.org/vocab/vann/> .
6+
7+
# This Concept Scheme has a skos:prefLabel
8+
9+
<> a skos:ConceptScheme ;
10+
skos:prefLabel "Test Vokabular"@de, "Test Vocabulary"@en ;
11+
dct:description "Test Beschreibung"@de, "Test Description"@en ;
12+
dct:issued "2019-12-11" ;
13+
dct:publisher <https://oerworldmap.org/resource/urn:uuid:fd06253e-fe67-4910-b923-51db9d27e59f> ;
14+
dct:license <http://creativecommons.org/licenses/by/4.0/> ;
15+
vann:preferredNamespaceUri "https://w3id.org/test" ;
16+
skos:hasTopConcept <c1> .
17+
18+
<c1> a skos:Concept ;
19+
skos:prefLabel "Konzept 1"@de, "Concept 1"@en ;
20+
skos:altLabel "Alternativbezeichnung 1"@de, "Alternativbezeichnung 2"@de, "Alt Label 1"@en ;
21+
skos:hiddenLabel "Verstecktes Label 1"@de, "Verstecktes Label 2"@de ;
22+
skos:definition "Meine Definition"@de ;
23+
skos:scopeNote "Meine Scope Note"@de ;
24+
skos:note "Meine Anmerkung"@de ;
25+
skos:notation "1", "notation" ;
26+
skos:example "Ein Beispiel"@de ;
27+
skos:narrower <c2> ;
28+
skos:narrowerTransitive <c2> ;
29+
skos:narrowMatch <https://my-iri.org/> ;
30+
skos:related <c4> ;
31+
skos:relatedMatch <https://my-iri.org/> ;
32+
skos:closeMatch <https://my-iri.org/> ;
33+
skos:exactMatch <https://my-iri.org/> ;
34+
skos:topConceptOf <> .
35+
36+
<c2> a skos:Concept ;
37+
skos:prefLabel "Konzept 2"@de, "Concept 2"@en ;
38+
skos:narrower <c3> ;
39+
skos:broader <c1> ;
40+
skos:broaderTransitive <c1> ;
41+
skos:broadMatch <https://my-iri.org/> ;
42+
skos:inScheme <> .
43+
44+
<c3> a skos:Concept ;
45+
skos:prefLabel "Konzept 3"@de ;
46+
skos:broader <c2> ;
47+
skos:inScheme <> .
48+
49+
<c4> a skos:Concept ;
50+
skos:prefLabel "Konzept 4"@de ;
51+
skos:broader <c2> ;
52+
skos:inScheme <> .
53+
54+
<collection> a skos:Collection ;
55+
skos:prefLabel "Meine Collection"@de, "My Collection"@en ;
56+
skos:member <c1>, <c2> .
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
@base <http://w3id.org/> .
2+
@prefix dct: <http://purl.org/dc/terms/> .
3+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
4+
@prefix schema: <http://schema.org/> .
5+
@prefix vann: <http://purl.org/vocab/vann/> .
6+
@prefix dc: <http://purl.org/dc/elements/1.1/> .
7+
8+
# This Concept Scheme has a dc:title field
9+
10+
<> a skos:ConceptScheme ;
11+
dc:title "Test Vokabular"@de, "Test Vocabulary"@en ;
12+
dct:description "Test Beschreibung"@de, "Test Description"@en ;
13+
dct:issued "2019-12-11" ;
14+
dct:publisher <https://oerworldmap.org/resource/urn:uuid:fd06253e-fe67-4910-b923-51db9d27e59f> ;
15+
dct:license <http://creativecommons.org/licenses/by/4.0/> ;
16+
vann:preferredNamespaceUri "https://w3id.org/test" ;
17+
skos:hasTopConcept <c1> .
18+
19+
<c1> a skos:Concept ;
20+
skos:prefLabel "Konzept 1"@de, "Concept 1"@en ;
21+
skos:altLabel "Alternativbezeichnung 1"@de, "Alternativbezeichnung 2"@de, "Alt Label 1"@en ;
22+
skos:hiddenLabel "Verstecktes Label 1"@de, "Verstecktes Label 2"@de ;
23+
skos:definition "Meine Definition"@de ;
24+
skos:scopeNote "Meine Scope Note"@de ;
25+
skos:note "Meine Anmerkung"@de ;
26+
skos:notation "1", "notation" ;
27+
skos:example "Ein Beispiel"@de ;
28+
skos:narrower <c2> ;
29+
skos:narrowerTransitive <c2> ;
30+
skos:narrowMatch <https://my-iri.org/> ;
31+
skos:related <c4> ;
32+
skos:relatedMatch <https://my-iri.org/> ;
33+
skos:closeMatch <https://my-iri.org/> ;
34+
skos:exactMatch <https://my-iri.org/> ;
35+
skos:topConceptOf <> .
36+
37+
<c2> a skos:Concept ;
38+
skos:prefLabel "Konzept 2"@de, "Concept 2"@en ;
39+
skos:narrower <c3> ;
40+
skos:broader <c1> ;
41+
skos:broaderTransitive <c1> ;
42+
skos:broadMatch <https://my-iri.org/> ;
43+
skos:inScheme <> .
44+
45+
<c3> a skos:Concept ;
46+
skos:prefLabel "Konzept 3"@de ;
47+
skos:broader <c2> ;
48+
skos:inScheme <> .
49+
50+
<c4> a skos:Concept ;
51+
skos:prefLabel "Konzept 4"@de ;
52+
skos:broader <c2> ;
53+
skos:inScheme <> .
54+
55+
<collection> a skos:Collection ;
56+
skos:prefLabel "Meine Collection"@de, "My Collection"@en ;
57+
skos:member <c1>, <c2> .
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
@base <http://w3id.org/> .
2+
@prefix dct: <http://purl.org/dc/terms/> .
3+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
4+
@prefix schema: <http://schema.org/> .
5+
@prefix vann: <http://purl.org/vocab/vann/> .
6+
@prefix dc: <http://purl.org/dc/elements/1.1/> .
7+
8+
# Concept Scheme has a dc:description
9+
10+
<> a skos:ConceptScheme ;
11+
dct:title "Test Vokabular"@de, "Test Vocabulary"@en ;
12+
dc:description "Test Beschreibung"@de, "Test Description"@en ;
13+
dct:issued "2019-12-11" ;
14+
dct:publisher <https://oerworldmap.org/resource/urn:uuid:fd06253e-fe67-4910-b923-51db9d27e59f> ;
15+
dct:license <http://creativecommons.org/licenses/by/4.0/> ;
16+
vann:preferredNamespaceUri "https://w3id.org/test" ;
17+
skos:hasTopConcept <c1> .
18+
19+
<c1> a skos:Concept ;
20+
skos:prefLabel "Konzept 1"@de, "Concept 1"@en ;
21+
skos:altLabel "Alternativbezeichnung 1"@de, "Alternativbezeichnung 2"@de, "Alt Label 1"@en ;
22+
skos:hiddenLabel "Verstecktes Label 1"@de, "Verstecktes Label 2"@de ;
23+
skos:definition "Meine Definition"@de ;
24+
skos:scopeNote "Meine Scope Note"@de ;
25+
skos:note "Meine Anmerkung"@de ;
26+
skos:notation "1", "notation" ;
27+
skos:example "Ein Beispiel"@de ;
28+
skos:narrower <c2> ;
29+
skos:narrowerTransitive <c2> ;
30+
skos:narrowMatch <https://my-iri.org/> ;
31+
skos:related <c4> ;
32+
skos:relatedMatch <https://my-iri.org/> ;
33+
skos:closeMatch <https://my-iri.org/> ;
34+
skos:exactMatch <https://my-iri.org/> ;
35+
skos:topConceptOf <> .
36+
37+
<c2> a skos:Concept ;
38+
skos:prefLabel "Konzept 2"@de, "Concept 2"@en ;
39+
skos:narrower <c3> ;
40+
skos:broader <c1> ;
41+
skos:broaderTransitive <c1> ;
42+
skos:broadMatch <https://my-iri.org/> ;
43+
skos:inScheme <> .
44+
45+
<c3> a skos:Concept ;
46+
skos:prefLabel "Konzept 3"@de ;
47+
skos:broader <c2> ;
48+
skos:inScheme <> .
49+
50+
<c4> a skos:Concept ;
51+
skos:prefLabel "Konzept 4"@de ;
52+
skos:broader <c2> ;
53+
skos:inScheme <> .
54+
55+
<collection> a skos:Collection ;
56+
skos:prefLabel "Meine Collection"@de, "My Collection"@en ;
57+
skos:member <c1>, <c2> .

0 commit comments

Comments
 (0)