From d7052d85212d6cec1c625c25f7cb008e73865ca3 Mon Sep 17 00:00:00 2001 From: Sanu Ann Date: Fri, 25 Sep 2020 00:47:42 -0400 Subject: [PATCH] add messages, overrideProperties and some refactoring --- reproschema/tests/contexts/generic | 100 ++++- .../tests/data/activities/activity1.jsonld | 24 +- .../data/activities/activity1_embed.jsonld | 4 +- .../tests/data/activities/items/item1.jsonld | 2 +- .../tests/data/activities/items/item2.jsonld | 38 ++ .../tests/data/protocols/protocol1.jsonld | 15 +- .../data/protocols/protocol1_embed.jsonld | 6 +- reproschema/tests/reproschema-shacl.ttl | 344 ++++++++++++++---- 8 files changed, 433 insertions(+), 100 deletions(-) create mode 100644 reproschema/tests/data/activities/items/item2.jsonld diff --git a/reproschema/tests/contexts/generic b/reproschema/tests/contexts/generic index bbe1b75..2989fc0 100644 --- a/reproschema/tests/contexts/generic +++ b/reproschema/tests/contexts/generic @@ -12,12 +12,20 @@ "@container": "@language" }, "value": { - "@id": "schema:value", + "@id": "reproschema:value", + "@type": "@id", "@container": "@language" }, "image": { "@id": "schema:image", - "@type": "@vocab" + "@type": "@id" + }, + "inLanguage": { + "@id": "schema:inLanguage" + }, + "url": { + "@id": "schema:url", + "@type": "@id" }, "citation": { "@id": "schema:citation", @@ -45,7 +53,8 @@ }, "valueType": { "@id": "reproschema:valueType", - "@type": "@vocab" + "@type": "@id", + "@container": "@set" }, "landingPage": { "@id": "reproschema:landingPage", @@ -56,16 +65,17 @@ "@container": "@language" }, "choices": { - "@id": "schema:itemListElement" + "@id": "reproschema:choices" }, - "valueRequired": "https://schema.org/valueRequired", + "valueRequired": "schema:valueRequired", "multipleChoice": { "@id": "reproschema:multipleChoice", "@type": "schema:Boolean" }, "responseOptions": { "@id": "reproschema:responseOptions", - "@type": "@vocab" + "@container": "@set", + "@type": "@id" }, "dataType": { "@id": "schema:DataType", @@ -77,6 +87,14 @@ "maxValue": { "@id": "schema:maxValue" }, + "unitCode": { + "@id": "schema:unitCode", + "@container": "@set" + }, + "unitOptions": { + "@id": "reproschema:unitOptions", + "@container": "@set" + }, "ui" : "@nest", "order": { "@id": "reproschema:order", @@ -90,6 +108,16 @@ "@container": "@set", "@nest": "ui" }, + "overrideProperties": { + "@id": "reproschema:overrideProperties", + "@type": "reproschema:OverrideProperty", + "@container": "@set", + "@nest": "ui" + }, + "message": { + "@id": "reproschema:message", + "@container": "@language" + }, "shuffle": { "@id": "reproschema:shuffle", "@type": "schema:Boolean", @@ -106,11 +134,15 @@ "@nest": "ui" }, "readonlyValue": { - "@id": "https://schema.org/readonlyValue", + "@id": "schema:readonlyValue", "@nest": "ui" }, - "scoringLogic": { - "@id": "reproschema:scoringLogic", + "compute": { + "@id": "reproschema:compute", + "@container": "@index" + }, + "messages": { + "@id": "reproschema:messages", "@container": "@index" }, "jsExpression": { @@ -147,6 +179,30 @@ "@type": "@id", "@nest": "ui" }, + "additionalNotesObj": { + "@id": "reproschema:additionalNotesObj", + "@container": "@set" + }, + "source": { + "@id": "reproschema:source", + "@type": "xsd:string" + }, + "column": { + "@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" @@ -178,6 +234,32 @@ "derivedFrom": { "@id": "prov:wasDerivedFrom", "@type": "@id" + }, + "used": { + "@id": "prov:used", + "@container": "@set", + "@type": "@id" + }, + "wasAttributedTo": { + "@id": "prov:wasAttributedTo", + "@type": "reproschema:Participant", + "@container": "@set" + }, + "wasAssociatedWith": { + "@id": "prov:wasAssociatedWith", + "@type": "reproschema:SoftwareAgent", + "@container": "@set" + }, + "subject_id": { + "@id": "nidm:subject_id" + }, + "startedAtTime": { + "@id": "prov:startedAtTime", + "@type": "xsd:dateTime" + }, + "endedAtTime": { + "@id": "prov:endedAtTime", + "@type": "xsd:dateTime" } } ] diff --git a/reproschema/tests/data/activities/activity1.jsonld b/reproschema/tests/data/activities/activity1.jsonld index 22c6778..1c32b4e 100644 --- a/reproschema/tests/data/activities/activity1.jsonld +++ b/reproschema/tests/data/activities/activity1.jsonld @@ -4,23 +4,39 @@ "@id": "activity1.jsonld", "prefLabel": "Example 1", "description": "Activity example 1", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc2", "version": "0.0.1", "citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/", "preamble": { "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?" }, + "messages": [ + { + "message": "Test message: Triggered when item1 value is greater than 1", + "jsExpression": "item1 > 1" + } + ], "ui": { "addProperties": [ { "isAbout": "items/item1.jsonld", "variableName": "item1", "requiredValue": true, - "isVis": true} + "isVis": true, + "randomMaxDelay": "PT2H", + "limit": "P2D", + "schedule": "R/2020-08-01T08:00:00Z/P1D" + }, + { "isAbout": "items/item2.jsonld", + "variableName": "item2", + "requiredValue": true, + "isVis": true + } ], "order": [ - "items/item1.jsonld" + "items/item1.jsonld", + "items/item2.jsonld" ], "shuffle": false } -} +} \ No newline at end of file diff --git a/reproschema/tests/data/activities/activity1_embed.jsonld b/reproschema/tests/data/activities/activity1_embed.jsonld index 653b3ab..1a08595 100644 --- a/reproschema/tests/data/activities/activity1_embed.jsonld +++ b/reproschema/tests/data/activities/activity1_embed.jsonld @@ -4,7 +4,7 @@ "@id": "activity1.jsonld", "prefLabel": "Example 1", "description": "Activity example 1", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc2", "version": "0.0.1", "citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/", "preamble": { @@ -24,7 +24,7 @@ "@id": "items/item1.jsonld", "prefLabel": "item1", "description": "Q1 of example 1", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc2", "version": "0.0.1", "question": { "en": "Little interest or pleasure in doing things", diff --git a/reproschema/tests/data/activities/items/item1.jsonld b/reproschema/tests/data/activities/items/item1.jsonld index cb185d8..920263b 100644 --- a/reproschema/tests/data/activities/items/item1.jsonld +++ b/reproschema/tests/data/activities/items/item1.jsonld @@ -4,7 +4,7 @@ "@id": "item1.jsonld", "prefLabel": "item1", "description": "Q1 of example 1", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc2", "version": "0.0.1", "question": { "en": "Little interest or pleasure in doing things", diff --git a/reproschema/tests/data/activities/items/item2.jsonld b/reproschema/tests/data/activities/items/item2.jsonld new file mode 100644 index 0000000..f7f23ef --- /dev/null +++ b/reproschema/tests/data/activities/items/item2.jsonld @@ -0,0 +1,38 @@ +{ + "@context": "../../../contexts/generic", + "@type": "reproschema:Field", + "@id": "item2.jsonld", + "prefLabel": "item2", + "description": "Q2 of example 1", + "schemaVersion": "1.0.0-rc2", + "version": "0.0.1", + "question": { + "en": "Current temperature.", + "es": "Fiebre actual." + }, + "ui": { + "inputType": "float" + }, + "responseOptions": { + "valueType": "xsd:float", + "unitOptions": [ + { + "prefLabel": { + "en": "Fahrenheit", + "es": "Fahrenheit" + }, + "value": "°F" + }, + { + "prefLabel": { + "en": "Celsius", + "es": "Celsius" + }, + "value": "°C" + } + ] + } +} + + + diff --git a/reproschema/tests/data/protocols/protocol1.jsonld b/reproschema/tests/data/protocols/protocol1.jsonld index e9e835f..c9fc432 100644 --- a/reproschema/tests/data/protocols/protocol1.jsonld +++ b/reproschema/tests/data/protocols/protocol1.jsonld @@ -1,5 +1,5 @@ { - "@context": "../../contexts/generic", + "@context": "../../contexts/generic", "@type": "reproschema:Protocol", "@id": "protocol1.jsonld", "prefLabel": { @@ -7,8 +7,14 @@ "es": "Protocol1_es" }, "description": "example Protocol", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc2", "version": "0.0.1", + "messages": [ + { + "message": "Test message: Triggered when item1 value is greater than 0", + "jsExpression": "item1 > 0" + } + ], "ui": { "addProperties": [ { @@ -18,7 +24,10 @@ "en": "Screening", "es": "Screening_es" }, - "isVis": true + "isVis": true, + "schedule": "R5/2008-01-01T13:00:00Z/P1Y2M10DT2H30M", + "randomMaxDelay": "PT12H", + "limit": "P1W/2020-08-01T13:00:00Z" } ], "order": [ diff --git a/reproschema/tests/data/protocols/protocol1_embed.jsonld b/reproschema/tests/data/protocols/protocol1_embed.jsonld index 0959dff..2e233c7 100644 --- a/reproschema/tests/data/protocols/protocol1_embed.jsonld +++ b/reproschema/tests/data/protocols/protocol1_embed.jsonld @@ -7,7 +7,7 @@ "es": "Protocol1_es" }, "description": "example Protocol", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc2", "version": "0.0.1", "ui": { "addProperties": [ @@ -27,7 +27,7 @@ "@id": "../activities/activity1.jsonld", "prefLabel": "Example 1", "description": "Activity example 1", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc2", "version": "0.0.1", "citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/", "preamble": { @@ -49,7 +49,7 @@ "@id": "../activities/items/item1.jsonld", "prefLabel": "item1", "description": "Q1 of example 1", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc2", "version": "0.0.1", "question": { "en": "Little interest or pleasure in doing things", diff --git a/reproschema/tests/reproschema-shacl.ttl b/reproschema/tests/reproschema-shacl.ttl index c39596b..a89f8ed 100644 --- a/reproschema/tests/reproschema-shacl.ttl +++ b/reproschema/tests/reproschema-shacl.ttl @@ -5,39 +5,69 @@ @prefix sh: . @prefix skos: . @prefix xsd: . +@prefix nidm: . +@prefix uuid: . +@prefix prov: . reproschema:ActivityShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; sh:path schema:description ], + [ sh:datatype rdf:langString ; sh:path schema:schemaVersion ], + [ sh:datatype rdf:langString ; sh:path schema:version ], + [ sh:datatype rdf:langString ; sh:path schema:citation ], + + [ sh:nodeKind sh:IRI ; + sh:path schema:image ], + [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path skos:prefLabel ], + + [ sh:datatype rdf:langString ; + sh:path skos:altLabel ], + [ 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:node reproschema:MessageSpecificationShape ; + sh:path reproschema:messages ], + [ sh:maxCount 1 ; sh:node dash:ListShape ; sh:path reproschema:order ; sh:property [ sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ], + [ sh:node reproschema:AddPropertiesShape ; sh:path reproschema:addProperties ], + + [ sh:node reproschema:OverridePropertiesShape ; + sh:path reproschema:overrideProperties ], + [ sh:datatype xsd:string ; sh:path reproschema:inputType ], + [ sh:datatype schema:Boolean ; sh:path reproschema:shuffle ], + [ sh:nodeKind sh:IRI ; - sh:path reproschema:allow ] ; + sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + sh:path reproschema:allow ], + + [ sh:node reproschema:CronTableShape ; + sh:path reproschema:cronTable ] ; sh:targetClass reproschema:Activity . reproschema:FieldShape a sh:NodeShape ; @@ -46,31 +76,42 @@ reproschema:FieldShape a sh:NodeShape ; sh:property [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path skos:prefLabel ], + [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:path skos:altLabel ], + [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:path schema:description ], + [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:path schema:schemaVersion ], + [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:path schema:version ], + [ sh:datatype rdf:langString ; sh:path schema:question ], - [ sh:datatype rdf:langString ; + + [ sh:nodeKind sh:IRI ; sh:maxCount 1 ; + sh:path schema:image ], + + [ sh:datatype rdf:langString ; sh:path reproschema:preamble ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:minCount 1 ; sh:path reproschema:inputType ], + [ sh:datatype xsd:boolean ; sh:maxCount 1 ; - sh:path reproschema:readOnly ], - [ sh:node reproschema:ResponseOptionsShape ; + sh:path schema:readonlyValue ], + + [ sh:node reproschema:AdditionalNoteObj ; + sh:path reproschema:additionalNotesObj ], + + [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:ResponseOptionsShape ] ) ; sh:path reproschema:responseOptions ] ; sh:targetClass reproschema:Field . @@ -78,159 +119,306 @@ reproschema:ProtocolShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:path schema:description ], + [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:path schema:schemaVersion ], + [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:path schema:version ], - [ sh:datatype rdf:langString ; + + [ sh:nodeKind sh:IRI ; sh:maxCount 1 ; sh:path schema:image ], - [ sh:datatype rdf:langString ; - sh:maxCount 1 ; + + [ sh:nodeKind sh:IRI ; sh:path reproschema:landingPage ], + [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path skos:prefLabel ], + + [ sh:datatype rdf:langString ; + sh:path skos:altLabel ], + [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:path reproschema:preamble ], - [ sh:maxCount 1 ; - sh:node reproschema:ScoringShape ; - sh:path reproschema:scoringLogic ], + + [ sh:node reproschema:ComputeSpecificationShape ; + sh:path reproschema:compute ], + + [ sh:node reproschema:MessageSpecificationShape ; + sh:path reproschema:messages ], + [ sh:minCount 1 ; sh:node dash:ListShape ; sh:path reproschema:order ; sh:property [ sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ], + [ sh:node reproschema:AddPropertiesShape ; sh:path reproschema:addProperties ], + + [ sh:node reproschema:OverridePropertiesShape ; + sh:path reproschema:overrideProperties ], + [ sh:datatype schema:Boolean ; sh:path reproschema:shuffle ], + [ sh:nodeKind sh:IRI ; - sh:path reproschema:allow ] ; + sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + sh:path reproschema:allow ], + + [ sh:node reproschema:CronTableShape ; + sh:path reproschema:cronTable ] ; sh:targetClass reproschema:Protocol . reproschema:ResponseOptionsShape a sh:NodeShape ; sh:closed true ; - sh:ignoredProperties ( rdf:type ), - ( rdf:type ) ; + sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype schema:Boolean ; + sh:maxCount 1 ; sh:path reproschema:multipleChoice ], - [ sh:datatype xsd:integer ; - sh:path schema:minValue ], - [ sh:datatype xsd:integer ; - sh:path schema:maxValue ], + [ sh:nodeKind sh:IRI ; sh:path reproschema:valueType ], - [ sh:node reproschema:ChoicesShape ; - sh:path schema:itemListElement ], - [ sh:minCount 1 ; - sh:nodeKind sh:IRI ; - sh:path reproschema:valueType ], + [ sh:datatype xsd:integer ; sh:maxCount 1 ; sh:path schema:minValue ], + [ sh:datatype xsd:integer ; sh:maxCount 1 ; sh:path schema:maxValue ], - [ sh:datatype schema:Boolean ; - sh:maxCount 1 ; - sh:path reproschema:multipleChoice ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:path reproschema:datumType ], - [ sh:maxCount 1 ; - sh:or ( [ sh:datatype schema:URL ] [ sh:datatype rdf:langString ] ) ; + + [ sh:or ( [ sh:datatype schema:URL ] [ sh:datatype rdf:langString ] ) ; sh:path schema:unitCode ], + + [ sh:node reproschema:UnitOptionsShape ; + sh:path reproschema:unitOptions ] , + [ sh:node reproschema:ChoicesShape ; - sh:path schema:itemListElement ] ; - sh:targetClass reproschema:ResponseOptions . + sh:path reproschema:choices ] ; + sh:targetClass reproschema:ResponseOption . reproschema:AddPropertiesShape a sh:NodeShape ; sh:closed true ; - sh:ignoredProperties ( rdf:type ), - ( rdf:type ) ; + sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path reproschema:variableName ], + [ sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:path reproschema:isAbout ], + [ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ] ) ; sh:path reproschema:isVis ], + [ sh:datatype rdf:langString ; sh:path skos:prefLabel ], + + [ sh:datatype xsd:boolean ; + sh:path schema:valueRequired ], + + [ sh:datatype rdf:langString ; + sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$" ; + sh:path reproschema:randomMaxDelay ], + + # Patterns extracted from: https://gist.githubusercontent.com/philipashlock/8830168/raw/e65bee7b2c1c9908fd62d064b2451e2cf29aa43c/index.html [ sh:datatype rdf:langString ; + sh:or ( [sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] + [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] + [sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] + [sh:pattern "^(R\\d*\\/)?([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] + [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] + ) ; + sh:path reproschema:schedule ], + + [ sh:datatype rdf:langString ; + sh:or ( [sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$"] + [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] + ) ; + sh:path reproschema:limit ], + + [ sh:datatype xsd:integer ; + sh:path reproschema:maxRetakes ] ; + + sh:targetClass reproschema:AdditionalProperty . + +reproschema:OverridePropertiesShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path reproschema:variableName ], + [ sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:path reproschema:isAbout ], - [ sh:datatype schema:Boolean ; - sh:path reproschema:requiredValue ], + [ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ] ) ; sh:path reproschema:isVis ], + [ sh:datatype rdf:langString ; - sh:path skos:prefLabel ] . + sh:path skos:prefLabel ], + + [ sh:datatype xsd:boolean ; + sh:path schema:valueRequired ], + + [ sh:datatype rdf:langString ; + sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$" ; + sh:path reproschema:randomMaxDelay ], + + # Patterns extracted from: https://gist.githubusercontent.com/philipashlock/8830168/raw/e65bee7b2c1c9908fd62d064b2451e2cf29aa43c/index.html + [ sh:datatype rdf:langString ; + sh:or ( [sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] + [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] + [sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] + [sh:pattern "^(R\\d*\\/)?([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] + [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] + ) ; + sh:path reproschema:schedule ], + + [ sh:datatype rdf:langString ; + sh:or ( [sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$"] + [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] + ) ; + sh:path reproschema:limit ], + + [ sh:datatype xsd:integer ; + sh:path reproschema:maxRetakes ] ; + sh:targetClass reproschema:OverrideProperty . reproschema:ChoicesShape a sh:NodeShape ; sh:closed true ; - sh:ignoredProperties ( rdf:type ), - ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:nodeKind sh:IRI ; sh:path schema:image ], - [ sh:nodeKind sh:IRI ; - sh:path reproschema:dontKnow ], - [ sh:nodeKind sh:IRI ; - sh:path reproschema:skipped ], - [ sh:datatype rdf:langString ; - sh:path schema:name ], - [ sh:datatype xsd:integer ; - sh:path schema:value ], + [ sh:datatype rdf:langString ; sh:path schema:name ], - [ sh:datatype xsd:integer ; - sh:path schema:value ], - [ sh:datatype xsd:string ; - sh:path schema:image ], - [ sh:nodeKind sh:IRI ; - sh:path reproschema:dontKnow ], - [ sh:nodeKind sh:IRI ; - sh:path reproschema:skipped ] . + + [ 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:targetClass reproschema:Choice . + +reproschema:UnitOptionsShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:path skos:prefLabel ], + + [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Text ]) ; + sh:path reproschema:value ] ; + sh:targetClass reproschema:UnitOption . reproschema:IsVisShape a sh:NodeShape ; sh:closed true ; - sh:ignoredProperties ( rdf:type ), - ( rdf:type ) ; + sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; + sh:minCount 1 ; sh:path schema:method ], + [ sh:datatype rdf:langString ; + sh:minCount 1 ; sh:path schema:url ], + [ sh:datatype rdf:langString ; - sh:path reproschema:payload ], - [ sh:datatype rdf:langString ; - sh:path schema:method ], - [ sh:datatype rdf:langString ; - sh:path schema:url ], - [ sh:datatype rdf:langString ; + 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 ; + sh:minCount 1 ; sh:path reproschema:variableName ], [ sh:datatype rdf:langString ; - sh:path reproschema:jsExpression ], - [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:minCount 1 ; - sh:path reproschema:variableName ], + sh:path reproschema:jsExpression ] ; + sh:targetClass reproschema:ComputeSpecification . + +reproschema:MessageSpecificationShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:message ] , + + [ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] ) ; + sh:minCount 1 ; + sh:path reproschema:jsExpression ] ; + sh:targetClass reproschema:MessageSpecification . + +reproschema:AdditionalNoteObjShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:source ], + [ sh:datatype rdf:langString ; - sh:maxCount 1 ; sh:minCount 1 ; - sh:path reproschema:jsExpression ] . + sh:path reproschema:column ], + + [ 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:targetClass reproschema:AdditionalNoteObj . + +reproschema:ResponseShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:node prov:ParticipantShape ; + sh:path prov:wasAttributedTo ], + + [ sh:nodeKind sh:IRI ; + sh:path reproschema:isAbout ], + + [ 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:targetClass reproschema:Response . + +prov:ParticipantShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:path nidm:subject_id ] ; + sh:targetClass reproschema:Participant . + +reproschema:ResponseActivityShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:nodeKind sh:IRI ; + sh:path prov:used ], + + [ sh:datatype rdf:langString ; + sh:path schema:inLanguage ], + + [ sh:datatype xsd:dateTime ; + sh:path prov:startedAtTime ], + + [ sh:datatype xsd:dateTime ; + sh:path prov:endedAtTime ], + + [ sh:node prov:SoftwareAgentShape ; + sh:path prov:wasAssociatedWith ], + + [ sh:datatype rdf:langString ; + sh:path prov:generated ] ; + sh:targetClass reproschema:ResponseActivity . + +prov:SoftwareAgentShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:path schema:version ], + + [ sh:nodeKind sh:IRI ; + sh:path schema:url ] ; + sh:targetClass reproschema:SoftwareAgent .