@igea/oac_backend 1.0.35 → 1.0.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igea/oac_backend",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "Backend service for the OAC project",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -202,4 +202,105 @@ router.get('/export/:format/:entity/:id', (req, res) => {
202
202
 
203
203
  });
204
204
 
205
+ // GENERAL SPARQL QUERIES ---------------------------------------------------------------
206
+
207
+ router.get("/endpoint/sparql", async (req, res) => {
208
+ try {
209
+ const query = req.query.query;
210
+ if (!query) return res.status(400).json({ error: "Missing ?query=" });
211
+
212
+ const url = fusekiUrl + "?query=" + encodeURIComponent(query);
213
+
214
+ axios.get(url, {
215
+ headers: {
216
+ 'Accept': 'application/sparql-results+json'
217
+ }
218
+ })
219
+ .then(response => {
220
+ res.status(200).json(response.data);
221
+ }).catch(error => {
222
+ let message = (error.response?.status + error.response?.data) || error.message
223
+ res.status(500).json({
224
+ message: 'Error from SPARQL end-point: ' + message,
225
+ query
226
+ });
227
+ });
228
+ } catch (err) {
229
+ console.error(err);
230
+ res.status(500).json({ error: "SPARQL request failed" });
231
+ }
232
+ });
233
+
234
+ router.post("/endpoint/sparql", async (req, res) => {
235
+ try {
236
+ const { query, format = "json" } = req.body;
237
+ if (!query) return res.status(400).json({ error: "Missing query" });
238
+
239
+ // INVIO A FUSEKI
240
+ axios.post(fusekiUrl, query, {
241
+ headers: {
242
+ "Content-Type": "application/sparql-query",
243
+ "Accept":
244
+ format === "xml"
245
+ ? "application/sparql-results+xml"
246
+ : "application/sparql-results+json",
247
+ }
248
+ })
249
+ .then(response => {
250
+ if(format === "xml")
251
+ res.send(response.data);
252
+ else
253
+ res.status(200).json(response.data);
254
+ }).catch(error => {
255
+ let message = (error.response?.status + error.response?.data) || error.message
256
+ res.status(500).json({
257
+ message: 'Error from SPARQL end-point: ' + message,
258
+ query
259
+ });
260
+ });
261
+
262
+
263
+ } catch (err) {
264
+ console.error(err);
265
+ res.status(500).json({ error: "SPARQL request failed" });
266
+ }
267
+ });
268
+
269
+ router.post('/endpoint/update', (req, res) => {
270
+ try {
271
+ const updateQuery =
272
+ typeof req.body === "string"
273
+ ? req.body
274
+ : req.body.update;
275
+
276
+ if (!updateQuery)
277
+ return res.status(400).json({
278
+ error: "Missing SPARQL UPDATE in request body"
279
+ });
280
+
281
+ // INVIO A FUSEKI
282
+ axios.post(fusekiUrlUpdate, updateQuery, {
283
+ headers: {
284
+ 'Content-Type': 'application/sparql-update',
285
+ 'Accept': 'application/sparql-results+json'
286
+ }
287
+ })
288
+ .then(response => {
289
+ res.status(200).json({
290
+ message: 'Query update executed correctly: ' + response.data
291
+ });
292
+ }).catch(error => {
293
+ let message = (error.response?.status + error.response?.data) || error.message
294
+ res.status(500).json({
295
+ message: 'Error from SPARQL end-point: ' + message,
296
+ query
297
+ });
298
+ });
299
+
300
+ } catch (err) {
301
+ console.error(err);
302
+ res.status(500).json({ error: "SPARQL UPDATE request failed" });
303
+ }
304
+ })
305
+
205
306
  module.exports = router
@@ -39,5 +39,40 @@ router.get('/schema/:format', (req, res) => {
39
39
  });
40
40
  });
41
41
 
42
+ router.get('/schema/:type/:what', (req, res) => {
43
+ console.log(`Requesting SHACL schema in format: ${req.params.type}`);
44
+ let type = req.params.type || 'config';
45
+ let filePath = null;
46
+ switch(type){
47
+ case 'config':
48
+ filePath = 'config.shacl.ttl'; //'schema_v1.shacl.ttl';
49
+ res.setHeader('Content-Type', 'text/turtle');
50
+ break;
51
+ case 'form':
52
+ filePath = req.params.what + '/form.json';
53
+ res.setHeader('Content-Type', 'application/json');
54
+ break;
55
+ case 'query':
56
+ filePath = req.params.what + '/query.json';
57
+ res.setHeader('Content-Type', 'application/json');
58
+ break;
59
+ default:
60
+ res.status(400).json({
61
+ success: false,
62
+ data: null,
63
+ message: `Unsupported type: ${type}`
64
+ });
65
+ return;
66
+ }
67
+ res.sendFile(path.join(ONTO_FOLDER, 'form', filePath), (err) => {
68
+ if (err) {
69
+ res.status(500).json({
70
+ success: false,
71
+ data: null,
72
+ message: `Error sending file: ${err}`
73
+ });
74
+ }
75
+ });
76
+ });
42
77
 
43
78
  module.exports = router
@@ -26,6 +26,7 @@
26
26
  @prefix dc: <http://purl.org/dc/elements/1.1/> .
27
27
  @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
28
28
  @prefix skosxl: <http://www.w3.org/2008/05/skos-xl#> .
29
+ @prefix ex: <http://example.com/ns#> .
29
30
 
30
31
  <https://data.mydomain.com/ontologies/sparnatural-config> a owl:Ontology .
31
32
 
@@ -62,7 +63,20 @@ this:Vehicle_VIN sh:path odb:VIN;
62
63
  sh:maxCount "1"^^xsd:integer;
