Skip to content

Commit

Permalink
updated schema
Browse files Browse the repository at this point in the history
  • Loading branch information
satra committed Jul 24, 2020
1 parent 0893ae8 commit e224cc7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
12 changes: 12 additions & 0 deletions reproschema/tests/contexts/generic
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@
"@id": "reproschema:column",
"@type": "xsd:string"
},
"randomMaxDelay": {
"@id": "reproschema:randomMaxDelay"
},
"schedule": {
"@id": "reproschema:schedule"
},
"limit": {
"@id": "reproschema:limit"
},
"maxRetakes": {
"@id": "reproschema:maxRetakes"
},
"importedFrom": {
"@id": "pav:importedFrom",
"@type": "@id"
Expand Down
6 changes: 5 additions & 1 deletion reproschema/tests/data/activities/activity1.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
{ "isAbout": "items/item1.jsonld",
"variableName": "item1",
"requiredValue": true,
"isVis": true}
"isVis": true,
"randomMaxDelay": "2:0:0",
"limit": "2-0",
"schedule": "0 8 * * *"
}
],
"order": [
"items/item1.jsonld"
Expand Down
34 changes: 28 additions & 6 deletions reproschema/tests/reproschema-shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ reproschema:ActivityShape a sh:NodeShape ;

[ sh:nodeKind sh:IRI ;
sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ;
sh:path reproschema:allow ] ;
sh:path reproschema:allow ],

[ sh:node reproschema:CronTableShape ;
sh:path reproschema:cronTable ] ;
sh:targetClass reproschema:Activity .

reproschema:FieldShape a sh:NodeShape ;
Expand All @@ -62,6 +65,9 @@ reproschema:FieldShape a sh:NodeShape ;
sh:minCount 1 ;
sh:path skos:prefLabel ],

[ sh:datatype rdf:langString ;
sh:path skos:altLabel ],

[ sh:datatype rdf:langString ;
sh:path schema:description ],

Expand Down Expand Up @@ -93,7 +99,7 @@ reproschema:FieldShape a sh:NodeShape ;
[ sh:node reproschema:AdditionalNoteObj ;
sh:path reproschema:additionalNotesObj ],

[ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:ResponseOptionShape ] ) ;
[ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:ResponseOptionsShape ] ) ;
sh:path reproschema:responseOptions ] ;
sh:targetClass reproschema:Field .

Expand Down Expand Up @@ -141,10 +147,13 @@ reproschema:ProtocolShape a sh:NodeShape ;

[ sh:nodeKind sh:IRI ;
sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ;
sh:path reproschema:allow ] ;
sh:path reproschema:allow ],

[ sh:node reproschema:CronTableShape ;
sh:path reproschema:cronTable ] ;
sh:targetClass reproschema:Protocol .

reproschema:ResponseOptionShape a sh:NodeShape ;
reproschema:ResponseOptionsShape a sh:NodeShape ;
sh:closed true ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:datatype schema:Boolean ;
Expand Down Expand Up @@ -191,7 +200,20 @@ reproschema:AddPropertiesShape a sh:NodeShape ;
sh:path skos:prefLabel ],

[ sh:datatype xsd:boolean ;
sh:path schema:valueRequired ] ;
sh:path schema:valueRequired ],

[ sh:datatype rdf:langString ;
sh:path reproschema:randomMaxDelay ],

[ sh:datatype rdf:langString ;
sh:pattern "(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\d+(ns|us|µs|ms|s|m|h))+)|((((\\d+,)+\\d+|(\\d+(\\/|-)\\d+)|\\d+|\\*) ?){5,7})" ;
sh:path reproschema:schedule ],

[ sh:datatype rdf:langString ;
sh:path reproschema:limit ],

[ sh:datatype xsd:integer ;
sh:path reproschema:maxRetakes ] ;
sh:targetClass reproschema:AdditionalProperty .

reproschema:ChoicesShape a sh:NodeShape ;
Expand All @@ -204,7 +226,7 @@ reproschema:ChoicesShape a sh:NodeShape ;
sh:path schema:name ],

[ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype schema:Text ]) ;
sh:path reproschema:value ];
sh:path reproschema:value ] ;
sh:targetClass reproschema:Choice .

reproschema:IsVisShape a sh:NodeShape ;
Expand Down

0 comments on commit e224cc7

Please sign in to comment.