Skip to content

Commit 137139f

Browse files
authored
Merge pull request #4 from satra/enh-update
update to latest shape
2 parents 44cf2e2 + 61090a6 commit 137139f

File tree

2 files changed

+93
-85
lines changed

2 files changed

+93
-85
lines changed

reproschema/tests/contexts/generic

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
"@container": "@language"
1313
},
1414
"value": {
15-
"@id": "schema:value",
15+
"@id": "reproschema:value",
16+
"@type": "@id",
1617
"@container": "@language"
1718
},
1819
"image": {
1920
"@id": "schema:image",
20-
"@type": "@vocab"
21+
"@type": "@id"
2122
},
2223
"citation": {
2324
"@id": "schema:citation",
@@ -45,7 +46,8 @@
4546
},
4647
"valueType": {
4748
"@id": "reproschema:valueType",
48-
"@type": "@vocab"
49+
"@type": "@id",
50+
"@container": "@set"
4951
},
5052
"landingPage": {
5153
"@id": "reproschema:landingPage",
@@ -56,16 +58,17 @@
5658
"@container": "@language"
5759
},
5860
"choices": {
59-
"@id": "schema:itemListElement"
61+
"@id": "reproschema:choices"
6062
},
61-
"valueRequired": "https://schema.org/valueRequired",
63+
"valueRequired": "schema:valueRequired",
6264
"multipleChoice": {
6365
"@id": "reproschema:multipleChoice",
6466
"@type": "schema:Boolean"
6567
},
6668
"responseOptions": {
6769
"@id": "reproschema:responseOptions",
68-
"@type": "@vocab"
70+
"@container": "@set",
71+
"@type": "@id"
6972
},
7073
"dataType": {
7174
"@id": "schema:DataType",
@@ -77,6 +80,10 @@
7780
"maxValue": {
7881
"@id": "schema:maxValue"
7982
},
83+
"unitCode": {
84+
"@id": "schema:unitCode",
85+
"@container": "@set"
86+
},
8087
"ui" : "@nest",
8188
"order": {
8289
"@id": "reproschema:order",
@@ -106,7 +113,7 @@
106113
"@nest": "ui"
107114
},
108115
"readonlyValue": {
109-
"@id": "https://schema.org/readonlyValue",
116+
"@id": "schema:readonlyValue",
110117
"@nest": "ui"
111118
},
112119
"scoringLogic": {

reproschema/tests/reproschema-shacl.ttl

Lines changed: 79 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,47 @@ reproschema:ActivityShape a sh:NodeShape ;
1111
sh:ignoredProperties ( rdf:type ) ;
1212
sh:property [ sh:datatype rdf:langString ;
1313
sh:path schema:description ],
14+
1415
[ sh:datatype rdf:langString ;
1516
sh:path schema:schemaVersion ],
17+
1618
[ sh:datatype rdf:langString ;
1719
sh:path schema:version ],
20+
1821
[ sh:datatype rdf:langString ;
1922
sh:path schema:citation ],
23+
24+
[ sh:nodeKind sh:IRI ;
25+
sh:path schema:image ],
26+
2027
[ sh:datatype rdf:langString ;
2128
sh:minCount 1 ;
2229
sh:path skos:prefLabel ],
30+
2331
[ sh:datatype rdf:langString ;
2432
sh:path reproschema:preamble ],
33+
2534
[ sh:node reproschema:ScoringShape ;
2635
sh:path reproschema:scoringLogic ],
36+
2737
[ sh:maxCount 1 ;
2838
sh:node dash:ListShape ;
2939
sh:path reproschema:order ;
3040
sh:property [ sh:minCount 1 ;
3141
sh:nodeKind sh:IRI ;
3242
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ],
43+
3344
[ sh:node reproschema:AddPropertiesShape ;
3445
sh:path reproschema:addProperties ],
46+
3547
[ sh:datatype xsd:string ;
3648
sh:path reproschema:inputType ],
49+
3750
[ sh:datatype schema:Boolean ;
3851
sh:path reproschema:shuffle ],
52+
3953
[ sh:nodeKind sh:IRI ;
54+
sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ;
4055
sh:path reproschema:allow ] ;
4156
sh:targetClass reproschema:Activity .
4257

@@ -46,191 +61,177 @@ reproschema:FieldShape a sh:NodeShape ;
4661
sh:property [ sh:datatype rdf:langString ;
4762
sh:minCount 1 ;
4863
sh:path skos:prefLabel ],
64+
4965
[ sh:datatype rdf:langString ;
50-
sh:maxCount 1 ;
5166
sh:path skos:altLabel ],
67+
5268
[ sh:datatype rdf:langString ;
53-
sh:maxCount 1 ;
5469
sh:path schema:description ],
70+
5571
[ sh:datatype rdf:langString ;
56-
sh:maxCount 1 ;
5772
sh:path schema:schemaVersion ],
73+
5874
[ sh:datatype rdf:langString ;
59-
sh:maxCount 1 ;
6075
sh:path schema:version ],
76+
6177
[ sh:datatype rdf:langString ;
6278
sh:path schema:question ],
63-
[ sh:datatype rdf:langString ;
79+
80+
[ sh:nodeKind sh:IRI ;
6481
sh:maxCount 1 ;
82+
sh:path schema:image ],
83+
84+
[ sh:datatype rdf:langString ;
6585
sh:path reproschema:preamble ],
86+
6687
[ sh:datatype xsd:string ;
6788
sh:maxCount 1 ;
6889
sh:minCount 1 ;
6990
sh:path reproschema:inputType ],
91+
7092
[ sh:datatype xsd:boolean ;
7193
sh:maxCount 1 ;
72-
sh:path reproschema:readOnly ],
73-
[ sh:node reproschema:ResponseOptionsShape ;
94+
sh:path schema:readonlyValue ],
95+
96+
[ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:ResponseOptionsShape ] ) ;
7497
sh:path reproschema:responseOptions ] ;
7598
sh:targetClass reproschema:Field .
7699

77100
reproschema:ProtocolShape a sh:NodeShape ;
78101
sh:closed true ;
79102
sh:ignoredProperties ( rdf:type ) ;
80103
sh:property [ sh:datatype rdf:langString ;
81-
sh:maxCount 1 ;
82104
sh:path schema:description ],
105+
83106
[ sh:datatype rdf:langString ;
84-
sh:maxCount 1 ;
85107
sh:path schema:schemaVersion ],
108+
86109
[ sh:datatype rdf:langString ;
87-
sh:maxCount 1 ;
88110
sh:path schema:version ],
89-
[ sh:datatype rdf:langString ;
111+
112+
[ sh:nodeKind sh:IRI ;
90113
sh:maxCount 1 ;
91114
sh:path schema:image ],
92-
[ sh:datatype rdf:langString ;
93-
sh:maxCount 1 ;
115+
116+
[ sh:nodeKind sh:IRI ;
94117
sh:path reproschema:landingPage ],
118+
95119
[ sh:datatype rdf:langString ;
96120
sh:minCount 1 ;
97121
sh:path skos:prefLabel ],
122+
98123
[ sh:datatype rdf:langString ;
99-
sh:maxCount 1 ;
100124
sh:path reproschema:preamble ],
101-
[ sh:maxCount 1 ;
102-
sh:node reproschema:ScoringShape ;
125+
126+
[ sh:node reproschema:ScoringShape ;
103127
sh:path reproschema:scoringLogic ],
128+
104129
[ sh:minCount 1 ;
105130
sh:node dash:ListShape ;
106131
sh:path reproschema:order ;
107132
sh:property [ sh:minCount 1 ;
108133
sh:nodeKind sh:IRI ;
109134
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ],
135+
110136
[ sh:node reproschema:AddPropertiesShape ;
111137
sh:path reproschema:addProperties ],
138+
112139
[ sh:datatype schema:Boolean ;
113140
sh:path reproschema:shuffle ],
141+
114142
[ sh:nodeKind sh:IRI ;
143+
sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ;
115144
sh:path reproschema:allow ] ;
116145
sh:targetClass reproschema:Protocol .
117146

118147
reproschema:ResponseOptionsShape a sh:NodeShape ;
119148
sh:closed true ;
120-
sh:ignoredProperties ( rdf:type ),
121-
( rdf:type ) ;
149+
sh:ignoredProperties ( rdf:type ) ;
122150
sh:property [ sh:datatype schema:Boolean ;
151+
sh:maxCount 1 ;
123152
sh:path reproschema:multipleChoice ],
124-
[ sh:datatype xsd:integer ;
125-
sh:path schema:minValue ],
126-
[ sh:datatype xsd:integer ;
127-
sh:path schema:maxValue ],
153+
128154
[ sh:nodeKind sh:IRI ;
129155
sh:path reproschema:valueType ],
130-
[ sh:node reproschema:ChoicesShape ;
131-
sh:path schema:itemListElement ],
132-
[ sh:minCount 1 ;
133-
sh:nodeKind sh:IRI ;
134-
sh:path reproschema:valueType ],
156+
135157
[ sh:datatype xsd:integer ;
136158
sh:maxCount 1 ;
137159
sh:path schema:minValue ],
160+
138161
[ sh:datatype xsd:integer ;
139162
sh:maxCount 1 ;
140163
sh:path schema:maxValue ],
141-
[ sh:datatype schema:Boolean ;
142-
sh:maxCount 1 ;
143-
sh:path reproschema:multipleChoice ],
164+
144165
[ sh:datatype xsd:string ;
145166
sh:maxCount 1 ;
146167
sh:path reproschema:datumType ],
147-
[ sh:maxCount 1 ;
148-
sh:or ( [ sh:datatype schema:URL ] [ sh:datatype rdf:langString ] ) ;
168+
169+
[ sh:or ( [ sh:datatype schema:URL ] [ sh:datatype rdf:langString ] ) ;
149170
sh:path schema:unitCode ],
171+
150172
[ sh:node reproschema:ChoicesShape ;
151-
sh:path schema:itemListElement ] ;
173+
sh:path reproschema:choices ] ;
152174
sh:targetClass reproschema:ResponseOptions .
153175

154176
reproschema:AddPropertiesShape a sh:NodeShape ;
155177
sh:closed true ;
156-
sh:ignoredProperties ( rdf:type ),
157-
( rdf:type ) ;
178+
sh:ignoredProperties ( rdf:type ) ;
158179
sh:property [ sh:datatype rdf:langString ;
159180
sh:minCount 1 ;
160181
sh:path reproschema:variableName ],
182+
161183
[ sh:minCount 1 ;
162184
sh:nodeKind sh:IRI ;
163185
sh:path reproschema:isAbout ],
186+
164187
[ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ] ) ;
165188
sh:path reproschema:isVis ],
189+
166190
[ sh:datatype rdf:langString ;
167191
sh:path skos:prefLabel ],
168-
[ sh:datatype rdf:langString ;
169-
sh:minCount 1 ;
170-
sh:path reproschema:variableName ],
171-
[ sh:minCount 1 ;
172-
sh:nodeKind sh:IRI ;
173-
sh:path reproschema:isAbout ],
174-
[ sh:datatype schema:Boolean ;
175-
sh:path reproschema:requiredValue ],
176-
[ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ] ) ;
177-
sh:path reproschema:isVis ],
178-
[ sh:datatype rdf:langString ;
179-
sh:path skos:prefLabel ] .
192+
193+
[ sh:datatype xsd:boolean ;
194+
sh:path schema:valueRequired ] .
180195

181196
reproschema:ChoicesShape a sh:NodeShape ;
182197
sh:closed true ;
183-
sh:ignoredProperties ( rdf:type ),
184-
( rdf:type ) ;
185-
sh:property [ sh:datatype xsd:string ;
198+
sh:ignoredProperties ( rdf:type ) ;
199+
sh:property [ sh:nodeKind sh:IRI ;
186200
sh:path schema:image ],
201+
187202
[ sh:nodeKind sh:IRI ;
188-
sh:path reproschema:dontKnow ],
203+
sh:path reproschema:DontKnow ],
204+
189205
[ sh:nodeKind sh:IRI ;
190-
sh:path reproschema:skipped ],
191-
[ sh:datatype rdf:langString ;
192-
sh:path schema:name ],
193-
[ sh:datatype xsd:integer ;
194-
sh:path schema:value ],
206+
sh:path reproschema:Skipped ],
207+
195208
[ sh:datatype rdf:langString ;
196209
sh:path schema:name ],
197-
[ sh:datatype xsd:integer ;
198-
sh:path schema:value ],
199-
[ sh:datatype xsd:string ;
200-
sh:path schema:image ],
201-
[ sh:nodeKind sh:IRI ;
202-
sh:path reproschema:dontKnow ],
203-
[ sh:nodeKind sh:IRI ;
204-
sh:path reproschema:skipped ] .
210+
211+
[ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] ) ;
212+
sh:path reproschema:value ] .
205213

