Skip to content

Commit c4147b3

Browse files
committed
enh: update schema, shape, example
1 parent 137139f commit c4147b3

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

reproschema/tests/contexts/generic

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,18 @@
154154
"@type": "@id",
155155
"@nest": "ui"
156156
},
157+
"additionalNotesObj": {
158+
"@id": "reproschema:additionalNotesObj",
159+
"@container": "@set"
160+
},
161+
"source": {
162+
"@id": "reproschema:source",
163+
"@type": "xsd:string"
164+
},
165+
"column": {
166+
"@id": "reproschema:column",
167+
"@type": "xsd:string"
168+
},
157169
"importedFrom": {
158170
"@id": "pav:importedFrom",
159171
"@type": "@id"

reproschema/tests/data/activities/items/item1.jsonld

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@
4848
"value": 3
4949
}
5050
]
51-
}
51+
},
52+
"additionalNotesObj": [
53+
{
54+
"source": "redcap",
55+
"column": "notes",
56+
"value": "some extra note"
57+
}
58+
]
5259

5360
}

reproschema/tests/reproschema-shacl.ttl

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ reproschema:FieldShape a sh:NodeShape ;
9393
sh:maxCount 1 ;
9494
sh:path schema:readonlyValue ],
9595

96+
[ sh:node reproschema:AdditionalNoteObj ;
97+
sh:path reproschema:additionalNotesObj ],
98+
9699
[ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:ResponseOptionsShape ] ) ;
97100
sh:path reproschema:responseOptions ] ;
98101
sh:targetClass reproschema:Field .
@@ -208,7 +211,7 @@ reproschema:ChoicesShape a sh:NodeShape ;
208211
[ sh:datatype rdf:langString ;
209212
sh:path schema:name ],
210213

211-
[ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] ) ;
214+
[ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype schema:Text ]) ;
212215
sh:path reproschema:value ] .
213216

214217
reproschema:IsVisShape a sh:NodeShape ;
@@ -235,3 +238,17 @@ reproschema:ScoringShape a sh:NodeShape ;
235238
[ sh:datatype rdf:langString ;
236239
sh:minCount 1 ;
237240
sh:path reproschema:jsExpression ] .
241+
242+
reproschema:AdditionalNoteObjShape a sh:NodeShape ;
243+
sh:closed true ;
244+
sh:ignoredProperties ( rdf:type ) ;
245+
sh:property [ sh:datatype rdf:langString ;
246+
sh:minCount 1 ;
247+
sh:path reproschema:source ],
248+
249+
[ sh:datatype rdf:langString ;
250+
sh:minCount 1 ;
251+
sh:path reproschema:column ],
252+
253+
[ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype schema:Text ]) ;
254+
sh:path reproschema:value ] .

0 commit comments

Comments
 (0)