From 12be3cefe17edd2e2468f8308627248a407f1ad4 Mon Sep 17 00:00:00 2001 From: blushi Date: Thu, 31 Aug 2023 09:37:31 +0200 Subject: [PATCH] fix: adjust some of the credit class constraints for upcoming KSH01 --- shacl/common.ttl | 11 +++++++++++ shacl/credit-classes/credit-class.ttl | 14 +++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/shacl/common.ttl b/shacl/common.ttl index bf17666..c10ca89 100644 --- a/shacl/common.ttl +++ b/shacl/common.ttl @@ -23,6 +23,17 @@ regen:OffsetGenerationMethodPropertyShape sh:path regen:offsetGenerationMethod ; sh:maxCount 1 ; . +regen:CreditGenerationMethodPropertyShape sh:path regen:creditGenerationMethod ; + sh:node dash:ListShape ; + sh:property [ + sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; + sh:datatype xsd:string ; + sh:minLength 1 ; + ] ; + sh:minCount 1 ; + sh:maxCount 1 ; +. + regen:OffsetGenerationMethodOptionalPropertyShape sh:path regen:offsetGenerationMethod ; sh:node dash:ListShape ; sh:property [ diff --git a/shacl/credit-classes/credit-class.ttl b/shacl/credit-classes/credit-class.ttl index ef2b8fa..c44ce54 100644 --- a/shacl/credit-classes/credit-class.ttl +++ b/shacl/credit-classes/credit-class.ttl @@ -7,7 +7,10 @@ @prefix rdfs: . regen:CreditClassShape a sh:NodeShape ; - sh:targetClass regen:CreditClass, regen:C01-CreditClass, regen:C02-CreditClass, regen:C03-CreditClass, regen:C04-CreditClass; + sh:targetClass + regen:CreditClass, + regen:C01-CreditClass, regen:C02-CreditClass, regen:C03-CreditClass, regen:C04-CreditClass, + regen:KSH01-CreditClass; sh:property [ sh:path schema:name ; sh:minCount 1 ; @@ -42,10 +45,15 @@ regen:CreditClassShape a sh:NodeShape ; sh:datatype xsd:string ; sh:minLength 1 ; ] ; - sh:minCount 1 ; sh:maxCount 1 ; ] ; - sh:property regen:OffsetGenerationMethodPropertyShape ; + sh:or ( + [ + sh:property regen:OffsetGenerationMethodPropertyShape ; + ] [ + sh:property regen:creditGenerationMethodPropertyShape ; + ] + ) ; sh:or ( [ sh:property [