@netwerk-digitaal-erfgoed/network-of-terms-catalog 5.4.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,9 @@ WHERE {
16
16
  # Aardewerk: <https://data.cultureelerfgoed.nl/term/id/abr/71e411bf-8645-4420-98a4-b8746574b002>
17
17
  # Aardewerk: <https://data.cultureelerfgoed.nl/term/id/cht/dfbf8107-09f9-49c9-8118-8e79b7613723>
18
18
  VALUES ?uri { ?uris }
19
+
20
+ ?uri a skos:Concept .
21
+
19
22
  OPTIONAL {
20
23
  ?uri skos:prefLabel ?prefLabel .
21
24
  FILTER(LANG(?prefLabel) = "nl")
@@ -1,3 +1,4 @@
1
+ PREFIX schema: <http://schema.org/>
1
2
  # Do not remove this prefix - KB data uses old version of SKOS
2
3
  PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
3
4
 
@@ -24,43 +25,50 @@ WHERE {
24
25
  # Person in NTA: <http://data.bibliotheken.nl/id/thes/p06854796X>
25
26
  VALUES ?uri { ?uris }
26
27
 
28
+ ?uri a ?type .
29
+ VALUES ?type { skos:Concept schema:Person } .
30
+
27
31
  # For Brinkman
28
32
  OPTIONAL {
29
- ?uri skos:prefLabel ?prefLabel .
30
- FILTER(LANG(?prefLabel) = "nl" )
31
- }
32
- OPTIONAL {
33
- ?uri skos:altLabel ?altLabel .
34
- FILTER(LANG(?altLabel) = "nl")
35
- }
36
- OPTIONAL {
37
- ?uri skos:hiddenLabel ?hiddenLabel .
38
- FILTER(LANG(?hiddenLabel) = "nl")
39
- }
40
- OPTIONAL {
41
- ?uri skos:scopeNote ?scopeNote .
42
- FILTER(LANG(?scopeNote) = "nl")
43
- }
44
- OPTIONAL {
45
- ?uri skos:broader ?broader_uri .
46
- ?broader_uri skos:prefLabel ?broader_prefLabel .
47
- FILTER(LANG(?broader_prefLabel) = "nl")
48
- }
49
- OPTIONAL {
50
- ?uri skos:narrower ?narrower_uri .
51
- ?narrower_uri skos:prefLabel ?narrower_prefLabel .
52
- FILTER(LANG(?narrower_prefLabel) = "nl")
53
- }
54
- OPTIONAL {
55
- ?uri skos:related ?related_uri .
56
- ?related_uri skos:prefLabel ?related_prefLabel .
57
- FILTER(LANG(?related_prefLabel) = "nl")
33
+ OPTIONAL {
34
+ ?uri skos:prefLabel ?prefLabel .
35
+ FILTER(LANG(?prefLabel) = "nl" )
36
+ }
37
+ OPTIONAL {
38
+ ?uri skos:altLabel ?altLabel .
39
+ FILTER(LANG(?altLabel) = "nl")
40
+ }
41
+ OPTIONAL {
42
+ ?uri skos:hiddenLabel ?hiddenLabel .
43
+ FILTER(LANG(?hiddenLabel) = "nl")
44
+ }
45
+ OPTIONAL {
46
+ ?uri skos:scopeNote ?scopeNote .
47
+ FILTER(LANG(?scopeNote) = "nl")
48
+ }
49
+ OPTIONAL {
50
+ ?uri skos:broader ?broader_uri .
51
+ ?broader_uri skos:prefLabel ?broader_prefLabel .
52
+ FILTER(LANG(?broader_prefLabel) = "nl")
53
+ }
54
+ OPTIONAL {
55
+ ?uri skos:narrower ?narrower_uri .
56
+ ?narrower_uri skos:prefLabel ?narrower_prefLabel .
57
+ FILTER(LANG(?narrower_prefLabel) = "nl")
58
+ }
59
+ OPTIONAL {
60
+ ?uri skos:related ?related_uri .
61
+ ?related_uri skos:prefLabel ?related_prefLabel .
62
+ FILTER(LANG(?related_prefLabel) = "nl")
63
+ }
58
64
  }
59
65
 
60
66
  # For NTA
61
- OPTIONAL { ?uri rdfs:label ?rdfs_label }
62
- OPTIONAL { ?uri schema:name ?schema_name }
63
- OPTIONAL { ?uri schema:alternateName ?schema_alternateName }
64
- OPTIONAL { ?uri schema:description ?schema_description }
67
+ OPTIONAL {
68
+ OPTIONAL { ?uri rdfs:label ?rdfs_label }
69
+ OPTIONAL { ?uri schema:name ?schema_name }
70
+ OPTIONAL { ?uri schema:alternateName ?schema_alternateName }
71
+ OPTIONAL { ?uri schema:description ?schema_description }
72
+ }
65
73
  }
66
74
  LIMIT 1000
@@ -9,13 +9,16 @@ CONSTRUCT {
9
9
  skos:narrower ?narrower_uri ;
10
10
  skos:related ?related_uri .
11
11
  ?broader_uri skos:prefLabel ?broader_prefLabel .
12
- ?narrower_uri skos:prefLabel ?narrower_prefLabel .
12
+ ?narrower_uri skos:prefLabel ?narrower_prefLabel .
13
13
  ?related_uri skos:prefLabel ?related_prefLabel .
14
14
  }
15
15
  WHERE {
16
16
  #For example:
17
17
  # Water: http://eurovoc.europa.eu/597
18
18
  VALUES ?uri { ?uris }
19
+
20
+ ?uri a skos:Concept .
21
+
19
22
  OPTIONAL {
20
23
  ?uri skos:prefLabel ?prefLabel .
21
24
  FILTER(LANG(?prefLabel) = "nl")
@@ -40,4 +43,4 @@ WHERE {
40
43
  FILTER(LANG(?related_prefLabel) = "nl")
41
44
  }
42
45
  }
43
- LIMIT 1000
46
+ LIMIT 1000
@@ -20,6 +20,8 @@ WHERE {
20
20
  # Genre: <http://data.beeldengeluid.nl/gtaa/30115>
21
21
  VALUES ?uri { ?uris }
22
22
 
23
+ ?uri a skos:Concept .
24
+
23
25
  OPTIONAL {
24
26
  ?uri skos:prefLabel ?prefLabel .
25
27
  FILTER(LANG(?prefLabel) = "nl" )
@@ -20,6 +20,9 @@ WHERE {
20
20
  # Person: <https://data.muziekschatten.nl/som/4275e51d7d94b224928da9b7707a170a>
21
21
  VALUES ?uri { ?uris }
22
22
 
23
+ ?uri a ?type .
24
+ VALUES ?type { skos:Concept schema:Person } .
25
+
23
26
  OPTIONAL {
24
27
  ?uri schema:name ?schema_name .
25
28
  FILTER(LANG(?schema_name) = "nl")
@@ -22,6 +22,9 @@ WHERE {
22
22
  # Music genre: <https://data.muziekweb.nl/Link/T00000000050>
23
23
  VALUES ?uri { ?uris }
24
24
 
25
+ ?uri a ?type .
26
+ VALUES ?type { muziekweb:Genre schema:MusicGroup } .
27
+
25
28
  OPTIONAL { ?uri rdfs:label ?rdfs_label }
26
29
  OPTIONAL { ?uri skos:prefLabel ?prefLabel }
27
30
  OPTIONAL { ?uri skos:altLabel ?altLabel }
@@ -17,6 +17,8 @@ WHERE {
17
17
  # Luxemburg: <https://hdl.handle.net/20.500.11840/termmaster17499>
18
18
  VALUES ?uri { ?uris }
19
19
 
20
+ ?uri a skos:Concept .
21
+
20
22
  OPTIONAL {
21
23
  ?uri skos:prefLabel ?prefLabel .
22
24
  }
@@ -15,6 +15,9 @@ WHERE {
15
15
  # Vincent van Gogh: <https://data.rkd.nl/artists/32439>
16
16
  VALUES ?uri { ?uris }
17
17
 
18
+ ?uri a ?type .
19
+ VALUES ?type { schema:Person schema:Organization } .
20
+
18
21
  OPTIONAL { ?uri schema:name ?schema_name . }
19
22
  OPTIONAL { ?uri schema:alternateName ?schema_alternateName . }
20
23
  OPTIONAL { ?uri schema:description ?schema_description . }
@@ -18,6 +18,8 @@ WHERE {
18
18
  # Organization: <https://data.niod.nl/WO2_Thesaurus/corporaties/5610>
19
19
  VALUES ?uri { ?uris }
20
20
 
21
+ ?uri a skos:Concept .
22
+
21
23
  OPTIONAL {
22
24
  ?uri skos:prefLabel ?prefLabel .
23
25
  FILTER(LANG(?prefLabel) = "nl")
@@ -14,8 +14,18 @@ WHERE {
14
14
  ?uri ?predicate ?label .
15
15
  VALUES ?predicate { skos:prefLabel skos:altLabel }
16
16
 
17
- # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
18
- FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
17
+ {
18
+ FILTER(?virtuosoQuery)
19
+ ?uri ?predicate ?label .
20
+ ?label <bif:contains> ?virtuosoQuery .
21
+ } UNION {
22
+ # BC support.
23
+ BIND(?virtuosoQuery as ?b)
24
+ FILTER(!BOUND(?b))
25
+ ?uri ?predicate ?label .
26
+ # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
27
+ FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")) )
28
+ }
19
29
 
20
30
  OPTIONAL { ?uri skos:prefLabel ?prefLabel }
21
31
  OPTIONAL { ?uri skos:altLabel ?altLabel }
@@ -22,8 +22,18 @@ WHERE {
22
22
  VALUES ?predicate { skos:prefLabel skos:altLabel }
23
23
  FILTER(LANG(?label) = "nl")
24
24
 
25
- # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
26
- FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
25
+ {
26
+ FILTER(?virtuosoQuery)
27
+ ?uri ?predicate ?label .
28
+ ?label <bif:contains> ?virtuosoQuery .
29
+ } UNION {
30
+ # BC support.
31
+ BIND(?virtuosoQuery as ?b)
32
+ FILTER(!BOUND(?b))
33
+ ?uri ?predicate ?label .
34
+ # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
35
+ FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
36
+ }
27
37
 
28
38
  OPTIONAL {
29
39
  ?uri skos:prefLabel ?prefLabel .
@@ -18,8 +18,19 @@ WHERE {
18
18
  VALUES ?predicate { skos:prefLabel skos:altLabel }
19
19
  FILTER(LANG(?label) = "nl")
20
20
 
21
- # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
22
- FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
21
+ {
22
+ FILTER(?virtuosoQuery)
23
+ ?uri ?predicate ?label .
24
+ ?label <bif:contains> ?virtuosoQuery .
25
+ } UNION {
26
+ # BC support.
27
+ BIND(?virtuosoQuery as ?b)
28
+ FILTER(!BOUND(?b))
29
+ ?uri ?predicate ?label .
30
+ # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
31
+ FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")) )
32
+ }
33
+
23
34
  OPTIONAL {
24
35
  ?uri skos:prefLabel ?prefLabel .
25
36
  FILTER(LANG(?prefLabel) = "nl" )
@@ -13,10 +13,19 @@ CONSTRUCT {
13
13
  }
14
14
  WHERE {
15
15
  ?uri a muziekweb:Genre .
16
- ?uri rdfs:label ?rdfs_label .
17
16
 
18
- # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
19
- FILTER (<bif:contains> (?rdfs_label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
17
+ {
18
+ FILTER(?virtuosoQuery)
19
+ ?uri rdfs:label ?rdfs_label .
20
+ ?rdfs_label <bif:contains> ?virtuosoQuery .
21
+ } UNION {
22
+ # BC support.
23
+ BIND(?virtuosoQuery as ?b)
24
+ FILTER(!BOUND(?b))
25
+ ?uri rdfs:label ?rdfs_label .
26
+ # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
27
+ FILTER (<bif:contains> (?rdfs_label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")) )
28
+ }
20
29
 
21
30
  OPTIONAL {
22
31
  ?uri skos:broader ?broader_uri .
@@ -14,8 +14,18 @@ WHERE {
14
14
  ?uri ?predicate ?label .
15
15
  VALUES ?predicate { skos:prefLabel skos:altLabel }
16
16
 
17
- # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
18
- FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
17
+ {
18
+ FILTER(?virtuosoQuery)
19
+ ?uri ?predicate ?label .
20
+ ?label <bif:contains> ?virtuosoQuery .
21
+ } UNION {
22
+ # BC support.
23
+ BIND(?virtuosoQuery as ?b)
24
+ FILTER(!BOUND(?b))
25
+ ?uri ?predicate ?label .
26
+ # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
27
+ FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")) )
28
+ }
19
29
 
20
30
  OPTIONAL { ?uri skos:prefLabel ?prefLabel }
21
31
  OPTIONAL { ?uri skos:altLabel ?altLabel }
@@ -15,8 +15,18 @@ WHERE {
15
15
  ?uri ?predicate ?label .
16
16
  VALUES ?predicate { skos:prefLabel skos:altLabel }
17
17
 
18
- # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
19
- FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
18
+ {
19
+ FILTER(?virtuosoQuery)
20
+ ?uri ?predicate ?label .
21
+ ?label <bif:contains> ?virtuosoQuery .
22
+ } UNION {
23
+ # BC support.
24
+ BIND(?virtuosoQuery as ?b)
25
+ FILTER(!BOUND(?b))
26
+ ?uri ?predicate ?label .
27
+ # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
28
+ FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")) )
29
+ }
20
30
 
21
31
  OPTIONAL {
22
32
  ?uri skos:prefLabel ?prefLabel .
@@ -12,8 +12,25 @@ WHERE {
12
12
  ?uri ?predicate ?label .
13
13
  VALUES ?predicate { rdfs:label schema:name schema:alternateName }
14
14
 
15
- # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
16
- FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
15
+ {
16
+ FILTER(?virtuosoQuery)
17
+ ?uri ?predicate ?label .
18
+ ?label <bif:contains> ?virtuosoQuery .
19
+ } UNION {
20
+ # BC support.
21
+ BIND(?virtuosoQuery as ?b)
22
+ FILTER(!BOUND(?b))
23
+ ?uri ?predicate ?label .
24
+ # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
25
+ FILTER (<bif:contains> (?label,
26
+ REPLACE(
27
+ REPLACE(?query, "[.,]", " "),
28
+ "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)(?!$)(?![[:space:]])",
29
+ " AND ",
30
+ "i"
31
+ )
32
+ ))
33
+ }
17
34
 
18
35
  OPTIONAL { ?uri rdfs:label ?rdfs_label }
19
36
  OPTIONAL { ?uri schema:name ?schema_name }
@@ -7,7 +7,8 @@ CONSTRUCT {
7
7
  skos:prefLabel ?schema_name ;
8
8
  skos:altLabel ?schema_alternateName ;
9
9
  skos:scopeNote ?schema_description ;
10
- rdfs:seeAlso ?rdfs_seeAlso .
10
+ # commented the following lines as a temporary fix
11
+ # rdfs:seeAlso ?rdfs_seeAlso .
11
12
  }
12
13
  WHERE {
13
14
  ?uri a ?type .
@@ -15,13 +16,32 @@ WHERE {
15
16
  ?uri ?name ?label .
16
17
  VALUES ?name { schema:name schema:alternateName }
17
18
 
18
- # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
19
- FILTER (<bif:contains> (?label, REPLACE(?query, "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)", " AND ", "i")))
19
+ {
20
+ FILTER(?virtuosoQuery)
21
+ ?uri ?predicate ?label .
22
+ ?label <bif:contains> ?virtuosoQuery .
23
+ } UNION {
24
+ # BC support.
25
+ BIND(?virtuosoQuery as ?b)
26
+ FILTER(!BOUND(?b))
27
+ ?uri ?predicate ?label .
28
+ # Replace query "A B" with "A AND B", leaving queries "A AND B" or "A OR B" unchanged.
29
+ FILTER (<bif:contains> (?label,
30
+ REPLACE(
31
+ REPLACE(?query, "[.,]", " "),
32
+ "(?<!AND)(?<!OR)[[:space:]]+(?!AND)(?!OR)(?!$)(?![[:space:]])",
33
+ " AND ",
34
+ "i"
35
+ )
36
+ ))
37
+ }
20
38
 
21
39
  OPTIONAL { ?uri schema:name ?schema_name . }
22
40
  OPTIONAL { ?uri schema:alternateName ?schema_alternateName . }
23
41
  OPTIONAL { ?uri schema:description ?schema_description . }
24
- BIND(STRAFTER(STR(?uri), "https://data.rkd.nl/artists/") AS ?identifier)
25
- BIND(IRI(CONCAT("https://rkd.nl/explore/artists/", ?identifier)) AS ?rdfs_seeAlso)
42
+
43
+ # commented the following lines as a temporary fix
44
+ #BIND(STRAFTER(STR(?uri), "https://data.rkd.nl/artists/") AS ?identifier)
45
+ #BIND(IRI(CONCAT("https://rkd.nl/explore/artists/", ?identifier)) AS ?rdfs_seeAlso)
26
46
  }
27
47
  LIMIT 1000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netwerk-digitaal-erfgoed/network-of-terms-catalog",
3
- "version": "5.4.0",
3
+ "version": "5.5.1",
4
4
  "description": "Catalog of Network of Terms datasets",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,14 +30,14 @@
30
30
  "devDependencies": {
31
31
  "@types/jest": "^27.0.1",
32
32
  "@types/n3": "^1.4.3",
33
- "@types/node": "^16.0.0",
33
+ "@types/node": "^17.0.0",
34
34
  "@types/rdf-ext": "^1.3.7",
35
35
  "gts": "^3.0.2",
36
36
  "jest": "^27.0.3",
37
37
  "jsonld-streaming-parser": "^2.1.0",
38
38
  "rdf-data-factory": "^1.0.1",
39
39
  "rdf-ext": "^1.3.0",
40
- "rdf-validate-shacl": "^0.3.1",
40
+ "rdf-validate-shacl": "^0.4.0",
41
41
  "ts-jest": "^27.0.2",
42
42
  "typescript": "^4.0.5"
43
43
  },