From 0706dce00a87ef5f6b5e574f926b2961429c8d96 Mon Sep 17 00:00:00 2001 From: blushi Date: Thu, 29 Jun 2023 17:45:11 +0200 Subject: [PATCH] refactor: mv common credit class shape to main credit-class.ttl --- shacl/common.ttl | 21 ++++++++ .../C01-verified-carbon-standard-class.ttl | 42 --------------- .../C02-city-forest-credits-class.ttl | 52 ------------------- .../credit-classes/C03-toucan-tco2-class.ttl | 52 ------------------- shacl/credit-classes/credit-class.ttl | 42 +++++++++++++++ shacl/methodologies/methodology.ttl | 20 ------- 6 files changed, 63 insertions(+), 166 deletions(-) diff --git a/shacl/common.ttl b/shacl/common.ttl index 6122890..fe95395 100644 --- a/shacl/common.ttl +++ b/shacl/common.ttl @@ -41,3 +41,24 @@ regen:ProjectActivitiesPropertyShape sh:path regen:projectActivities ; sh:minCount 1 ; sh:maxCount 1 ; . + +regen:ApprovedMethodologiesPropertyShape sh:path regen:approvedMethodologies ; + sh:class schema:ItemList ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:property [ + sh:path schema:itemListElement ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:property [ + sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; + sh:node regen:MethodologyVersionShape ; + sh:minCount 1 ; + ] ; + ] ; + sh:property [ + sh:path schema:url ; + sh:maxCount 1 ; + sh:datatype schema:URL ; + ] ; +. diff --git a/shacl/credit-classes/C01-verified-carbon-standard-class.ttl b/shacl/credit-classes/C01-verified-carbon-standard-class.ttl index 74809b5..ea3e710 100644 --- a/shacl/credit-classes/C01-verified-carbon-standard-class.ttl +++ b/shacl/credit-classes/C01-verified-carbon-standard-class.ttl @@ -10,46 +10,4 @@ regen:C01-CreditClass rdfs:subClassOf regen:CreditClass . regen:C01-CreditClassShape a sh:NodeShape ; sh:targetClass regen:C01-CreditClass ; - sh:property [ - sh:path schema:description ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path schema:name ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path schema:url ; - sh:datatype schema:URL ; - ] ; - sh:property [ - sh:path regen:sourceRegistry ; - sh:node regen:NameUrlShape ; - ] ; - sh:property [ - sh:path regen:sectoralScope ; - 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 ; - ] ; - sh:property regen:OffsetGenerationMethodPropertyShape ; - sh:property regen:ApprovedMethodologiesPropertyShape ; - sh:property [ - sh:path regen:verificationMethod ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; . diff --git a/shacl/credit-classes/C02-city-forest-credits-class.ttl b/shacl/credit-classes/C02-city-forest-credits-class.ttl index c4adb73..9ef165e 100644 --- a/shacl/credit-classes/C02-city-forest-credits-class.ttl +++ b/shacl/credit-classes/C02-city-forest-credits-class.ttl @@ -10,58 +10,6 @@ regen:C02-CreditClass rdfs:subClassOf regen:CreditClass . regen:C02-CreditClassShape a sh:NodeShape ; sh:targetClass regen:C02-CreditClass ; - sh:property [ - sh:path schema:description ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path schema:name ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path schema:url ; - sh:datatype schema:URL ; - ] ; - sh:property [ - sh:path regen:sourceRegistry ; - sh:node regen:NameUrlShape ; - ] ; - sh:property [ - sh:path regen:sectoralScope ; - 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 ; - ] ; - sh:property [ - sh:path regen:offsetGenerationMethod ; - 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 ; - ] ; - sh:property regen:ApprovedMethodologiesPropertyShape ; - sh:property [ - sh:path regen:verificationMethod ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; sh:property regen:ProjectActivitiesPropertyShape; sh:property [ sh:path regen:carbonOffsetStandard ; diff --git a/shacl/credit-classes/C03-toucan-tco2-class.ttl b/shacl/credit-classes/C03-toucan-tco2-class.ttl index d04be14..d60d463 100644 --- a/shacl/credit-classes/C03-toucan-tco2-class.ttl +++ b/shacl/credit-classes/C03-toucan-tco2-class.ttl @@ -10,58 +10,6 @@ regen:C03-CreditClass rdfs:subClassOf regen:CreditClass . regen:C03-CreditClassShape a sh:NodeShape ; sh:targetClass regen:C03-CreditClass ; - sh:property [ - sh:path schema:description ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path schema:name ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path schema:url ; - sh:datatype schema:URL ; - ] ; - sh:property [ - sh:path regen:sourceRegistry ; - sh:node regen:NameUrlShape ; - ] ; - sh:property [ - sh:path regen:sectoralScope ; - 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 ; - ] ; - sh:property [ - sh:path regen:offsetGenerationMethod ; - 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 ; - ] ; - sh:property regen:ApprovedMethodologiesPropertyShape ; - sh:property [ - sh:path regen:verificationMethod ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - ] ; sh:property [ sh:path regen:tokenizationSource ; sh:minCount 1 ; diff --git a/shacl/credit-classes/credit-class.ttl b/shacl/credit-classes/credit-class.ttl index 351dfc0..b71562e 100644 --- a/shacl/credit-classes/credit-class.ttl +++ b/shacl/credit-classes/credit-class.ttl @@ -8,8 +8,50 @@ regen:CreditClassShape a sh:NodeShape ; sh:targetClass regen:CreditClass ; + sh:property [ + sh:path schema:name ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + sh:datatype xsd:string ; + ] ; + sh:property [ + sh:path schema:description ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + sh:datatype xsd:string ; + ] ; + sh:property [ + sh:path schema:url ; + sh:datatype schema:URL ; + ] ; sh:property [ sh:path schema:image ; sh:datatype schema:URL ; ] ; + sh:property [ + sh:path regen:sourceRegistry ; + sh:node regen:NameUrlShape ; + ] ; + sh:property [ + sh:path regen:sectoralScope ; + 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 ; + ] ; + sh:property regen:OffsetGenerationMethodPropertyShape ; + sh:property [ + sh:path regen:verificationMethod ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + sh:datatype xsd:string ; + ] ; + sh:property regen:ApprovedMethodologiesPropertyShape ; . diff --git a/shacl/methodologies/methodology.ttl b/shacl/methodologies/methodology.ttl index 4ee745c..a9d1eeb 100644 --- a/shacl/methodologies/methodology.ttl +++ b/shacl/methodologies/methodology.ttl @@ -31,23 +31,3 @@ regen:MethodologyVersionShape a sh:NodeShape ; ] ; . -regen:ApprovedMethodologiesPropertyShape sh:path regen:approvedMethodologies ; - sh:class schema:ItemList ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:property [ - sh:path schema:itemListElement ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:property [ - sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; - sh:node regen:MethodologyVersionShape ; - sh:minCount 1 ; - ] ; - ] ; - sh:property [ - sh:path schema:url ; - sh:maxCount 1 ; - sh:datatype schema:URL ; - ] ; -.