@igea/oac_backend 1.0.44 → 1.0.46

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.44",
3
+ "version": "1.0.46",
4
4
  "description": "Backend service for the OAC project",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -71,12 +71,15 @@ router.post('/upload/vocabularies', upload.array('files'), (req, res) => {
71
71
 
72
72
  if(xmlFiles.length == 1) {
73
73
  let xmlFile = uploadedFiles[0];
74
+ if(!xmlFile.valid){
75
+ deleteFiles(uploadedFiles)
76
+ return res.status(400).json({ message: 'Uploaded XML file is not valid' });
77
+ }
74
78
  VocabParser.insertQuery(xmlFile.path).then(query => {
75
- console.log("Query to insert vocabularies: ", query);
79
+ //console.log("Query to insert vocabularies: ", query);
76
80
 
77
81
  deleteFiles(uploadedFiles)
78
82
 
79
-
80
83
  axios.post(fusekiUrlUpdate, query, {
81
84
  headers: {
82
85
  'Content-Type': 'application/sparql-update',
@@ -90,6 +93,8 @@ router.post('/upload/vocabularies', upload.array('files'), (req, res) => {
90
93
  });
91
94
  }).catch(error => {
92
95
  let message = (error.response?.status + error.response?.data) || error.message
96
+ console.log(message);
97
+ //fs.writeFileSync('/home/nicole/Scaricati/spqr_error.txt', query);
93
98
  res.status(500).json({
94
99
  message: 'Error from SPARQL end-point: ' + message,
95
100
  files: uploadedFiles,
@@ -108,7 +113,7 @@ router.post('/upload/vocabularies', upload.array('files'), (req, res) => {
108
113
 
109
114
  }else{
110
115
  deleteFiles(uploadedFiles);
111
- let message = 'Multiple XML files is not supported';
116
+ let message = 'Multiple XML files are not supported';
112
117
  if(xmlFiles.length == 0)
113
118
  message = 'No XML files uploaded';
114
119
  return res.status(400).json({ message });
@@ -70,6 +70,24 @@ router.get('/schema/:format', (req, res) => {
70
70
  });
71
71
  });
72
72
 
73
+ router.get('/counter/:name', (req, res) => {
74
+ let name = req.params.name;
75
+ Investigations.getCounter(name).then( (count) => {
76
+ res.json({
77
+ success: true,
78
+ data: count,
79
+ message: `Counter ${name} value retrieved`
80
+ });
81
+ }).catch( (err) => {
82
+ console.log(err);
83
+ res.status(500).json({
84
+ success: false,
85
+ data: null,
86
+ message: `Error retrieving counter ${name}: ${err}`
87
+ });
88
+ });
89
+ });
90
+
73
91
  router.post('/validate', (req, res) => {
74
92
  let turtle = req.body.turtle;
75
93
  let schema = getSchema('ttl2');
@@ -14,6 +14,19 @@ class Investigations {
14
14
  });
15
15
  }
16
16
 
17
+ static getCounter(name){
18
+ return new Promise(async (resolve, reject) => {
19
+ try{
20
+ const sql = `SELECT nextval('${name}') as count`;
21
+ const result = await db.raw(sql);
22
+ const count = result.rows[0].count;
23
+ resolve(count)
24
+ }catch(e){
25
+ reject(e)
26
+ }
27
+ });
28
+ }
29
+
17
30
  static save(item){
18
31
  item.format = item.format || 'turtle'
19
32
  return new Promise(async (resolve, reject) => {
@@ -63,7 +63,7 @@ class Parser{
63
63
  let xsltPath = this.xsltPath[using] || this.xsltPath.default;
64
64
  try{
65
65
  let command = 'xsltproc --stringparam prefix ' + VocabPrefix + ' ';
66
- command += xsltPath + ' ' + xmlPath
66
+ command += xsltPath + ' "' + xmlPath + '"';
67
67
  exec(command, (err, stdout, stderr) => {
68
68
  if (err) {
69
69
  reject(err)
@@ -90,7 +90,7 @@ class Parser{
90
90
  });
91
91
  }
92
92
 
93
- insertQuery(xmlPath){
93
+ insertQuery(xmlPath, className='crm:E55_Type'){
94
94
  return new Promise((resolve, reject) => {
95
95
  this.transform(xmlPath, transformMode.forInsert).then(terms => {
96
96
  let query = `
@@ -98,7 +98,7 @@ class Parser{
98
98
  PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
99
99
 
100
100
  INSERT {
101
- ?term a crm:E55_Type ;
101
+ ?term a ${className} ;
102
102
  rdfs:label ?label ;
103
103
  crm:P127_has_broader_term ?broader .
104
104
  }
@@ -112,6 +112,7 @@ class Parser{
112
112
  }`
113
113
  resolve(query);
114
114
  }).catch(err => {
115
+ console.log(err);
115
116
  reject(err);
116
117
  });
117
118
  })
@@ -52,7 +52,14 @@
52
52
  </xs:element>
53
53
  </xs:sequence>
54
54
 
55
- <xs:attribute name="id" type="xs:string" use="required"/>
55
+ <xs:attribute name="id" use="required">
56
+ <xs:simpleType>
57
+ <xs:restriction base="xs:string">
58
+ <xs:pattern value="[A-Za-z0-9_\-]+"/>
59
+ </xs:restriction>
60
+ </xs:simpleType>
61
+ </xs:attribute>
62
+
56
63
  </xs:complexType>
57
64
 
58
65
  </xs:schema>
@@ -43,7 +43,7 @@
43
43
  </xsl:if>
44
44
  </xsl:variable>
45
45
 
46
- <xsl:variable name="vocab-id" select="normalize-space(@id)"/>
46
+ <xsl:variable name="vocab-id" select="translate(normalize-space(@id), ' ', '_')"/>
47
47
  <xsl:apply-templates select="term">
48
48
  <xsl:with-param name="path" select="concat('http://', $prefix, $vocab-id)"/>
49
49
  <xsl:with-param name="type" select="concat($type, ' ')"/>
@@ -54,7 +54,7 @@
54
54
  <xsl:template match="term">
55
55
  <xsl:param name="path"/>
56
56
  <xsl:param name="type"/>
57
- <xsl:variable name="current-id" select="normalize-space(@id)"/>
57
+ <xsl:variable name="current-id" select="translate(normalize-space(@id), ' ', '_')"/>
58
58
  <xsl:variable name="new-path" select="concat($path, '/', $current-id)"/>
59
59
  <xsl:variable name="new-type" select="concat($type, ' ')"/>
60
60
 
@@ -76,7 +76,7 @@
76
76
  </xsl:when>
77
77
  <xsl:otherwise>
78
78
 
79
- <xsl:variable name="cid" select="normalize-space(@id)"/>
79
+ <xsl:variable name="cid" select="translate(normalize-space(@id), ' ', '_')"/>
80
80
  <xsl:variable name="npath" select="concat($path, '/', $current-id)"/>
81
81
 
82
82
  <xsl:for-each select="name">
@@ -0,0 +1,175 @@
1
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
2
+ @prefix ex: <http://example.org/shapes/> .
3
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
5
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
7
+ @prefix crm: <http://www.cidoc-crm.org/cidoc-crm/> .
8
+ @prefix basecpm: <http://ontome.net/ns/cpm/> .
9
+ #@prefix j.0: <http://www.cidoc-crm.org/extensions/crmsci/> .
10
+ #@prefix crmsci: <http://www.ics.forth.gr/isl/CRMsci> .
11
+ @prefix base: <http://www.ics.forth.gr/isl/CRMinf/> .
12
+ #@prefix skos: <http://www.w3.org/2004/02/skos/core> .
13
+ #@prefix pref: <http://indagine/> .
14
+
15
+
16
+ ex:E7ActivityShape # INDAGINE
17
+ a sh:NodeShape, rdfs:Class ;
18
+ sh:targetClass crm:E7_Activity ;
19
+ sh:property [
20
+ sh:path crm:P48_has_preferred_identifier ;
21
+ sh:node ex:E42Identifier01Shape ;
22
+ sh:name "ID indagine" ;
23
+ sh:maxCount 1 ;
24
+ sh:minCount 1 ;
25
+ ] ;
26
+ sh:property [
27
+ sh:path crm:P17_was_motivated_by ;
28
+ sh:node ex:I12AdoptedBeliefShape ;
29
+ sh:name "Quesito diagnostico" ;
30
+ sh:maxCount 1 ;
31
+ sh:minCount 1 ;
32
+ ] ;
33
+ sh:property [
34
+ sh:path crm:P14_carried_out_by ;
35
+ sh:node ex:E29ActorShape ;
36
+ sh:name "Attori" ;
37
+ sh:maxCount 1 ;
38
+ ] ;
39
+ sh:property [
40
+ sh:path crm:P16_used_specific_object ;
41
+ sh:node ex:S13SampleShape ;
42
+ sh:name "Campione" ;
43
+ sh:maxCount 1 ;
44
+ ] .
45
+
46
+ ex:E29ActorShape # ATTORI
47
+ a sh:NodeShape, rdfs:Class ;
48
+ sh:targetClass crm:E29_Actor ;
49
+ sh:property [
50
+ sh:path crm:P2_has_type ;
51
+ sh:node ex:E55Type03Shape ;
52
+ sh:name "Attori coinvolti" ;
53
+ sh:maxCount 1 ;
54
+ ] .
55
+
56
+ ex:S13SampleShape # CAMPIONE
57
+ a sh:NodeShape, rdfs:Class ;
58
+ sh:targetClass crm:S13_Sample ;
59
+ sh:property [
60
+ sh:path crm:P2_has_type ;
61
+ sh:node ex:E55Type05Shape ;
62
+ sh:name "Tipo campione" ;
63
+ sh:maxCount 1 ;
64
+ sh:minCount 1 ;
65
+ ] ;
66
+ sh:property [
67
+ sh:path basecpm:Pc43i_uses ;
68
+ sh:node ex:CP2ArchitectureWorkShape ;
69
+ sh:name "Bene di riferimento" ;
70
+ sh:maxCount 1 ;
71
+ ] .
72
+
73
+ ex:CP2ArchitectureWorkShape # BENE DI RIFERIMENTO
74
+ a sh:NodeShape, rdfs:Class ;
75
+ sh:targetClass basecpm:CP2_Architecture_Work ;
76
+ sh:property [
77
+ sh:path crm:P1_is_identified_by ;
78
+ sh:node ex:E41Appellation02Shape ;
79
+ sh:name "Denominazione bene" ;
80
+ sh:maxCount 1 ;
81
+ sh:minCount 1 ;
82
+ ] .
83
+
84
+ ex:E42Identifier01Shape #ID INDAGINE
85
+ a sh:NodeShape, rdfs:Class ;
86
+ sh:targetClass crm:E42_Identifier ;
87
+ sh:property [
88
+ sh:path ex:P48haspreferredidentifier01 ;
89
+ #sh:datatype xsd:string ;
90
+ sh:name "ID" ;
91
+ sh:description "http://indagine/$SEQ1$" ;
92
+ sh:nodeKind sh:IRI ;
93
+ sh:maxCount 1 ;
94
+ sh:minCount 1 ;
95
+ ] .
96
+
97
+ ex:I12AdoptedBeliefShape # QUESITO DIAGNOSTICO
98
+ a sh:NodeShape, rdfs:Class ;
99
+ sh:targetClass base:I12_Adopted_Belief ;
100
+ sh:property [
101
+ sh:path crm:P2_has_type ;
102
+ sh:node ex:E55Type02Shape ;
103
+ sh:name "Tipo quesito diagnostico" ;
104
+ sh:maxCount 1 ;
105
+ sh:minCount 1 ;
106
+ ] .
107
+
108
+ ex:E41Appellation01Shape # ENTE E SCHEDATORE
109
+ a sh:NodeShape, rdfs:Class ;
110
+ sh:targetClass crm:E41_Appellation ;
111
+ sh:property [
112
+ sh:path ex:ente_richiedente ;
113
+ sh:datatype xsd:string ;
114
+ sh:name "Ente richiedente" ;
115
+ sh:maxCount 1 ;
116
+ ] ;
117
+ sh:property [
118
+ sh:path ex:schedatore ;
119
+ sh:datatype xsd:string ;
120
+ sh:name "Schedatore" ;
121
+ sh:maxCount 1 ;
122
+ sh:minCount 1 ;
123
+ ] .
124
+
125
+ ex:E41Appellation02Shape # DENOMINAZIONE BENE
126
+ a sh:NodeShape, rdfs:Class ;
127
+ sh:targetClass crm:E41_Appellation ;
128
+ sh:property [
129
+ sh:path ex:P1isidentifiedby ;
130
+ sh:datatype xsd:string ;
131
+ sh:name "Denominazione" ;
132
+ sh:maxCount 1 ;
133
+ sh:minCount 1 ;
134
+ ] .
135
+
136
+ ex:E55Type02Shape # TIPO QUESITO DIAGNOSTICO
137
+ a sh:NodeShape, rdfs:Class ;
138
+ sh:targetClass crm:E55_Type ;
139
+ sh:property [
140
+ sh:path ex:P2hastype02 ;
141
+ sh:class owl:Class ; # vocabolario QUESITO DIAGNOSTICO (8) id="quesito-diagnostico"
142
+ owl:imports <OAC_EXPOSED_PROTOCOL://OAC_EXPOSED_HOST:OAC_EXPOSED_PORT/backend/fuseki/get-vocabolary-terms/quesito-diagnostico> ;
143
+ sh:name "Tipo" ;
144
+ sh:maxCount 1 ;
145
+ sh:minCount 1 ;
146
+ ] ;
147
+ sh:property [
148
+ sh:path crm:P3_has_note ;
149
+ sh:datatype xsd:string ;
150
+ sh:name "Altro" ;
151
+ sh:maxCount 1 ;
152
+ ] .
153
+
154
+ ex:E55Type03Shape # TIPOLOGIA ATTORI COINVOLTI
155
+ a sh:NodeShape, rdfs:Class ;
156
+ sh:targetClass crm:E55_Type ;
157
+ sh:property [
158
+ sh:path crm:P1_is_defined_by ;
159
+ sh:node ex:E41Appellation01Shape ;
160
+ sh:name "Tipologia attori" ;
161
+ #sh:maxCount 1 ;
162
+ ] .
163
+
164
+
165
+ ex:E55Type05Shape # TIPO CAMPIONE
166
+ a sh:NodeShape, rdfs:Class ;
167
+ sh:targetClass crm:E55_Type ;
168
+ sh:property [
169
+ sh:path ex:P2hastype05 ;
170
+ sh:class owl:Class ; # vocabolario TIPO CAMPIONE (21) id="tipo-campione
171
+ owl:imports <OAC_EXPOSED_PROTOCOL://OAC_EXPOSED_HOST:OAC_EXPOSED_PORT/backend/fuseki/get-vocabolary-terms/tipo-campione> ;
172
+ sh:name "Tipo" ;
173
+ sh:maxCount 1 ;
174
+ sh:minCount 1 ;
175
+ ] .
@@ -0,0 +1,136 @@
1
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
2
+ @prefix ex: <http://example.org/shapes/> .
3
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
5
+ @prefix crm: <http://www.cidoc-crm.org/cidoc-crm/> .
6
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
7
+ @prefix dcterms: <http://purl.org/dc/terms/> .
8
+
9
+ ex:E7ActivityShape
10
+ a sh:NodeShape ;
11
+ sh:targetClass crm:E7_Activity ;
12
+ #rdfs:label "Indagine" ;
13
+ #sh:description "Indagine" ;
14
+ #sh:group ex:NameGroup ;
15
+ sh:property [
16
+ sh:path crm:P48_has_preferred_identifier ;
17
+ sh:node ex:E42IdentifierShape ;
18
+ sh:name "ID indagine" ;
19
+ sh:maxCount 1 ;
20
+ sh:minCount 1 ;
21
+ ] ;
22
+ sh:property [
23
+ sh:path crm:P2_has_type ;
24
+ sh:node ex:E55Type01Shape ;
25
+ sh:name "Tipo indagine" ;
26
+ sh:maxCount 1 ;
27
+ sh:minCount 1 ;
28
+ ] ;
29
+ sh:property [
30
+ sh:path crm:P17_was_motivated_by ;
31
+ sh:node ex:I12AdoptedBeliefShape ;
32
+ sh:name "Quesito diagnostico" ;
33
+ sh:maxCount 1 ;
34
+ sh:minCount 1 ;
35
+ ] ;
36
+ sh:property [
37
+ sh:path crm:P14_was_carried_out_by ;
38
+ sh:node ex:E29ActorShape ;
39
+ sh:name "Attori" ;
40
+ #sh:maxCount 1 ;
41
+ ] ;
42
+ sh:property [
43
+ sh:path crm:P16_used_specific_object ;
44
+ sh:node ex:S13Sample ;
45
+ sh:name "Campione" ;
46
+ sh:maxCount 1 ;
47
+ ] ;
48
+ sh:property [
49
+ sh:path crm:xxx ;
50
+ sh:node ex:E7Activity1 ;
51
+ sh:name "Attività dignostica" ;
52
+ #sh:maxCount 1 ;
53
+ ] .
54
+
55
+ ex:E42IdentifierShape
56
+ a sh:NodeShape ;
57
+ sh:targetClass crm:E42_Identifier ;
58
+ sh:property [
59
+ sh:path ex:P48_has_preferred_identifier ;
60
+ sh:datatype xsd:string ;
61
+ sh:name "ID" ;
62
+ sh:nodeKind sh:IRI;
63
+ sh:description "http://diagnostica/indagine/$UUID$" ;
64
+ sh:maxCount 1 ;
65
+ sh:minCount 1 ;
66
+ ] .
67
+
68
+ ex:E55Type01Shape
69
+ a sh:NodeShape ;
70
+ sh:targetClass crm:E55_Type ;
71
+ sh:property [
72
+ sh:class owl:Class ;
73
+ sh:path crm:P127_has_broader_term ;
74
+ owl:imports <OAC_EXPOSED_PROTOCOL://OAC_EXPOSED_HOST:OAC_EXPOSED_PORT/backend/fuseki/get-vocabolary-terms/fase-di-analisi> ;
75
+ sh:name "Tipo" ;
76
+ sh:maxCount 1 ;
77
+ sh:minCount 1 ;
78
+ ] .
79
+
80
+ ex:I12AdoptedBeliefShape
81
+ a sh:NodeShape ;
82
+ sh:targetClass crm:I12_Adopted_Belief ;
83
+ sh:property [
84
+ sh:path crm:P2_has_type ;
85
+ sh:node ex:E55Type02Shape ;
86
+ sh:name "Tipo quesito diagnostico" ;
87
+ sh:maxCount 1 ;
88
+ sh:minCount 1 ;
89
+ ] .
90
+
91
+ ex:E55Type02Shape
92
+ a sh:NodeShape ;
93
+ sh:targetClass crm:E55_Type ;
94
+ sh:property [
95
+ sh:name "Tipo" ;
96
+ sh:maxCount 1 ;
97
+ sh:minCount 1 ;
98
+ #sh:class crm:E55_Type ;
99
+ sh:class owl:Class ;
100
+ sh:path crm:P127_has_broader_term ;
101
+ owl:imports <OAC_EXPOSED_PROTOCOL://OAC_EXPOSED_HOST:OAC_EXPOSED_PORT/backend/fuseki/get-vocabolary-terms/quesito-diagnostico> ;
102
+
103
+ #sh:class owl:Class ;
104
+ #sh:path dcterms:subject ;
105
+ #owl:imports <https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/refs/heads/main/dfgfo.ttl> ;
106
+
107
+ ] ;
108
+ sh:property [
109
+ sh:path crm:P3_has_note ;
110
+ sh:datatype xsd:string ;
111
+ sh:name "Altro" ;
112
+ sh:maxCount 1 ;
113
+ ] .
114
+
115
+ ex:E29ActorShape
116
+ a sh:NodeShape ;
117
+ sh:targetClass crm:E29_Actor ;
118
+ sh:property [
119
+ sh:path ex:ente_richiedente ;
120
+ sh:datatype xsd:string ;
121
+
122
+ #sh:name "Ente richiedente" ;
123
+ #sh:maxCount 1 ;
124
+
125
+ sh:name "ID" ;
126
+ sh:nodeKind sh:IRI;
127
+ sh:description "http://diagnostica/actor/$SEQ3$" ;
128
+
129
+ ] ;
130
+ sh:property [
131
+ sh:path ex:schedatore ;
132
+ sh:datatype xsd:string ;
133
+ sh:name "Schedatore" ;
134
+ sh:maxCount 1 ;
135
+ sh:minCount 1 ;
136
+ ] .
@@ -1,31 +1,28 @@
1
1
  @prefix sh: <http://www.w3.org/ns/shacl#> .
2
2
  @prefix ex: <http://example.org/shapes/> .
3
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3
4
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
5
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
5
- @prefix crm: <http://www.cidoc-crm.org/cidoc-crm/> .
6
6
  @prefix owl: <http://www.w3.org/2002/07/owl#> .
7
- @prefix dcterms: <http://purl.org/dc/terms/> .
7
+ @prefix crm: <http://www.cidoc-crm.org/cidoc-crm/> .
8
+ @prefix basecpm: <http://ontome.net/ns/cpm/> .
9
+ #@prefix j.0: <http://www.cidoc-crm.org/extensions/crmsci/> .
10
+ #@prefix crmsci: <http://www.ics.forth.gr/isl/CRMsci> .
11
+ @prefix base: <http://www.ics.forth.gr/isl/CRMinf/> .
12
+ #@prefix skos: <http://www.w3.org/2004/02/skos/core> .
13
+ #@prefix pref: <http://indagine/> .
14
+
8
15
 
9
- ex:E7ActivityShape
10
- a sh:NodeShape ;
16
+ ex:E7ActivityShape # INDAGINE
17
+ a sh:NodeShape, rdfs:Class ;
11
18
  sh:targetClass crm:E7_Activity ;
12
- #rdfs:label "Indagine" ;
13
- #sh:description "Indagine" ;
14
- #sh:group ex:NameGroup ;
15
19
  sh:property [
16
20
  sh:path crm:P48_has_preferred_identifier ;
17
- sh:node ex:E42IdentifierShape ;
21
+ sh:node ex:E42Identifier01Shape ;
18
22
  sh:name "ID indagine" ;
19
23
  sh:maxCount 1 ;
20
24
  sh:minCount 1 ;
21
25
  ] ;
22
- sh:property [
23
- sh:path crm:P2_has_type ;
24
- sh:node ex:E55Type01Shape ;
25
- sh:name "Tipo indagine" ;
26
- sh:maxCount 1 ;
27
- sh:minCount 1 ;
28
- ] ;
29
26
  sh:property [
30
27
  sh:path crm:P17_was_motivated_by ;
31
28
  sh:node ex:I12AdoptedBeliefShape ;
@@ -34,76 +31,118 @@ ex:E7ActivityShape
34
31
  sh:minCount 1 ;
35
32
  ] ;
36
33
  sh:property [
37
- sh:path crm:P14_was_carried_out_by ;
34
+ sh:path crm:P14_carried_out_by ;
38
35
  sh:node ex:E29ActorShape ;
39
36
  sh:name "Attori" ;
40
- #sh:maxCount 1 ;
37
+ sh:maxCount 1 ;
41
38
  ] ;
42
39
  sh:property [
43
40
  sh:path crm:P16_used_specific_object ;
44
- sh:node ex:S13Sample ;
41
+ sh:node ex:S13SampleShape ;
45
42
  sh:name "Campione" ;
46
43
  sh:maxCount 1 ;
44
+ ] .
45
+
46
+ ex:E29ActorShape # ATTORI
47
+ a sh:NodeShape, rdfs:Class ;
48
+ sh:targetClass crm:E29_Actor ;
49
+ sh:property [
50
+ sh:path crm:P2_has_type ;
51
+ sh:node ex:E55Type03Shape ;
52
+ sh:name "Attori coinvolti" ;
53
+ sh:maxCount 1 ;
54
+ ] .
55
+
56
+ ex:S13SampleShape # CAMPIONE
57
+ a sh:NodeShape, rdfs:Class ;
58
+ sh:targetClass crm:S13_Sample ;
59
+ sh:property [
60
+ sh:path crm:P2_has_type ;
61
+ sh:node ex:E55Type05Shape ;
62
+ sh:name "Tipo campione" ;
63
+ sh:maxCount 1 ;
64
+ sh:minCount 1 ;
47
65
  ] ;
48
66
  sh:property [
49
- sh:path crm:xxx ;
50
- sh:node ex:E7Activity1 ;
51
- sh:name "Attività dignostica" ;
52
- #sh:maxCount 1 ;
67
+ sh:path basecpm:Pc43i_uses ;
68
+ sh:node ex:CP2ArchitectureWorkShape ;
69
+ sh:name "Bene di riferimento" ;
70
+ sh:maxCount 1 ;
53
71
  ] .
54
-
55
- ex:E42IdentifierShape
56
- a sh:NodeShape ;
72
+
73
+ ex:CP2ArchitectureWorkShape # BENE DI RIFERIMENTO
74
+ a sh:NodeShape, rdfs:Class ;
75
+ sh:targetClass basecpm:CP2_Architecture_Work ;
76
+ sh:property [
77
+ sh:path crm:P1_is_identified_by ;
78
+ sh:node ex:E41Appellation02Shape ;
79
+ sh:name "Denominazione bene" ;
80
+ sh:maxCount 1 ;
81
+ sh:minCount 1 ;
82
+ ] .
83
+
84
+ ex:E42Identifier01Shape #ID INDAGINE
85
+ a sh:NodeShape, rdfs:Class ;
57
86
  sh:targetClass crm:E42_Identifier ;
58
87
  sh:property [
59
- sh:path ex:P48_has_preferred_identifier ;
60
- sh:datatype xsd:string ;
88
+ sh:path ex:P48haspreferredidentifier01 ;
89
+ #sh:datatype xsd:string ;
61
90
  sh:name "ID" ;
62
- sh:nodeKind sh:IRI;
63
- sh:description "http://diagnostica/indagine/$UUID$" ;
64
- sh:maxCount 1 ;
91
+ sh:description "http://indagine/$SEQ1$" ;
92
+ sh:nodeKind sh:IRI ;
93
+ sh:maxCount 1 ;
65
94
  sh:minCount 1 ;
66
95
  ] .
67
96
 
68
- ex:E55Type01Shape
69
- a sh:NodeShape ;
70
- sh:targetClass crm:E55_Type ;
97
+ ex:I12AdoptedBeliefShape # QUESITO DIAGNOSTICO
98
+ a sh:NodeShape, rdfs:Class ;
99
+ sh:targetClass base:I12_Adopted_Belief ;
71
100
  sh:property [
72
- sh:class owl:Class ;
73
- sh:path crm:P127_has_broader_term ;
74
- owl:imports <OAC_EXPOSED_PROTOCOL://OAC_EXPOSED_HOST:OAC_EXPOSED_PORT/backend/fuseki/get-vocabolary-terms/fase-di-analisi> ;
75
- sh:name "Tipo" ;
101
+ sh:path crm:P2_has_type ;
102
+ sh:node ex:E55Type02Shape ;
103
+ sh:name "Tipo quesito diagnostico" ;
76
104
  sh:maxCount 1 ;
77
105
  sh:minCount 1 ;
78
106
  ] .
79
107
 
80
- ex:I12AdoptedBeliefShape
81
- a sh:NodeShape ;
82
- sh:targetClass crm:I12_Adopted_Belief ;
108
+ ex:E41Appellation01Shape # ENTE E SCHEDATORE
109
+ a sh:NodeShape, rdfs:Class ;
110
+ sh:targetClass crm:E41_Appellation ;
83
111
  sh:property [
84
- sh:path crm:P2_has_type ;
85
- sh:node ex:E55Type02Shape ;
86
- sh:name "Tipo quesito diagnostico" ;
87
- sh:maxCount 1 ;
112
+ sh:path ex:ente_richiedente ;
113
+ sh:datatype xsd:string ;
114
+ sh:name "Ente richiedente" ;
115
+ sh:maxCount 1 ;
116
+ ] ;
117
+ sh:property [
118
+ sh:path ex:schedatore ;
119
+ sh:datatype xsd:string ;
120
+ sh:name "Schedatore" ;
121
+ sh:maxCount 1 ;
88
122
  sh:minCount 1 ;
89
123
  ] .
90
124
 
91
- ex:E55Type02Shape
92
- a sh:NodeShape ;
125
+ ex:E41Appellation02Shape # DENOMINAZIONE BENE
126
+ a sh:NodeShape, rdfs:Class ;
127
+ sh:targetClass crm:E41_Appellation ;
128
+ sh:property [
129
+ sh:path ex:P1isidentifiedby ;
130
+ sh:datatype xsd:string ;
131
+ sh:name "Denominazione" ;
132
+ sh:maxCount 1 ;
133
+ sh:minCount 1 ;
134
+ ] .
135
+
136
+ ex:E55Type02Shape # TIPO QUESITO DIAGNOSTICO
137
+ a sh:NodeShape, rdfs:Class ;
93
138
  sh:targetClass crm:E55_Type ;
94
139
  sh:property [
140
+ sh:path ex:P2hastype02 ;
141
+ sh:class owl:Class ; # vocabolario QUESITO DIAGNOSTICO (8) id="quesito-diagnostico"
142
+ owl:imports <OAC_EXPOSED_PROTOCOL://OAC_EXPOSED_HOST:OAC_EXPOSED_PORT/backend/fuseki/get-vocabolary-terms/quesito-diagnostico> ;
95
143
  sh:name "Tipo" ;
96
144
  sh:maxCount 1 ;
97
145
  sh:minCount 1 ;
98
- #sh:class crm:E55_Type ;
99
- sh:class owl:Class ;
100
- sh:path crm:P127_has_broader_term ;
101
- owl:imports <OAC_EXPOSED_PROTOCOL://OAC_EXPOSED_HOST:OAC_EXPOSED_PORT/backend/fuseki/get-vocabolary-terms/quesito-diagnostico> ;
102
-
103
- #sh:class owl:Class ;
104
- #sh:path dcterms:subject ;
105
- #owl:imports <https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/refs/heads/main/dfgfo.ttl> ;
106
-
107
146
  ] ;
108
147
  sh:property [
109
148
  sh:path crm:P3_has_note ;
@@ -112,25 +151,25 @@ ex:E55Type02Shape
112
151
  sh:maxCount 1 ;
113
152
  ] .
114
153
 
115
- ex:E29ActorShape
116
- a sh:NodeShape ;
117
- sh:targetClass crm:E29_Actor ;
154
+ ex:E55Type03Shape # TIPOLOGIA ATTORI COINVOLTI
155
+ a sh:NodeShape, rdfs:Class ;
156
+ sh:targetClass crm:E55_Type ;
118
157
  sh:property [
119
- sh:path ex:ente_richiedente ;
120
- sh:datatype xsd:string ;
121
-
122
- #sh:name "Ente richiedente" ;
158
+ sh:path crm:P1_is_defined_by ;
159
+ sh:node ex:E41Appellation01Shape ;
160
+ sh:name "Tipologia attori" ;
123
161
  #sh:maxCount 1 ;
162
+ ] .
124
163
 
125
- sh:name "ID" ;
126
- sh:nodeKind sh:IRI;
127
- sh:description "http://diagnostica/actor/$UUID$" ;
128
164
 
129
- ] ;
165
+ ex:E55Type05Shape # TIPO CAMPIONE
166
+ a sh:NodeShape, rdfs:Class ;
167
+ sh:targetClass crm:E55_Type ;
130
168
  sh:property [
131
- sh:path ex:schedatore ;
132
- sh:datatype xsd:string ;
133
- sh:name "Schedatore" ;
134
- sh:maxCount 1 ;
169
+ sh:path ex:P2hastype05 ;
170
+ sh:class owl:Class ; # vocabolario TIPO CAMPIONE (21) id="tipo-campione
171
+ owl:imports <OAC_EXPOSED_PROTOCOL://OAC_EXPOSED_HOST:OAC_EXPOSED_PORT/backend/fuseki/get-vocabolary-terms/tipo-campione> ;
172
+ sh:name "Tipo" ;
173
+ sh:maxCount 1 ;
135
174
  sh:minCount 1 ;
136
175
  ] .
@@ -401,7 +401,7 @@
401
401
  <term id="competenza">
402
402
  <name lang="it">Competenza</name>
403
403
  <sub-terms>
404
- <term id="antropologia ">
404
+ <term id="antropologia">
405
405
  <name lang="it">Antropologia </name>
406
406
  <sub-terms>
407
407
  <term id="culturale">