From e224cc7f7b4c4126717c6c45ac2ca6b5b48c7946 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Thu, 23 Jul 2020 23:20:35 -0400 Subject: [PATCH] updated schema --- reproschema/tests/contexts/generic | 12 +++++++ .../tests/data/activities/activity1.jsonld | 6 +++- reproschema/tests/reproschema-shacl.ttl | 34 +++++++++++++++---- 3 files changed, 45 insertions(+), 7 deletions(-) diff --git a/reproschema/tests/contexts/generic b/reproschema/tests/contexts/generic index 7ab9c3e..a06ee0e 100644 --- a/reproschema/tests/contexts/generic +++ b/reproschema/tests/contexts/generic @@ -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" diff --git a/reproschema/tests/data/activities/activity1.jsonld b/reproschema/tests/data/activities/activity1.jsonld index 294472a..9dae5b5 100644 --- a/reproschema/tests/data/activities/activity1.jsonld +++ b/reproschema/tests/data/activities/activity1.jsonld @@ -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" diff --git a/reproschema/tests/reproschema-shacl.ttl b/reproschema/tests/reproschema-shacl.ttl index 052e6c4..a60e97a 100644 --- a/reproschema/tests/reproschema-shacl.ttl +++ b/reproschema/tests/reproschema-shacl.ttl @@ -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 ; @@ -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 ], @@ -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 . @@ -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 ; @@ -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 ; @@ -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 ;