206214
reproschema:IsVisShape a sh:NodeShape ;
207215
sh:closed true ;
208-
sh:ignoredProperties ( rdf:type ),
209-
( rdf:type ) ;
216+
sh:ignoredProperties ( rdf:type ) ;
210217
sh:property [ sh:datatype rdf:langString ;
218+
sh:minCount 1 ;
211219
sh:path schema:method ],
220+
212221
[ sh:datatype rdf:langString ;
222+
sh:minCount 1 ;
213223
sh:path schema:url ],
224+
214225
[ sh:datatype rdf:langString ;
215-
sh:path reproschema:payload ],
216-
[ sh:datatype rdf:langString ;
217-
sh:path schema:method ],
218-
[ sh:datatype rdf:langString ;
219-
sh:path schema:url ],
220-
[ sh:datatype rdf:langString ;
226+
sh:minCount 1 ;
221227
sh:path reproschema:payload ] .
222228

223229
reproschema:ScoringShape a sh:NodeShape ;
224230
sh:closed true ;
231+
sh:ignoredProperties ( rdf:type ) ;
225232
sh:property [ sh:datatype rdf:langString ;
226-
sh:path reproschema:variableName ],
227-
[ sh:datatype rdf:langString ;
228-
sh:path reproschema:jsExpression ],
229-
[ sh:datatype rdf:langString ;
230-
sh:maxCount 1 ;
231233
sh:minCount 1 ;
232234
sh:path reproschema:variableName ],
233235
[ sh:datatype rdf:langString ;
234-
sh:maxCount 1 ;
235236
sh:minCount 1 ;
236237
sh:path reproschema:jsExpression ] .

0 commit comments

Comments
 (0)