63
64
  sh:nodeKind sh:Literal;
64
65
  sh:datatype xsd:string;
65
- dash:searchWidget core:AutocompleteProperty;
66
+
67
+ #dash:searchWidget core:AutocompleteProperty;
68
+
69
+ dash:searchWidget core:ListProperty ;
70
+ sh:in (
71
+ "Orange"
72
+ "Lemon"
73
+ "Strawberry"
74
+ "Blueberry"
75
+ "Carrot"
76
+ "Beetroot"
77
+ "Lettuce"
78
+ "Spinach"
79
+ ) ;
66
80
  dash:propertyRole dash:LabelRole .
67
81
 
68
82
  this:Vehicle_hasManufacturer sh:path odb:hasManufacturer;
@@ -0,0 +1,64 @@
1
+ {
2
+ "bindings": [
3
+ {
4
+ "variable": "Museum_8",
5
+ "node": {
6
+ "type": "UserPrompt",
7
+ "name": {
8
+ "en": "Museum",
9
+ "fr": "Musée"
10
+ }
11
+ }
12
+ },
13
+ {
14
+ "variable": "Date_14",
15
+ "node": {
16
+ "type": "UserPrompt",
17
+ "name": {
18
+ "en": "Date of creation",
19
+ "fr": "Date de création"
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "variable": "Category_4",
25
+ "node": {
26
+ "type": "UserPrompt",
27
+ "name": {
28
+ "en": "Category of author",
29
+ "fr": "Catégorie de l'auteur"
30
+ }
31
+ }
32
+ },
33
+ {
34
+ "variable": "Country_6",
35
+ "node": {
36
+ "type": "UserPrompt",
37
+ "name": {
38
+ "en": "Country of author",
39
+ "fr": "Pays de l'auteur"
40
+ }
41
+ }
42
+ },
43
+ {
44
+ "variable": "Date_10",
45
+ "node": {
46
+ "type": "UserPrompt",
47
+ "name": {
48
+ "en": "Date of birth of author",
49
+ "fr": "Date de naissance de l'auteur"
50
+ }
51
+ }
52
+ },
53
+ {
54
+ "variable": "Text_16",
55
+ "node": {
56
+ "type": "UserPrompt",
57
+ "name": {
58
+ "en": "Search inside description",
59
+ "fr": "Rechercher dans la description"
60
+ }
61
+ }
62
+ }
63
+ ]
64
+ }
@@ -0,0 +1,137 @@
1
+
2
+ {
3
+ "distinct": true,
4
+ "variables": [
5
+ {
6
+ "termType": "Variable",
7
+ "value": "Artwork_1"
8
+ },
9
+ {
10
+ "termType": "Variable",
11
+ "value": "Person_2"
12
+ },
13
+ {
14
+ "termType": "Variable",
15
+ "value": "Country_6"
16
+ },
17
+ {
18
+ "termType": "Variable",
19
+ "value": "Museum_8"
20
+ },
21
+ {
22
+ "termType": "Variable",
23
+ "value": "Date_10"
24
+ },
25
+ {
26
+ "termType": "Variable",
27
+ "value": "Image_12"
28
+ },
29
+ {
30
+ "termType": "Variable",
31
+ "value": "Date_14"
32
+ },
33
+ {
34
+ "termType": "Variable",
35
+ "value": "Text_16"
36
+ }
37
+ ],
38
+ "order": null,
39
+ "branches": [
40
+ {
41
+ "line": {
42
+ "s": "Artwork_1",
43
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork_author",
44
+ "o": "Person_2",
45
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork",
46
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Person",
47
+ "values": [],
48
+ "optional": true
49
+ },
50
+ "children": [
51
+ {
52
+ "line": {
53
+ "s": "Person_2",
54
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Person_classifiedIn",
55
+ "o": "Category_4",
56
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Person",
57
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Category",
58
+ "values": []
59
+ },
60
+ "children": [],
61
+ "optional": true
62
+ },
63
+ {
64
+ "line": {
65
+ "s": "Person_2",
66
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Person_bornIn",
67
+ "o": "Country_6",
68
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Person",
69
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Country",
70
+ "values": []
71
+ },
72
+ "children": [],
73
+ "optional": true
74
+ },
75
+ {
76
+ "line": {
77
+ "s": "Person_2",
78
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Person_birthDate",
79
+ "o": "Date_10",
80
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Person",
81
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Date",
82
+ "values": []
83
+ },
84
+ "children": [],
85
+ "optional": true
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "line": {
91
+ "s": "Artwork_1",
92
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork_displayedAt",
93
+ "o": "Museum_8",
94
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork",
95
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Museum",
96
+ "values": []
97
+ },
98
+ "children": [],
99
+ "optional": true
100
+ },
101
+ {
102
+ "line": {
103
+ "s": "Artwork_1",
104
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork_thumbnail",
105
+ "o": "Image_12",
106
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork",
107
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Image",
108
+ "values": []
109
+ },
110
+ "children": [],
111
+ "optional": true
112
+ },
113
+ {
114
+ "line": {
115
+ "s": "Artwork_1",
116
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork_creationYear",
117
+ "o": "Date_14",
118
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork",
119
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Date",
120
+ "values": []
121
+ },
122
+ "children": [],
123
+ "optional": true
124
+ },
125
+ {
126
+ "line": {
127
+ "s": "Artwork_1",
128
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork_description",
129
+ "o": "Text_16",
130
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork",
131
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Text",
132
+ "values": []
133
+ },
134
+ "children": []
135
+ }
136
+ ]
137
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "bindings": [
3
+ {
4
+ "variable": "Country_2",
5
+ "node": {
6
+ "type": "UserPrompt",
7
+ "name": {
8
+ "en": "Country",
9
+ "fr": "Pays"
10
+ }
11
+ }
12
+ },
13
+ {
14
+ "variable": "Number_8",
15
+ "node": {
16
+ "type": "UserPrompt",
17
+ "name": {
18
+ "en": "Number of visitors",
19
+ "fr": "Nombre de visiteurs"
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "variable": "Text_6",
25
+ "node": {
26
+ "type": "UserPrompt",
27
+ "name": {
28
+ "en": "Search in description",
29
+ "fr": "Rechercher dans la description"
30
+ }
31
+ }
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "distinct": true,
3
+ "variables": [
4
+ {
5
+ "termType": "Variable",
6
+ "value": "Museum_1"
7
+ },
8
+ {
9
+ "termType": "Variable",
10
+ "value": "Country_2"
11
+ },
12
+ {
13
+ "termType": "Variable",
14
+ "value": "Image_4"
15
+ },
16
+ {
17
+ "termType": "Variable",
18
+ "value": "Text_6"
19
+ },
20
+ {
21
+ "termType": "Variable",
22
+ "value": "Number_8"
23
+ }
24
+ ],
25
+ "order": null,
26
+ "branches": [
27
+ {
28
+ "line": {
29
+ "s": "Museum_1",
30
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Museum_country",
31
+ "o": "Country_2",
32
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Museum",
33
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Country",
34
+ "values": [],
35
+ "optional": true
36
+ },
37
+ "children": []
38
+ },
39
+ {
40
+ "line": {
41
+ "s": "Museum_1",
42
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Museum_thumbnail",
43
+ "o": "Image_4",
44
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Museum",
45
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Image",
46
+ "values": [],
47
+ "optional": true
48
+ },
49
+ "children": []
50
+ },
51
+ {
52
+ "line": {
53
+ "s": "Museum_1",
54
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Museum_description",
55
+ "o": "Text_6",
56
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Museum",
57
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Text",
58
+ "values": []
59
+ },
60
+ "children": []
61
+ },
62
+ {
63
+ "line": {
64
+ "s": "Museum_1",
65
+ "p": "https://data.mydomain.com/ontologies/sparnatural-config/Museum_numberOfVisitors",
66
+ "o": "Number_8",
67
+ "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Museum",
68
+ "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Number",
69
+ "values": [],
70
+ "optional": true
71
+ },
72
+ "children": []
73
+ }
74
+ ]
75
+ }
@@ -0,0 +1,509 @@
1
+ @prefix schema: <http://schema.org/> .
2
+ @prefix volipi: <http://data.sparna.fr/ontologies/volipi#> .
3
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
4
+ @prefix wdt: <http://www.wikidata.org/prop/direct/> .
5
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6
+ @prefix skosthes: <http://purl.org/iso25964/skos-thes#> .
7
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
8
+ @prefix geo: <http://www.opengis.net/ont/geosparql#> .
9
+ @prefix qb: <http://purl.org/linked-data/cube#> .
10
+ @prefix doap: <http://usefulinc.com/ns/doap#> .
11
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
12
+ @prefix dcterms: <http://purl.org/dc/terms/> .
13
+ @prefix dcat: <http://www.w3.org/ns/dcat#> .
14
+ @prefix euvoc: <http://publications.europa.eu/ontology/euvoc#> .
15
+ @prefix prov: <http://www.w3.org/ns/prov#> .
16
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
17
+ @prefix adms: <http://www.w3.org/ns/adms#> .
18
+ @prefix org: <http://www.w3.org/ns/org#> .
19
+ @prefix xls2rdf: <https://xls2rdf.sparna.fr/vocabulary#> .
20
+ @prefix this: <https://data.mydomain.com/ontologies/sparnatural-config/> .
21
+ @prefix dbpedia: <http://dbpedia.org/ontology/> .
22
+ @prefix odb: <http://example.com/ontology/odb#> .
23
+ @prefix core: <http://data.sparna.fr/ontologies/sparnatural-config-core#> .
24
+ @prefix datasources: <http://data.sparna.fr/ontologies/sparnatural-config-datasources#> .
25
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
26
+ @prefix dash: <http://datashapes.org/dash#> .
27
+ @prefix sparql: <http://www.w3.org/ns/sparql-service-description#> .
28
+ @prefix dc: <http://purl.org/dc/elements/1.1/> .
29
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
30
+ @prefix skosxl: <http://www.w3.org/2008/05/skos-xl#> .
31
+
32
+ <https://data.mydomain.com/ontologies/sparnatural-config> a owl:Ontology;
33
+ dcterms:source <https://docs.google.com/spreadsheets/d/1raPi-qimg5gdD_3jWdBVlQqwbmKGIlVf>;
34
+ dcterms:format <https://xls2rdf.sparna.fr/rest/convert?url=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1raPi-qimg5gdD_3jWdBVlQqwbmKGIlVf%2Fexport%3Fformat%3Dxlsx&noPostProcessings=true> .
35
+
36
+ this:Artwork a sh:NodeShape;
37
+ sh:order "1"^^xsd:integer;
38
+ volipi:iconName "fa-solid fa-paint-brush";
39
+ sh:targetClass dbpedia:Artwork;
40
+ sh:nodeKind sh:IRI;
41
+ rdfs:label "Artwork"@en, "Oeuvre"@fr;
42
+ sh:description "A piece of art that can be displayed in a museum"@en, "Une Œuvre qui peut être exposée dans un musée"@fr;
43
+ sh:property this:Artwork_label, this:Artwork_author, this:Artwork_creationYear, this:Artwork_displayedAt,
44
+ this:Artwork_thumbnail, this:Artwork_description .
45
+
46
+ this:Museum a sh:NodeShape;
47
+ sh:order "2"^^xsd:integer;
48
+ volipi:iconName "fa-solid fa-university";
49
+ sh:targetClass dbpedia:Museum;
50
+ sh:nodeKind sh:IRI;
51
+ rdfs:label "Museum"@en, "Musée"@fr;
52
+ sh:description "A DBPedia Museum"@en, "Un Musée DBPedia"@fr;
53
+ sh:property this:Museum_country, this:Museum_label, this:Museum_numberOfVisitors,
54
+ this:Museum_displays, this:Museum_inWikidata, this:Museum_thumbnail, this:Museum_description .
55
+
56
+ this:Country a sh:NodeShape;
57
+ sh:order "3"^^xsd:integer;
58
+ volipi:iconName "fa-solid fa-globe-africa";
59
+ sh:targetClass dbpedia:Country;
60
+ sh:nodeKind sh:IRI;
61
+ rdfs:label "Country"@en, "Pays"@fr;
62
+ sh:description "A DBPedia Country"@en, "Un Pays DBPedia"@fr;
63
+ sh:property this:Country_countryOf, this:Country_label, this:Country_deathPlace, this:Country_birthPlace .
64
+
65
+ this:Person a sh:NodeShape;
66
+ sh:order "4"^^xsd:integer;
67
+ volipi:iconName "fa-solid fa-male";
68
+ sh:targetClass dbpedia:Person;
69
+ sh:nodeKind sh:IRI;
70
+ rdfs:label "Person"@en, "Personne"@fr;
71
+ sh:description "A person, here usually a painter or sculptor"@en, "Une personne, ici souvent un peintre ou un scupteur"@fr;
72
+ sh:property this:Person_bornIn, this:Person_diedIn, this:Person_label, this:Person_birthDate,
73
+ this:Person_classifiedIn, this:Person_created, this:Person_deathYear, this:Person_movement,
74
+ this:Person_thumbnail, this:Person_description .
75
+
76
+ this:Movement a sh:NodeShape;
77
+ sh:order "5"^^xsd:integer;
78
+ volipi:iconName "fa-solid fa-palette";
79
+ sh:nodeKind sh:IRI;
80
+ rdfs:label "Movement"@en, "Mouvement"@fr;
81
+ sh:description "A school of artists, a painting style"@en, "Une école d'artistes, un style pictural"@fr;
82
+ sh:property this:Movement_movementIncludes, this:Movement_description, this:Movement_label .
83
+
84
+ this:Category a sh:NodeShape;
85
+ sh:order "6"^^xsd:integer;
86
+ volipi:iconName "fa-solid fa-palette";
87
+ sh:nodeKind sh:IRI;
88
+ rdfs:label "Category"@en, "Catégorie"@fr;
89
+ sh:description "A wikipedia category"@en, "Une catégorie Wikipedia"@fr .
90
+
91
+ this:MuseumWikidata a sh:NodeShape;
92
+ sh:order "7"^^xsd:integer;
93
+ volipi:iconName "fa-solid fa-university";
94
+ sh:nodeKind sh:IRI;
95
+ rdfs:label "Wikidata Museum"@en, "Musée Wikidata"@fr;
96
+ sh:description "The record of the Museum in Wikidata."@en, "La fiche du musée dans Wikidata"@fr;
97
+ sh:property this:MuseumWikidata_situe_a .
98
+
99
+ this:Image a sh:NodeShape;
100
+ sh:order "10"^^xsd:integer;
101
+ volipi:iconName "fa-solid fa-image";
102
+ sh:nodeKind sh:Literal;
103
+ rdfs:label "Image"@en, "Image"@fr .
104
+
105
+ this:Date a sh:NodeShape;
106
+ sh:order "11"^^xsd:integer;
107
+ volipi:iconName "fa-solid fa-calendar-alt";
108
+ sh:nodeKind sh:Literal;
109
+ rdfs:label "Date"@en, "Date"@fr;
110
+ sh:description "A date or a year"@en, "Une date ou une année"@fr .
111
+
112
+ this:Position a sh:NodeShape;
113
+ sh:order "12"^^xsd:integer;
114
+ volipi:iconName "fa-solid fa-map";
115
+ sh:nodeKind sh:Literal;
116
+ rdfs:label "Position"@en, "Position"@fr;
117
+ sh:description "Position on a map, expressed as WKT datatype, queried in GeoSPARQL"@en,
118
+ "Position sur une carte, exprimée en WKT, requếtée avec GeoSPARQL"@fr .
119
+
120
+ this:Text a sh:NodeShape;
121
+ sh:order "13"^^xsd:integer;
122
+ volipi:iconName "fa-solid fa-a";
123
+ sh:nodeKind sh:Literal;
124
+ rdfs:label "Text"@en, "Texte"@fr;
125
+ sh:description "An attribute, a property that describes the object, like a name or a description. <br/><br/>Use this to select the name of the object."@en,
126
+ "Un attribut qui caractérise l'objet, comme un nom ou une description. <br/><br/>Choisissez ceci pour sélectionner le nom de l'objet"@fr .
127
+
128
+ this:Number a sh:NodeShape;
129
+ sh:order "14"^^xsd:integer;
130
+ volipi:iconName "fa-solid fa-1";
131
+ sh:nodeKind sh:Literal;
132
+ rdfs:label "Number"@en, "Nombre"@fr .
133
+
134
+ this:Artwork_label sh:path rdfs:label;
135
+ sh:name "label"@en, "libellé"@fr;
136
+ sh:minCount "1"^^xsd:integer;
137
+ sh:nodeKind sh:Literal;
138
+ sh:datatype rdf:langString;
139
+ sh:node this:Text;
140
+ dash:searchWidget core:SearchProperty;
141
+ dash:propertyRole dash:LabelRole;
142
+ core:enableOptional "false"^^xsd:boolean;
143
+ core:enableNegation "false"^^xsd:boolean .
144
+
145
+ this:Artwork_author sh:path dbpedia:author;
146
+ sh:name "author"@en, "auteur"@fr;
147
+ sh:description "the artist, painter or sculptor who created the artwork"@en, "l'artiste, le peintre ou le sculpteur qui a créé l'œuvre"@fr;
148
+ sh:nodeKind sh:IRI;
149
+ sh:class dbpedia:Person;
150
+ dash:searchWidget core:AutocompleteProperty;
151
+ datasources:datasource datasources:search_rdfslabel_bifcontains;
152
+ core:enableOptional "true"^^xsd:boolean;
153
+ core:enableNegation "true"^^xsd:boolean .
154
+
155
+ this:Artwork_creationYear sh:path dbpedia:creationYear;
156
+ sh:name "creationYear"@en, "année de création"@fr;
157
+ sh:nodeKind sh:Literal;
158
+ sh:datatype xsd:gYear;
159
+ sh:node this:Date;
160
+ dash:searchWidget core:TimeProperty-Year;
161
+ core:enableOptional "true"^^xsd:boolean;
162
+ core:enableNegation "true"^^xsd:boolean .
163
+
164
+ this:Artwork_displayedAt sh:path _:a3498c4a778c4f829e250049f6184b3d5345;
165
+ sh:name "displayed at"@en, "exposée à"@fr;
166
+ sh:nodeKind sh:IRI;
167
+ sh:class dbpedia:Museum;
168
+ dash:searchWidget core:AutocompleteProperty;
169
+ datasources:datasource datasources:search_rdfslabel_bifcontains;
170
+ core:enableOptional "true"^^xsd:boolean;
171
+ core:enableNegation "true"^^xsd:boolean .
172
+
173
+ _:a3498c4a778c4f829e250049f6184b3d5345 sh:alternativePath _:a3498c4a778c4f829e250049f6184b3d5346 .
174
+
175
+ _:a3498c4a778c4f829e250049f6184b3d5346 rdf:first dbpedia:museum;
176
+ rdf:rest _:a3498c4a778c4f829e250049f6184b3d5347 .
177
+
178
+ _:a3498c4a778c4f829e250049f6184b3d5347 rdf:first _:a3498c4a778c4f829e250049f6184b3d5348;
179
+ rdf:rest rdf:nil .
180
+
181
+ _:a3498c4a778c4f829e250049f6184b3d5348 sh:inversePath dbpedia:displays .
182
+
183
+ this:Artwork_thumbnail sh:path dbpedia:thumbnail;
184
+ sh:name "thumbnail"@en, "vignette"@fr;
185
+ sh:nodeKind sh:IRI;
186
+ sh:node this:Image;
187
+ dash:searchWidget core:NonSelectableProperty;
188
+ core:enableOptional "true"^^xsd:boolean;
189
+ core:enableNegation "true"^^xsd:boolean .
190
+
191
+ this:Artwork_description sh:path rdfs:comment;
192
+ sh:name "description"@en, "description"@fr;
193
+ sh:minCount "1"^^xsd:integer;
194
+ sh:nodeKind sh:Literal;
195
+ sh:datatype rdf:langString;
196
+ sh:node this:Text;
197
+ dash:searchWidget core:SearchProperty;
198
+ core:enableOptional "true"^^xsd:boolean;
199
+ core:enableNegation "true"^^xsd:boolean .
200
+
201
+ this:Museum_country sh:path dbpedia:country;
202
+ sh:name "country"@en, "pays"@fr;
203
+ sh:description "Specifies the country where the museum is located."@en, "Spécifie le pays où se trouve le musée."@fr;
204
+ sh:nodeKind sh:IRI;
205
+ sh:class dbpedia:Country;
206
+ dash:searchWidget core:ListProperty;
207
+ datasources:datasource datasources:list_rdfslabel_alpha;
208
+ core:enableOptional "true"^^xsd:boolean;
209
+ core:enableNegation "true"^^xsd:boolean .
210
+
211
+ this:Museum_label sh:path rdfs:label;
212
+ sh:name "label"@en, "libellé"@fr;
213
+ sh:minCount "1"^^xsd:integer;
214
+ sh:nodeKind sh:Literal;
215
+ sh:datatype rdf:langString;
216
+ sh:node this:Text;
217
+ dash:searchWidget core:SearchProperty;
218
+ dash:propertyRole dash:LabelRole;
219
+ core:enableOptional "false"^^xsd:boolean;
220
+ core:enableNegation "false"^^xsd:boolean .
221
+
222
+ this:Museum_numberOfVisitors sh:path dbpedia:numberOfVisitors;
223
+ sh:name "number of visitors"@en, "nombre de visiteurs"@fr;
224
+ sh:nodeKind sh:Literal;
225
+ sh:node this:Number;
226
+ dash:searchWidget core:NumberProperty;
227
+ core:enableOptional "true"^^xsd:boolean;
228
+ core:enableNegation "true"^^xsd:boolean .
229
+
230
+ this:Museum_displays sh:path _:a3498c4a778c4f829e250049f6184b3d5349;
231
+ sh:name "displays"@en, "expose"@fr;
232
+ sh:nodeKind sh:IRI;
233
+ sh:class dbpedia:Artwork;
234
+ dash:searchWidget core:NonSelectableProperty;
235
+ core:enableOptional "true"^^xsd:boolean;
236
+ core:enableNegation "true"^^xsd:boolean .
237
+
238
+ _:a3498c4a778c4f829e250049f6184b3d5349 sh:alternativePath _:a3498c4a778c4f829e250049f6184b3d5350 .
239
+
240
+ _:a3498c4a778c4f829e250049f6184b3d5350 rdf:first dbpedia:displays;
241
+ rdf:rest _:a3498c4a778c4f829e250049f6184b3d5351 .
242
+
243
+ _:a3498c4a778c4f829e250049f6184b3d5351 rdf:first _:a3498c4a778c4f829e250049f6184b3d5352;
244
+ rdf:rest rdf:nil .
245
+
246
+ _:a3498c4a778c4f829e250049f6184b3d5352 sh:inversePath dbpedia:museum .
247
+
248
+ this:Museum_inWikidata sh:path owl:sameAs;
249
+ sh:name "has other record"@en, "autre fiche"@fr;
250
+ sh:nodeKind sh:IRI;
251
+ sh:node this:MuseumWikidata;
252
+ dash:searchWidget core:NonSelectableProperty;
253
+ core:enableOptional "true"^^xsd:boolean;
254
+ core:enableNegation "true"^^xsd:boolean .
255
+
256
+ this:Museum_thumbnail sh:path dbpedia:thumbnail;
257
+ sh:name "thumbnail"@en, "vignette"@fr;
258
+ sh:nodeKind sh:IRI;
259
+ sh:node this:Image;
260
+ dash:searchWidget core:NonSelectableProperty;
261
+ core:enableOptional "true"^^xsd:boolean;
262
+ core:enableNegation "true"^^xsd:boolean .
263
+
264
+ this:Museum_description sh:path rdfs:comment;
265
+ sh:name "description"@en, "description"@fr;
266
+ sh:minCount "1"^^xsd:integer;
267
+ sh:nodeKind sh:Literal;
268
+ sh:datatype rdf:langString;
269
+ sh:node this:Text;
270
+ dash:searchWidget core:SearchProperty;
271
+ core:enableOptional "true"^^xsd:boolean;
272
+ core:enableNegation "true"^^xsd:boolean .
273
+
274
+ this:Country_countryOf sh:path _:a3498c4a778c4f829e250049f6184b3d5353;
275
+ sh:name "country of"@en, "pays de"@fr;
276
+ sh:description "Specifies the museums located in this country."@en, "Spécifie les musées situés dans ce pays."@fr;
277
+ sh:minCount "1"^^xsd:integer;
278
+ sh:nodeKind sh:IRI;
279
+ sh:class dbpedia:Museum;
280
+ dash:searchWidget core:AutocompleteProperty;
281
+ datasources:datasource datasources:search_rdfslabel_bifcontains;
282
+ core:enableOptional "true"^^xsd:boolean;
283
+ core:enableNegation "true"^^xsd:boolean .
284
+
285
+ _:a3498c4a778c4f829e250049f6184b3d5353 sh:inversePath dbpedia:country .
286
+
287
+ this:Country_label sh:path rdfs:label;
288
+ sh:name "label"@en, "libellé"@fr;
289
+ sh:minCount "1"^^xsd:integer;
290
+ sh:nodeKind sh:Literal;
291
+ sh:datatype rdf:langString;
292
+ sh:node this:Text;
293
+ dash:searchWidget core:AutocompleteProperty;
294
+ dash:propertyRole dash:LabelRole;
295
+ core:enableOptional "false"^^xsd:boolean;
296
+ core:enableNegation "false"^^xsd:boolean .
297
+
298
+ this:Country_deathPlace sh:path _:a3498c4a778c4f829e250049f6184b3d5354;
299
+ sh:order "2";
300
+ sh:name "death place of"@en, "lieu de décès de"@fr;
301
+ sh:description "Persons who died in this country.<br/><br/><em>Note : in DBPedia, persons are linked to the city where they died, and the city is linked to the country.</em>"@en,
302
+ "Les personnes décédées dans ce pays.<br/><br/><em>A noter : dans DBPedia, les personnes sont liées à leur ville de décès, et la ville est reliée au pays.</em>"@fr;
303
+ sh:nodeKind sh:IRI;
304
+ sh:class dbpedia:Person;
305
+ dash:searchWidget core:AutocompleteProperty;
306
+ datasources:datasource datasources:search_rdfslabel_bifcontains;
307
+ core:enableOptional "true"^^xsd:boolean;
308
+ core:enableNegation "true"^^xsd:boolean .
309
+
310
+ _:a3498c4a778c4f829e250049f6184b3d5354 sh:inversePath dbpedia:deathPlace .
311
+
312
+ this:Country_birthPlace sh:path _:a3498c4a778c4f829e250049f6184b3d5355;
313
+ sh:order "1";
314
+ sh:name "birth place of"@en, "lieu de naissance de"@fr;
315
+ sh:description "Persons who were born in this country.<br/><br/><em>Note : in DBPedia, persons are linked to the city in which they were born, and the city is linked to the country.</em>"@en,
316
+ "Les personnes nées dans ce pays.<br/><br/><em>A noter : dans DBPedia, les personnes sont liées à leur ville de naissance, et la ville est reliée au pays.</em>"@fr;
317
+ sh:nodeKind sh:IRI;
318
+ sh:class dbpedia:Person;
319
+ dash:searchWidget core:AutocompleteProperty;
320
+ datasources:datasource datasources:search_rdfslabel_bifcontains;
321
+ core:enableOptional "true"^^xsd:boolean;
322
+ core:enableNegation "true"^^xsd:boolean .
323
+
324
+ _:a3498c4a778c4f829e250049f6184b3d5355 sh:inversePath dbpedia:birthPlace .
325
+
326
+ this:Person_bornIn sh:path _:a3498c4a778c4f829e250049f6184b3d5356;
327
+ sh:order "1";
328
+ sh:name "born in"@en, "né à / né en"@fr;
329
+ sh:description "Persons who were born in this country.<br/><br/><em>Note : in DBPedia, persons are linked to the city in which they were born, and the city is linked to the country.</em>"@en,
330
+ "Les personnes nées dans ce pays.<br/><br/><em>A noter : dans DBPedia, les personnes sont liées à leur ville de naissance, et la ville est reliée au pays.</em>"@fr;
331
+ sh:maxCount "1"^^xsd:integer;
332
+ sh:nodeKind sh:IRI;
333
+ sh:class dbpedia:Country;
334
+ dash:searchWidget core:ListProperty;
335
+ datasources:datasource datasources:list_rdfslabel_alpha;
336
+ core:enableOptional "true"^^xsd:boolean;
337
+ core:enableNegation "true"^^xsd:boolean .
338
+
339
+ _:a3498c4a778c4f829e250049f6184b3d5356 rdf:first dbpedia:birthPlace;
340
+ rdf:rest _:a3498c4a778c4f829e250049f6184b3d5357 .
341
+
342
+ _:a3498c4a778c4f829e250049f6184b3d5357 rdf:first dbpedia:country;
343
+ rdf:rest rdf:nil .
344
+
345
+ this:Person_diedIn sh:path _:a3498c4a778c4f829e250049f6184b3d5358;
346
+ sh:order "2";
347
+ sh:name "died in"@en, "mort à / mort en"@fr;
348
+ sh:description "The country where the person died.<br/><br/><em>Note : in DBPedia, persons are linked to the city where they died, and the city is linked to the country.</em>"@en,
349
+ "Le pays où la personne est décédée.<br/><br/><em>A noter : dans DBPedia, les personnes sont liées à leur ville de décès, et la ville est reliée au pays.</em>"@fr;
350
+ sh:maxCount "1"^^xsd:integer;
351
+ sh:nodeKind sh:IRI;
352
+ sh:class dbpedia:Country;
353
+ dash:searchWidget core:AutocompleteProperty;
354
+ datasources:datasource datasources:list_rdfslabel_alpha_with_count;
355
+ core:enableOptional "true"^^xsd:boolean;
356
+ core:enableNegation "true"^^xsd:boolean .
357
+
358
+ _:a3498c4a778c4f829e250049f6184b3d5358 rdf:first dbpedia:deathPlace;
359
+ rdf:rest _:a3498c4a778c4f829e250049f6184b3d5359 .
360
+
361
+ _:a3498c4a778c4f829e250049f6184b3d5359 rdf:first dbpedia:country;
362
+ rdf:rest rdf:nil .
363
+
364
+ this:Person_label sh:path rdfs:label;
365
+ sh:name "label"@en, "libellé"@fr;
366
+ sh:minCount "1"^^xsd:integer;
367
+ sh:nodeKind sh:Literal;
368
+ sh:datatype rdf:langString;
369
+ sh:node this:Text;
370
+ dash:searchWidget core:SearchProperty;
371
+ dash:propertyRole dash:LabelRole;
372
+ core:enableOptional "false"^^xsd:boolean;
373
+ core:enableNegation "false"^^xsd:boolean .
374
+
375
+ this:Person_birthDate sh:path dbpedia:birthDate;
376
+ sh:order "1";
377
+ sh:name "birth date"@en, "date de naissance"@fr;
378
+ sh:nodeKind sh:Literal;
379
+ sh:node this:Date;
380
+ dash:searchWidget core:TimeProperty-Date;
381
+ core:enableOptional "true"^^xsd:boolean;
382
+ core:enableNegation "true"^^xsd:boolean .
383
+
384
+ this:Person_classifiedIn sh:path dcterms:subject;
385
+ sh:name "category"@en, "catégorie"@fr;
386
+ sh:nodeKind sh:IRI;
387
+ sh:node this:Category;
388
+ dash:searchWidget core:TreeProperty;
389
+ core:enableOptional "true"^^xsd:boolean;
390
+ core:enableNegation "true"^^xsd:boolean;
391
+ datasources:treeRootsDatasource this:tree_root_frenchPainters;
392
+ datasources:treeChildrenDatasource datasources:tree_children_skosnarrower .
393
+
394
+ this:Person_created sh:path _:a3498c4a778c4f829e250049f6184b3d5360;
395
+ sh:name "created"@en, "a créé"@fr;
396
+ sh:nodeKind sh:IRI;
397
+ sh:class dbpedia:Artwork;
398
+ dash:searchWidget core:AutocompleteProperty;
399
+ datasources:datasource datasources:search_rdfslabel_bifcontains;
400
+ core:enableOptional "true"^^xsd:boolean;
401
+ core:enableNegation "true"^^xsd:boolean .
402
+
403
+ _:a3498c4a778c4f829e250049f6184b3d5360 sh:inversePath dbpedia:author .
404
+
405
+ this:Person_deathYear sh:path dbpedia:deathYear;
406
+ sh:order "2";
407
+ sh:name "death year"@en, "année de décès"@fr;
408
+ sh:nodeKind sh:Literal;
409
+ sh:datatype xsd:gYear;
410
+ sh:node this:Date;
411
+ dash:searchWidget core:TimeProperty-Year;
412
+ core:enableOptional "true"^^xsd:boolean;
413
+ core:enableNegation "true"^^xsd:boolean .
414
+
415
+ this:Person_movement sh:path dbpedia:movement;
416
+ sh:name "movement"@en, "mouvement"@fr;
417
+ sh:nodeKind sh:IRI;
418
+ sh:node this:Movement;
419
+ dash:searchWidget core:ListProperty;
420
+ datasources:datasource datasources:list_rdfslabel_count;
421
+ core:enableOptional "true"^^xsd:boolean;
422
+ core:enableNegation "true"^^xsd:boolean .
423
+
424
+ this:Person_thumbnail sh:path dbpedia:thumbnail;
425
+ sh:name "thumbnail"@en, "vignette"@fr;
426
+ sh:nodeKind sh:IRI;
427
+ sh:node this:Image;
428
+ dash:searchWidget core:NonSelectableProperty;
429
+ core:enableOptional "true"^^xsd:boolean;
430
+ core:enableNegation "true"^^xsd:boolean .
431
+
432
+ this:Person_description sh:path rdfs:comment;
433
+ sh:name "description"@en, "description"@fr;
434
+ sh:minCount "1"^^xsd:integer;
435
+ sh:nodeKind sh:Literal;
436
+ sh:datatype rdf:langString;
437
+ sh:node this:Text;
438
+ dash:searchWidget core:SearchProperty;
439
+ core:enableOptional "true"^^xsd:boolean;
440
+ core:enableNegation "true"^^xsd:boolean .
441
+
442
+ this:Movement_movementIncludes sh:path _:a3498c4a778c4f829e250049f6184b3d5361;
443
+ sh:name "participant"@en, "participant"@fr;
444
+ sh:nodeKind sh:IRI;
445
+ sh:class dbpedia:Person;
446
+ dash:searchWidget core:AutocompleteProperty;
447
+ datasources:datasource datasources:search_rdfslabel_bifcontains;
448
+ core:enableOptional "true"^^xsd:boolean;
449
+ core:enableNegation "true"^^xsd:boolean .
450
+
451
+ _:a3498c4a778c4f829e250049f6184b3d5361 sh:inversePath dbpedia:movement .
452
+
453
+ this:Movement_description sh:path rdfs:comment;
454
+ sh:name "description"@en, "description"@fr;
455
+ sh:minCount "1"^^xsd:integer;
456
+ sh:nodeKind sh:Literal;
457
+ sh:datatype rdf:langString;
458
+ sh:node this:Text;
459
+ dash:searchWidget core:SearchProperty;
460
+ core:enableOptional "true"^^xsd:boolean;
461
+ core:enableNegation "true"^^xsd:boolean .
462
+
463
+ this:Movement_label sh:path rdfs:label;
464
+ sh:name "label"@en, "libellé"@fr;
465
+ sh:minCount "1"^^xsd:integer;
466
+ sh:nodeKind sh:Literal;
467
+ sh:datatype rdf:langString;
468
+ sh:node this:Text;
469
+ dash:searchWidget core:AutocompleteProperty;
470
+ dash:propertyRole dash:LabelRole;
471
+ core:enableOptional "false"^^xsd:boolean;
472
+ core:enableNegation "false"^^xsd:boolean .
473
+
474
+ this:MuseumWikidata_situe_a sh:path wdt:P625;
475
+ sh:name "located at"@en, "situé à"@fr;
476
+ sh:nodeKind sh:IRI;
477
+ sh:node this:Position;
478
+ dash:searchWidget core:MapProperty;
479
+ core:enableOptional "true"^^xsd:boolean;
480
+ core:enableNegation "true"^^xsd:boolean;
481
+ core:sparqlService <https://www.wikidata.org> .
482
+
483
+ this:tree_root_frenchPainters a datasources:SparqlTreeRootDatasource;
484
+ datasources:queryString """PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
485
+ SELECT ?uri ?label ?hasChildren
486
+ WHERE {
487
+ VALUES ?uri {<http://fr.dbpedia.org/resource/Catégorie:Peintre_français>}
488
+ ?uri skos:prefLabel ?label .
489
+ FILTER(lang(?label) = '' || lang(?label) = $lang)
490
+ BIND(true AS ?hasChildren)
491
+ }""" .
492
+
493
+ <https://www.wikidata.org> a sparql:Service;
494
+ sparql:endpoint <https://query.wikidata.org/> .
495
+
496
+ this:query_search_label_contains_langfr a datasources:SPARQLQuery;
497
+ datasources:queryString """SELECT DISTINCT ?uri ?label
498
+ WHERE {
499
+ ?domain a $domain .
500
+ ?domain $property ?uri .
501
+ ?uri a $range .
502
+ ?uri $labelPath ?label .
503
+ FILTER(isIRI(?uri))
504
+ FILTER(CONTAINS(LCASE(STR(?label)), LCASE(\"$key\")))
505
+ FILTER(lang(?label) = '' || lang(?label) = \"fr\")
506
+ }
507
+ ORDER BY UCASE(?label)
508
+ LIMIT 50""";
509
+ rdfs:comment "A query that will search in labels using contains function, first in the user language but will default to French."@en .
@@ -1902,6 +1902,7 @@ sh:minCount 1 ;
1902
1902
  ex:CP20_Construction_WorkShape
1903
1903
  a sh:NodeShape ;
1904
1904
  sh:targetClass <http://ontome.net/ns/cpm/CP20_Construction_Work> ;
1905
+ volipi:iconName "fa-solid fa-building" ;
1905
1906
  sh:property [
1906
1907
  sh:name "type" ;
1907
1908
  sh:description "CP20_Construction_Work.type" ;
@@ -1962,6 +1963,7 @@ sh:minCount 1 ;
1962
1963
  .
1963
1964
  ex:E58_Measurement_UnitShape
1964
1965
  a sh:NodeShape ;
1966
+ volipi:iconName "fa-solid fa-ruler" ;
1965
1967
  sh:targetClass <http://www.cidoc-crm.org/cidoc-crm/E58_Measurement_Unit> ;
1966
1968
  sh:property [
1967
1969
  sh:name "type" ;