Skip to content

Commit

Permalink
update schema/validator
Browse files Browse the repository at this point in the history
  • Loading branch information
satra committed Jul 11, 2020
1 parent c4147b3 commit f3d6ed2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions reproschema/tests/contexts/generic
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
"@id": "schema:readonlyValue",
"@nest": "ui"
},
"scoringLogic": {
"@id": "reproschema:scoringLogic",
"compute": {
"@id": "reproschema:compute",
"@container": "@index"
},
"jsExpression": {
Expand Down
6 changes: 6 additions & 0 deletions reproschema/tests/data/activities/activity1.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"en": "Over the last 2 weeks, how often have you been bothered by any of the following problems?",
"es": "Durante las últimas 2 semanas, ¿con qué frecuencia le han molestado los siguintes problemas?"
},
"compute": [
{
"variableName": "phq9_total_score",
"jsExpression": "phq9_1 + phq9_2 + phq9_3 + phq9_4 + phq9_5 + phq9_6 + phq9_7 + phq9_8 + phq9_9"
}
],
"ui": {
"addProperties": [
{ "isAbout": "items/item1.jsonld",
Expand Down
10 changes: 5 additions & 5 deletions reproschema/tests/reproschema-shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ reproschema:ActivityShape a sh:NodeShape ;
[ sh:datatype rdf:langString ;
sh:path reproschema:preamble ],

[ sh:node reproschema:ScoringShape ;
sh:path reproschema:scoringLogic ],
[ sh:node reproschema:ComputeSpecificationShape ;
sh:path reproschema:compute ],

[ sh:maxCount 1 ;
sh:node dash:ListShape ;
Expand Down Expand Up @@ -126,8 +126,8 @@ reproschema:ProtocolShape a sh:NodeShape ;
[ sh:datatype rdf:langString ;
sh:path reproschema:preamble ],

[ sh:node reproschema:ScoringShape ;
sh:path reproschema:scoringLogic ],
[ sh:node reproschema:ComputeSpecificationShape ;
sh:path reproschema:compute ],

[ sh:minCount 1 ;
sh:node dash:ListShape ;
Expand Down Expand Up @@ -229,7 +229,7 @@ reproschema:IsVisShape a sh:NodeShape ;
sh:minCount 1 ;
sh:path reproschema:payload ] .

reproschema:ScoringShape a sh:NodeShape ;
reproschema:ComputeSpecificationShape a sh:NodeShape ;
sh:closed true ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:datatype rdf:langString ;
Expand Down

0 comments on commit f3d6ed2

Please sign in to comment.