From b282ed6d3148e498063116790ad4ae1d2aabcd16 Mon Sep 17 00:00:00 2001 From: blushi Date: Wed, 9 Aug 2023 13:17:09 +0200 Subject: [PATCH] refactor: remove C04 class example and refactor ttls --- .../C04-ruuts-credit-class.jsonld | 105 ------------------ .../credit-classes/C04-ruuts-credit-class.ttl | 81 ++++++-------- shacl/credit-classes/credit-class.ttl | 2 +- 3 files changed, 37 insertions(+), 151 deletions(-) delete mode 100644 jsonld/credit-classes/C04-ruuts-credit-class.jsonld diff --git a/jsonld/credit-classes/C04-ruuts-credit-class.jsonld b/jsonld/credit-classes/C04-ruuts-credit-class.jsonld deleted file mode 100644 index f4cc974..0000000 --- a/jsonld/credit-classes/C04-ruuts-credit-class.jsonld +++ /dev/null @@ -1,105 +0,0 @@ -{ - "@context": { - "schema": "http://schema.org/", - "regen": "https://schema.regen.network#", - "xsd": "http://www.w3.org/2001/XMLSchema#", - "schema:itemListElement": { - "@container": "@list" - }, - "schema:url": { - "@type": "schema:URL" - }, - "regen:sectoralScope": { - "@container": "@list" - }, - "regen:offsetGenerationMethod": { - "@container": "@list" - }, - "regen:measuredGHGs": { - "@container": "@list" - }, - "regen:coBenefits": { - "@container": "@list" - }, - "regen:eligibleActivities": { - "@container": "@list" - }, - "regen:landOwnershipType": { - "@container": "@list" - }, - "regen:ecosystemType": { - "@container": "@list" - }, - "regen:verificationMethods": { - "@container": "@list" - }, - "regen:additionalityApproach": { - "@container": "@list" - }, - "regen:leakageApproach": { - "@container": "@list" - }, - "regen:creditingTerm": { - "@type": "schema:activityDuration" - }, - "regen:lookbackPeriod": { - "@type": "schema:activityDuration" - }, - "regen:permanencePeriod": { - "@type": "schema:activityDuration" - }, - "regen:monitoringFrequency": { - "@type": "schema:frequency" - }, - "regen:verificationFrequency": { - "@type": "schema:frequency" - } - }, - "@type": "regen:C04-CreditClass", - "schema:name": "", - "schema:description": "", - "schema:url": "", - "regen:sourceRegistry": { - "schema:name": "", - "schema:url": "" - }, - "regen:sectoralScope": [""], - "regen:offsetGenerationMethods": [""], - "regen:measuredGHGs": [""], - "regen:coBenefits": [""], - "regen:geographicApplicability": "", - "regen:eligibleActivities": [""], - "regen:landOwnershipType": [""], - "regen:ecosystemType": [""], - "regen:creditingTerm": "", - "regen:lookbackPeriod": "", - "regen:permanencePeriod": "", - "regen:aggregatedProjects": null, - "regen:monitoringFrequency": "", - "regen:verificationFrequency": "", - "regen:verificationMethod": ["" ], - "regen:approvedMethodologies": { - "@type": "schema:ItemList", - "schema:itemListElement": [ - { - "schema:name": "", - "schema:url": "", - "schema:identifier": "", - "schema:version": "" - } - ], - "schema:url": "" - }, - "regen:bufferPoolAccounts": { - "@type": "schema:ItemList", - "schema:itemListElement": [ - { - "schema:name": "", - "regen:walletAddress": "", - "regen:poolAllocation": "" - } - ] - }, - "regen:additionalityApproach": [""], - "regen:leakageApproach": [""] -} diff --git a/shacl/credit-classes/C04-ruuts-credit-class.ttl b/shacl/credit-classes/C04-ruuts-credit-class.ttl index 3b167ba..fe4c780 100644 --- a/shacl/credit-classes/C04-ruuts-credit-class.ttl +++ b/shacl/credit-classes/C04-ruuts-credit-class.ttl @@ -7,50 +7,6 @@ regen:C04-CreditClassShape a sh:NodeShape ; sh:targetClass regen:C04-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 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 [ sh:path regen:measuredGHGs ; sh:node dash:ListShape ; @@ -156,7 +112,6 @@ regen:C04-CreditClassShape a sh:NodeShape ; sh:maxCount 1 ; sh:minLength 1 ; ] ; - sh:property regen:ApprovedMethodologiesPropertyShape ; sh:property regen:BufferPoolAccountsShape ; sh:property [ sh:path regen:additionalityApproach ; @@ -187,4 +142,40 @@ regen:C04-CreditClassShape a sh:NodeShape ; sh:maxCount 1 ; sh:minLength 1 ; ] ; +. + +regen:BufferPoolAccountShape a sh:NodeShape ; + sh:property [ + sh:path schema:name ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + ] ; + sh:property [ + sh:path regen:walletAddress ; + sh:datatype xsd:string ; + sh:minCount 1 ; + ] ; + sh:property [ + sh:path regen:poolAllocation ; + sh:datatype xsd:string ; + sh:minCount 1 ; + ] ; +. + +regen:BufferPoolAccountsShape sh:path regen:bufferPoolAccounts ; + sh:node dash: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:BufferPoolAccountShape ; + sh:minCount 1 ; + ] ; + ] . \ No newline at end of file diff --git a/shacl/credit-classes/credit-class.ttl b/shacl/credit-classes/credit-class.ttl index a842141..0a87968 100644 --- a/shacl/credit-classes/credit-class.ttl +++ b/shacl/credit-classes/credit-class.ttl @@ -7,7 +7,7 @@ @prefix rdfs: . regen:CreditClassShape a sh:NodeShape ; - sh:targetClass regen:CreditClass, regen:C01-CreditClass, regen:C02-CreditClass, regen:C03-CreditClass; + sh:targetClass regen:CreditClass, regen:C01-CreditClass, regen:C02-CreditClass, regen:C03-CreditClass, regen:C04-CreditClass; sh:property [ sh:path schema:name ; sh:minCount 1 ;