@netwerk-digitaal-erfgoed/network-of-terms-catalog 10.16.1 → 10.17.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.
- package/catalog/datasets/aat-materials.jsonld +2 -4
- package/catalog/datasets/aat-processes-and-techniques.jsonld +1 -3
- package/catalog/datasets/aat-styles-and-periods.jsonld +1 -3
- package/catalog/datasets/aat.jsonld +7 -9
- package/catalog/datasets/abr.jsonld +2 -6
- package/catalog/datasets/adamlink-adressen.jsonld +2 -6
- package/catalog/datasets/adamlink-straten.jsonld +2 -6
- package/catalog/datasets/brabantse-gebouwen.jsonld +1 -3
- package/catalog/datasets/brinkman.jsonld +1 -3
- package/catalog/datasets/canon-van-limburg.jsonld +83 -0
- package/catalog/datasets/cht-materials.jsonld +1 -3
- package/catalog/datasets/cht-styles-and-periods.jsonld +1 -3
- package/catalog/datasets/cht.jsonld +1 -3
- package/catalog/datasets/eurovoc.jsonld +2 -6
- package/catalog/datasets/geonames-nl-be-de.jsonld +4 -8
- package/catalog/datasets/geonames.jsonld +4 -8
- package/catalog/datasets/goudatijdmachine-straten.jsonld +2 -4
- package/catalog/datasets/gtaa-classificatie.jsonld +1 -3
- package/catalog/datasets/gtaa-genres.jsonld +1 -3
- package/catalog/datasets/gtaa-geografische-namen.jsonld +1 -3
- package/catalog/datasets/gtaa-namen.jsonld +1 -3
- package/catalog/datasets/gtaa-onderwerpen-beng.jsonld +1 -3
- package/catalog/datasets/gtaa-onderwerpen.jsonld +1 -3
- package/catalog/datasets/gtaa-persoonsnamen.jsonld +1 -3
- package/catalog/datasets/homosaurus.jsonld +2 -6
- package/catalog/datasets/iconclass.jsonld +2 -6
- package/catalog/datasets/ied.jsonld +2 -6
- package/catalog/datasets/koloniaal-verleden.jsonld +1 -3
- package/catalog/datasets/muziekschatten-klassieke-werken.jsonld +2 -6
- package/catalog/datasets/muziekschatten-onderwerpen.jsonld +2 -6
- package/catalog/datasets/muziekschatten-personen.jsonld +2 -6
- package/catalog/datasets/mw-genresstijlen.jsonld +1 -3
- package/catalog/datasets/mw-personengroepen.jsonld +1 -3
- package/catalog/datasets/nmvw.jsonld +2 -6
- package/catalog/datasets/nta.jsonld +2 -6
- package/catalog/datasets/picot-gebeurtenistypen.jsonld +81 -0
- package/catalog/datasets/rijksmonumenten.jsonld +1 -3
- package/catalog/datasets/rkdartists.jsonld +2 -6
- package/catalog/datasets/rtf-personen.jsonld +2 -6
- package/catalog/datasets/stcn-drukkers.jsonld +1 -3
- package/catalog/datasets/uitvoeringsmedium.jsonld +2 -6
- package/catalog/datasets/vrouwenthesaurus.jsonld +67 -0
- package/catalog/datasets/westerbork.jsonld +2 -6
- package/catalog/datasets/wikidata-entities-all.jsonld +3 -7
- package/catalog/datasets/wikidata-entities-persons.jsonld +2 -6
- package/catalog/datasets/wikidata-entities-places.jsonld +2 -6
- package/catalog/datasets/wikidata-entities-streets.jsonld +2 -6
- package/catalog/datasets/wo2biografie.jsonld +1 -3
- package/catalog/datasets/wo2thesaurus.jsonld +2 -6
- package/catalog/publishers.jsonld +31 -1
- package/catalog/queries/lookup/canon-van-limburg.rq +54 -0
- package/catalog/queries/lookup/goudatijdmachine-straten.rq +33 -34
- package/catalog/queries/lookup/wo2thesaurus.rq +8 -2
- package/catalog/queries/search/aat-materials.rq +6 -8
- package/catalog/queries/search/aat-processes-and-techniques.rq +6 -8
- package/catalog/queries/search/aat-styles-and-periods.rq +7 -9
- package/catalog/queries/search/aat.rq +6 -8
- package/catalog/queries/search/abr.rq +1 -1
- package/catalog/queries/search/canon-van-limburg.rq +56 -0
- package/catalog/queries/search/goudatijdmachine-straten.rq +39 -48
- package/catalog/queries/search/rtf-personen.rq +1 -1
- package/catalog/queries/search/wo2thesaurus.rq +7 -2
- package/dist/getCatalog.d.ts +0 -6
- package/dist/getCatalog.d.ts.map +1 -1
- package/dist/getCatalog.js +16 -10
- package/package.json +8 -8
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
2
|
+
PREFIX schema: <https://schema.org/>
|
|
3
|
+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
4
|
+
|
|
5
|
+
CONSTRUCT {
|
|
6
|
+
?uri a skos:Concept ;
|
|
7
|
+
skos:prefLabel ?prefLabel ;
|
|
8
|
+
skos:altLabel ?altLabel ;
|
|
9
|
+
skos:scopeNote ?scopeNote ;
|
|
10
|
+
skos:exactMatch ?exactMatch_uri ;
|
|
11
|
+
skos:broader ?broader_uri ;
|
|
12
|
+
skos:narrower ?narrower_uri ;
|
|
13
|
+
skos:related ?related_uri ;
|
|
14
|
+
skos:seeAlso ?seeAlso_uri .
|
|
15
|
+
?exactMatch_uri skos:prefLabel ?exactMatch_prefLabel .
|
|
16
|
+
?broader_uri skos:prefLabel ?broader_prefLabel .
|
|
17
|
+
?narrower_uri skos:prefLabel ?narrower_prefLabel .
|
|
18
|
+
?related_uri skos:prefLabel ?related_prefLabel .
|
|
19
|
+
?seeAlso_uri skos:prefLabel ?seeAlso_prefLabel .
|
|
20
|
+
}
|
|
21
|
+
WHERE {
|
|
22
|
+
GRAPH <https://canonvanlimburg.limburgcollectie.nl> {
|
|
23
|
+
{
|
|
24
|
+
SELECT ?uri ?prefLabel ?altLabel WHERE {
|
|
25
|
+
?uri a skos:Concept ;
|
|
26
|
+
skos:prefLabel ?prefLabel ;
|
|
27
|
+
skos:altLabel ?altLabel .
|
|
28
|
+
|
|
29
|
+
FILTER(CONTAINS(LCASE(?prefLabel), LCASE(?query)) || CONTAINS(LCASE(?altLabel), LCASE(?query)))
|
|
30
|
+
}
|
|
31
|
+
#LIMIT#
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
OPTIONAL { ?uri skos:scopeNote ?scopeNote }
|
|
35
|
+
OPTIONAL {
|
|
36
|
+
?uri skos:exactMatch ?exactMatch_uri .
|
|
37
|
+
OPTIONAL { ?exactMatch_uri skos:prefLabel ?exactMatch_prefLabel }
|
|
38
|
+
}
|
|
39
|
+
OPTIONAL {
|
|
40
|
+
?uri skos:broader ?broader_uri .
|
|
41
|
+
OPTIONAL { ?broader_uri skos:prefLabel ?broader_prefLabel }
|
|
42
|
+
}
|
|
43
|
+
OPTIONAL {
|
|
44
|
+
?uri skos:narrower ?narrower_uri .
|
|
45
|
+
OPTIONAL { ?narrower_uri skos:prefLabel ?narrower_prefLabel }
|
|
46
|
+
}
|
|
47
|
+
OPTIONAL {
|
|
48
|
+
?uri skos:related ?related_uri .
|
|
49
|
+
OPTIONAL { ?related_uri skos:prefLabel ?related_prefLabel }
|
|
50
|
+
}
|
|
51
|
+
OPTIONAL {
|
|
52
|
+
?uri skos:seeAlso ?seeAlso_uri .
|
|
53
|
+
OPTIONAL { ?seeAlso_uri skos:prefLabel ?seeAlso_prefLabel }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -2,57 +2,48 @@ PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
|
2
2
|
PREFIX gtm: <https://www.goudatijdmachine.nl/def#>
|
|
3
3
|
PREFIX sdo: <https://schema.org/>
|
|
4
4
|
PREFIX hg: <http://rdf.histograph.io/>
|
|
5
|
-
PREFIX
|
|
6
|
-
PREFIX luc-index: <http://www.ontotext.com/connectors/lucene/instance#>
|
|
5
|
+
PREFIX ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/>
|
|
7
6
|
PREFIX omeka: <http://omeka.org/s/vocabs/o#>
|
|
8
7
|
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
|
9
8
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
10
|
-
PREFIX vrank: <http://purl.org/voc/vrank#>
|
|
11
|
-
|
|
12
9
|
CONSTRUCT {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
?exactMatch_uri skos:prefLabel ?exactMatch_label .
|
|
10
|
+
?piduri a skos:Concept ;
|
|
11
|
+
skos:prefLabel ?prefLabel ;
|
|
12
|
+
skos:altLabel ?altLabel;
|
|
13
|
+
skos:scopeNote ?scopeNote ;
|
|
14
|
+
skos:related ?related_uri ;
|
|
15
|
+
skos:exactMatch ?exactMatch_uri .
|
|
16
|
+
?related_uri skos:prefLabel ?related_prefLabel .
|
|
17
|
+
?exactMatch_uri skos:prefLabel ?exactMatch_label .
|
|
22
18
|
} WHERE {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
CONCAT(
|
|
40
|
-
IF ( EXISTS { ?uri omeka:item_set <https://n2t.net/ark:/60537/bd75pg> }, "Verdwenen straat", "Straat" ),
|
|
41
|
-
IF ( BOUND(?genoemdNaar), CONCAT(" in Gouda, genoemd naar ", ?genoemdNaar )," in Gouda" )
|
|
42
|
-
)
|
|
19
|
+
?uri sdo:name|sdo:alternateName ?item .
|
|
20
|
+
?uri a gtm:Straat .
|
|
21
|
+
?text ql:contains-entity ?item .
|
|
22
|
+
?text ql:contains-word ?query .
|
|
23
|
+
?uri owl:sameAs ?piduri .
|
|
24
|
+
?uri sdo:name ?prefLabel .
|
|
25
|
+
OPTIONAL {
|
|
26
|
+
?uri gtm:genoemdNaar ?genoemdNaar .
|
|
27
|
+
}
|
|
28
|
+
BIND (
|
|
29
|
+
CONCAT(
|
|
30
|
+
IF ( EXISTS {
|
|
31
|
+
?uri omeka:item_set <https://n2t.net/ark:/60537/bd75pg>
|
|
32
|
+
}, "Verdwenen straat", "Straat" ),
|
|
33
|
+
IF ( BOUND(?genoemdNaar), CONCAT(" in Gouda, genoemd naar ", ?genoemdNaar )," in Gouda" )
|
|
34
|
+
)
|
|
43
35
|
AS ?scopeNote )
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
36
|
+
OPTIONAL {
|
|
37
|
+
?uri sdo:alternateName ?altLabel .
|
|
38
|
+
}
|
|
39
|
+
OPTIONAL {
|
|
40
|
+
?uri hg:absorbedBy|hg:absorbed ?related_uri .
|
|
41
|
+
?related_uri a gtm:Straat ;
|
|
42
|
+
sdo:name ?related_prefLabel .
|
|
43
|
+
FILTER (?uri != ?related_uri )
|
|
44
|
+
}
|
|
45
|
+
OPTIONAL {
|
|
46
|
+
?uri rdfs:seeAlso ?exactMatch_uri .
|
|
47
|
+
?exactMatch_uri omeka:label ?exactMatch_label .
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -19,7 +19,7 @@ WHERE {
|
|
|
19
19
|
OPTIONAL { ?uri skos:scopeNote ?scopeNote }
|
|
20
20
|
OPTIONAL { ?uri skos:exactMatch ?exactMatch_uri }
|
|
21
21
|
|
|
22
|
-
FILTER(CONTAINS(LCASE(?prefLabel), LCASE(?query)) || CONTAINS(LCASE(?
|
|
22
|
+
FILTER(CONTAINS(LCASE(?prefLabel), LCASE(?query)) || CONTAINS(LCASE(?altLabel), LCASE(?query)))
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -16,14 +16,19 @@ WHERE {
|
|
|
16
16
|
{
|
|
17
17
|
SELECT ?uri WHERE {
|
|
18
18
|
?uri ?predicate ?label .
|
|
19
|
-
# Exclude terms
|
|
19
|
+
# Exclude terms that are *only* in 'Technische Lijsten', but keep terms that are also in other schemes
|
|
20
20
|
FILTER NOT EXISTS {
|
|
21
|
-
|
|
21
|
+
?uri skos:inScheme <https://data.niod.nl/WO2_Thesaurus/11183> .
|
|
22
|
+
FILTER NOT EXISTS {
|
|
23
|
+
?uri skos:inScheme ?otherScheme .
|
|
24
|
+
FILTER(?otherScheme != <https://data.niod.nl/WO2_Thesaurus/11183>)
|
|
25
|
+
}
|
|
22
26
|
}
|
|
23
27
|
VALUES ?predicate { skos:prefLabel skos:altLabel }
|
|
24
28
|
FILTER(LANG(?label) = "nl")
|
|
25
29
|
FILTER(CONTAINS(LCASE(?label), LCASE(?query)))
|
|
26
30
|
}
|
|
31
|
+
|
|
27
32
|
#LIMIT#
|
|
28
33
|
}
|
|
29
34
|
OPTIONAL {
|
package/dist/getCatalog.d.ts
CHANGED
|
@@ -2,10 +2,4 @@ import { Catalog } from '@netwerk-digitaal-erfgoed/network-of-terms-query';
|
|
|
2
2
|
import type RDF from '@rdfjs/types';
|
|
3
3
|
export declare function getCatalog(path?: string): Promise<Catalog>;
|
|
4
4
|
export declare function fromStore(store: RDF.Store): Promise<Catalog>;
|
|
5
|
-
/**
|
|
6
|
-
* Return a separate RDF.Store for each catalog file because merging them into a single store
|
|
7
|
-
* causes blank nodes to be re-used instead of incremented when adding the next file.
|
|
8
|
-
*/
|
|
9
|
-
export declare function fromFiles(directory: string): Promise<RDF.Store>;
|
|
10
|
-
export declare function fromFile(file: string): Promise<RDF.Store>;
|
|
11
5
|
//# sourceMappingURL=getCatalog.d.ts.map
|
package/dist/getCatalog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCatalog.d.ts","sourceRoot":"","sources":["../src/getCatalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCatalog.d.ts","sourceRoot":"","sources":["../src/getCatalog.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,OAAO,EAMR,MAAM,kDAAkD,CAAC;AAI1D,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAKpC,wBAAsB,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMhE;AA0FD,wBAAsB,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CA8DlE"}
|
package/dist/getCatalog.js
CHANGED
|
@@ -3,12 +3,12 @@ import { rdfParser } from 'rdf-parse';
|
|
|
3
3
|
import { QueryEngine } from '@comunica/query-sparql-rdfjs';
|
|
4
4
|
import { Transform } from 'stream';
|
|
5
5
|
import { globby } from 'globby';
|
|
6
|
-
import { storeStream } from 'rdf-store-stream';
|
|
7
6
|
import { Catalog, Dataset, Feature, FeatureType, Organization, SparqlDistribution, } from '@netwerk-digitaal-erfgoed/network-of-terms-query';
|
|
8
7
|
import { fileURLToPath } from 'url';
|
|
9
8
|
import { ldkit, rdf, schema } from 'ldkit/namespaces';
|
|
10
9
|
import { createLens } from 'ldkit';
|
|
11
10
|
import { dirname, join } from 'node:path';
|
|
11
|
+
import { RdfStore } from 'rdf-stores';
|
|
12
12
|
export async function getCatalog(path) {
|
|
13
13
|
const directory = (path ?? fileURLToPath(new URL('../catalog', import.meta.url))).replace(/\\/g, '/'); // Windows compatibility.
|
|
14
14
|
const store = await fromFiles(directory);
|
|
@@ -103,7 +103,8 @@ const engine = new QueryEngine();
|
|
|
103
103
|
export async function fromStore(store) {
|
|
104
104
|
const lens = createLens(catalogSchema, {
|
|
105
105
|
sources: [store],
|
|
106
|
-
|
|
106
|
+
// Cast needed: rdf-parse uses Comunica v4 types, incompatible with v5.
|
|
107
|
+
engine: engine,
|
|
107
108
|
distinctConstruct: true,
|
|
108
109
|
});
|
|
109
110
|
const datasets = await lens.find();
|
|
@@ -120,22 +121,27 @@ export async function fromStore(store) {
|
|
|
120
121
|
* Return a separate RDF.Store for each catalog file because merging them into a single store
|
|
121
122
|
* causes blank nodes to be re-used instead of incremented when adding the next file.
|
|
122
123
|
*/
|
|
123
|
-
|
|
124
|
+
async function fromFiles(directory) {
|
|
124
125
|
// Read all files except those in the queries/ directory.
|
|
125
126
|
const files = await globby([directory, '!' + directory + '/queries']);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
const store = RdfStore.createDefault();
|
|
128
|
+
for (const file of files) {
|
|
129
|
+
const stream = fromFile(file);
|
|
130
|
+
await new Promise((resolve, reject) => {
|
|
131
|
+
store.import(stream);
|
|
132
|
+
stream.on('end', resolve);
|
|
133
|
+
stream.on('error', reject);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return store;
|
|
130
137
|
}
|
|
131
|
-
|
|
132
|
-
|
|
138
|
+
function fromFile(file) {
|
|
139
|
+
return rdfParser
|
|
133
140
|
.parse(fs.createReadStream(file), {
|
|
134
141
|
path: file,
|
|
135
142
|
})
|
|
136
143
|
.pipe(new InlineFiles(file))
|
|
137
144
|
.pipe(new SubstituteCredentialsFromEnvironmentVariables());
|
|
138
|
-
return storeStream(quadStream);
|
|
139
145
|
}
|
|
140
146
|
/**
|
|
141
147
|
* An RDF.Quad transform that inlines file://... references in the quad's object value.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netwerk-digitaal-erfgoed/network-of-terms-catalog",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.17.1",
|
|
4
4
|
"description": "Catalog of Network of Terms datasets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nde"
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"!**/*.tsbuildinfo"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@comunica/query-sparql": "^
|
|
38
|
-
"@comunica/query-sparql-rdfjs": "^
|
|
37
|
+
"@comunica/query-sparql": "^5.1.2",
|
|
38
|
+
"@comunica/query-sparql-rdfjs": "^5.1.2",
|
|
39
39
|
"@netwerk-digitaal-erfgoed/network-of-terms-query": "*",
|
|
40
40
|
"@rdfjs/types": "^2.0.1",
|
|
41
41
|
"globby": "^14.0.2",
|
|
42
42
|
"ldkit": "^2.5.1",
|
|
43
|
-
"memoize": "^10.
|
|
44
|
-
"rdf-parse": "^
|
|
45
|
-
"rdf-
|
|
43
|
+
"memoize": "^10.2.0",
|
|
44
|
+
"rdf-parse": "^5.0.0",
|
|
45
|
+
"rdf-stores": "^2.1.1",
|
|
46
46
|
"tslib": "^2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@comunica/types": "^
|
|
50
|
-
"@types/n3": "^1.
|
|
49
|
+
"@comunica/types": "^5.1.0",
|
|
50
|
+
"@types/n3": "^1.26.1",
|
|
51
51
|
"@types/rdf-ext": "^2.5.2",
|
|
52
52
|
"jsonld-streaming-parser": "^5.0.0",
|
|
53
53
|
"rdf-ext": "^2.6.0",
|