@igea/oac_backend 1.0.37 → 1.0.38
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
|
@@ -12,6 +12,10 @@ router.get('/schema/:format', (req, res) => {
|
|
|
12
12
|
filePath = 'config.shacl.ttl'; //'schema_v1.shacl.ttl';
|
|
13
13
|
res.setHeader('Content-Type', 'text/turtle');
|
|
14
14
|
break;
|
|
15
|
+
case 'ttl2':
|
|
16
|
+
filePath = 'schema_v2.shacl.ttl';
|
|
17
|
+
res.setHeader('Content-Type', 'text/turtle');
|
|
18
|
+
break;
|
|
15
19
|
case 'jsonld':
|
|
16
20
|
filePath = 'schema_v1.shacl.jsonld';
|
|
17
21
|
res.setHeader('Content-Type', 'application/ld+json');
|
|
@@ -75,4 +79,19 @@ router.get('/schema/:type/:what', (req, res) => {
|
|
|
75
79
|
});
|
|
76
80
|
});
|
|
77
81
|
|
|
82
|
+
router.get('/schema-temp', (req, res) => {
|
|
83
|
+
let filePath = 'schema_v2.shacl.ttl';
|
|
84
|
+
res.setHeader('Content-Type', 'text/turtle');
|
|
85
|
+
res.sendFile(path.join(ONTO_FOLDER, filePath), (err) => {
|
|
86
|
+
if (err) {
|
|
87
|
+
res.status(500).json({
|
|
88
|
+
success: false,
|
|
89
|
+
data: null,
|
|
90
|
+
message: `Error sending file: ${err}`
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
|
|
78
97
|
module.exports = router
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
|
|
7
|
+
ex:E7ActivityShape
|
|
8
|
+
a sh:NodeShape ;
|
|
9
|
+
sh:targetClass crm:E7_Activity ;
|
|
10
|
+
#rdfs:label "Indagine" ;
|
|
11
|
+
#sh:description "Indagine" ;
|
|
12
|
+
#sh:group ex:NameGroup ;
|
|
13
|
+
sh:property [
|
|
14
|
+
sh:path crm:P48_has_preferred_identifier ;
|
|
15
|
+
sh:node ex:E42IdentifierShape ;
|
|
16
|
+
sh:name "ID indagine" ;
|
|
17
|
+
sh:maxCount 1 ;
|
|
18
|
+
sh:minCount 1 ;
|
|
19
|
+
] ;
|
|
20
|
+
sh:property [
|
|
21
|
+
sh:path crm:P2_has_type ;
|
|
22
|
+
sh:node ex:E55Type01Shape ;
|
|
23
|
+
sh:name "Tipo indagine" ;
|
|
24
|
+
sh:maxCount 1 ;
|
|
25
|
+
sh:minCount 1 ;
|
|
26
|
+
] ;
|
|
27
|
+
sh:property [
|
|
28
|
+
sh:path crm:P17_was_motivated_by ;
|
|
29
|
+
sh:node ex:I12AdoptedBeliefShape ;
|
|
30
|
+
sh:name "Quesito diagnostico" ;
|
|
31
|
+
sh:maxCount 1 ;
|
|
32
|
+
sh:minCount 1 ;
|
|
33
|
+
] ;
|
|
34
|
+
sh:property [
|
|
35
|
+
sh:path crm:P14_was_carried_out_by ;
|
|
36
|
+
sh:node ex:E29ActorShape ;
|
|
37
|
+
sh:name "Attori" ;
|
|
38
|
+
#sh:maxCount 1 ;
|
|
39
|
+
] ;
|
|
40
|
+
sh:property [
|
|
41
|
+
sh:path crm:P16_used_specific_object ;
|
|
42
|
+
sh:node ex:S13Sample ;
|
|
43
|
+
sh:name "Campione" ;
|
|
44
|
+
sh:maxCount 1 ;
|
|
45
|
+
] ;
|
|
46
|
+
sh:property [
|
|
47
|
+
sh:path crm:xxx ;
|
|
48
|
+
sh:node ex:E7Activity1 ;
|
|
49
|
+
sh:name "Attività dignostica" ;
|
|
50
|
+
#sh:maxCount 1 ;
|
|
51
|
+
] .
|
|
52
|
+
|
|
53
|
+
ex:E42IdentifierShape
|
|
54
|
+
a sh:NodeShape ;
|
|
55
|
+
sh:targetClass crm:E42_Identifier ;
|
|
56
|
+
sh:property [
|
|
57
|
+
sh:path ex:P48_has_preferred_identifier ;
|
|
58
|
+
sh:datatype xsd:string ;
|
|
59
|
+
sh:name "ID" ;
|
|
60
|
+
sh:defaultValue "$uuid$" ;
|
|
61
|
+
sh:maxCount 1 ;
|
|
62
|
+
sh:minCount 1 ;
|
|
63
|
+
] .
|
|
64
|
+
|
|
65
|
+
ex:E55Type01Shape
|
|
66
|
+
a sh:NodeShape ;
|
|
67
|
+
sh:targetClass crm:E55_Type ;
|
|
68
|
+
sh:property [
|
|
69
|
+
sh:path ex:P2hastype1 ;
|
|
70
|
+
#sh:class ex:E55Type01 ;
|
|
71
|
+
#sh:in ( ex:TipoIndagineA ex:TipoIndagineB ) ;
|
|
72
|
+
sh:in ( "Tipo indagine A" "Tipo indagine B" ) ;
|
|
73
|
+
#owl:imports
|
|
74
|
+
sh:name "Tipo" ;
|
|
75
|
+
sh:maxCount 1 ;
|
|
76
|
+
sh:minCount 1 ;
|
|
77
|
+
] .
|
|
78
|
+
|
|
79
|
+
# Vocabolario E55Type01 (Tipo indagine)
|
|
80
|
+
#ex:TipoIndagineA
|
|
81
|
+
# a crm:E55_Type ;
|
|
82
|
+
# rdfs:label "Tipo indagine A" .
|
|
83
|
+
#ex:TipoIndagineB
|
|
84
|
+
# a crm:E55_Type ;
|
|
85
|
+
# rdfs:label "Tipo indagine B" .
|
|
86
|
+
|
|
87
|
+
ex:I12AdoptedBeliefShape
|
|
88
|
+
a sh:NodeShape ;
|
|
89
|
+
sh:targetClass crm:I12_Adopted_Belief ;
|
|
90
|
+
sh:property [
|
|
91
|
+
sh:path crm:P2_has_type ;
|
|
92
|
+
sh:node ex:E55Type02Shape ;
|
|
93
|
+
sh:name "Tipo quesito diagnostico" ;
|
|
94
|
+
sh:maxCount 1 ;
|
|
95
|
+
sh:minCount 1 ;
|
|
96
|
+
] .
|
|
97
|
+
|
|
98
|
+
ex:E55Type02Shape
|
|
99
|
+
a sh:NodeShape ;
|
|
100
|
+
sh:targetClass crm:E55_Type ;
|
|
101
|
+
sh:property [
|
|
102
|
+
sh:path ex:P2hastype2 ;
|
|
103
|
+
#sh:class ex:E55Type02 ;
|
|
104
|
+
#sh:in ( ex:TipoQuesitoDiagnostico1 ex:TipoQuesitoDiagnostico2 ex:TipoQuesitoDiagnostico3 ) ;
|
|
105
|
+
sh:in ( "Tipo quesito diagnistico 1" "Tipo quesito diagnistico 2" "Tipo quesito diagnistico 3" ) ;
|
|
106
|
+
sh:name "Tipo" ;
|
|
107
|
+
sh:maxCount 1 ;
|
|
108
|
+
sh:minCount 1 ;
|
|
109
|
+
] ;
|
|
110
|
+
sh:property [
|
|
111
|
+
sh:path crm:P3_has_note ;
|
|
112
|
+
sh:datatype xsd:string ;
|
|
113
|
+
sh:name "Altro" ;
|
|
114
|
+
sh:maxCount 1 ;
|
|
115
|
+
] .
|
|
116
|
+
|
|
117
|
+
# Vocabolario E55Type02 (Tipo quesito diagnostico)
|
|
118
|
+
#ex:TipoQuesitoDiagnostico1
|
|
119
|
+
# a crm:E55_Type ;
|
|
120
|
+
# rdfs:label "Tipo quesito diagnistico 1" .
|
|
121
|
+
#ex:TipoQuesitoDiagnostico2
|
|
122
|
+
# a crm:E55_Type ;
|
|
123
|
+
# rdfs:label "Tipo quesito diagnistico 2" .
|
|
124
|
+
#ex:TipoQuesitoDiagnostico3
|
|
125
|
+
# a crm:E55_Type ;
|
|
126
|
+
# rdfs:label "Tipo quesito diagnistico 3" .
|
|
127
|
+
|
|
128
|
+
ex:E29ActorShape
|
|
129
|
+
a sh:NodeShape ;
|
|
130
|
+
sh:targetClass crm:E29_Actor ;
|
|
131
|
+
sh:property [
|
|
132
|
+
sh:path ex:ente_richiedente ;
|
|
133
|
+
sh:datatype xsd:string ;
|
|
134
|
+
sh:name "Ente richiedente" ;
|
|
135
|
+
sh:maxCount 1 ;
|
|
136
|
+
] ;
|
|
137
|
+
sh:property [
|
|
138
|
+
sh:path ex:schedatore ;
|
|
139
|
+
sh:datatype xsd:string ;
|
|
140
|
+
sh:name "Schedatore" ;
|
|
141
|
+
sh:maxCount 1 ;
|
|
142
|
+
sh:minCount 1 ;
|
|
143
|
+
] .
|
|
144
|
+
|
|
145
|
+
#Vocabolario E55Type03a (con unico termine "Ente_richiedente") ???
|
|
146
|
+
#Vocabolario E55Type03b (con unico termine "Ente_schedatore") ???
|
|
147
|
+
#ex:TipoAttore1
|
|
148
|
+
# a crm:E55_Type ;
|
|
149
|
+
# rdfs:label "Ente richiedente" .
|
|
150
|
+
#ex:TipoAttore2
|
|
151
|
+
# a crm:E55_Type ;
|
|
152
|
+
# rdfs:label "Schedatore" .
|
|
153
|
+
|
|
154
|
+
#ex:E55Type03Shape
|
|
155
|
+
# a sh:NodeShape ;
|
|
156
|
+
# sh:targetClass crm:E55_Type ;
|
|
157
|
+
# sh:property [
|
|
158
|
+
# sh:path crm:P1_is_defined_by ;
|
|
159
|
+
# sh:node ex:E41AppellationShape ;
|
|
160
|
+
# sh:name "Attore" ;
|
|
161
|
+
# sh:maxCount 1 ;
|
|
162
|
+
# ] .
|