diff --git a/jsonld/C03/project-metadata/C03-project-full-example.jsonld b/jsonld/C03/project-metadata/C03-project-full-example.jsonld index a36460a..3e5442e 100644 --- a/jsonld/C03/project-metadata/C03-project-full-example.jsonld +++ b/jsonld/C03/project-metadata/C03-project-full-example.jsonld @@ -17,6 +17,9 @@ }, "regen:offsetGenerationMethod": { "@container": "@list" + }, + "regen:ratings": { + "@container": "@list" } }, "@type": "regen:C03-Project", @@ -65,10 +68,11 @@ ] } }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "AAA", - "schema:url": "https://bezerocarbon.com/123" - } + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "AAA", + "schema:url": "https://bezerocarbon.com/123" + } + ] } diff --git a/jsonld/credit-classes/C01-verified-carbon-standard-class.jsonld b/jsonld/credit-classes/C01-verified-carbon-standard-class.jsonld deleted file mode 100644 index 2eff990..0000000 --- a/jsonld/credit-classes/C01-verified-carbon-standard-class.jsonld +++ /dev/null @@ -1,52 +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" - } - }, - "@type": "regen:CreditClass", - "schema:description": "", - "schema:name": "", - "schema:url": "", - "regen:sourceRegistry": { - "schema:name": "", - "schema:url": "" - }, - "regen:sectoralScope": [ - "" - ], - "regen:offsetGenerationMethod": [ - "" - ], - "regen:approvedMethodologies": { - "@type": "schema:ItemList", - "schema:itemListElement": [ - { - "schema:name": "", - "schema:url": "", - "schema:identifier": "", - "schema:version": "" - }, - { - "schema:name": "", - "schema:url": "", - "schema:identifier": "", - "schema:version": "" - } - ], - "schema:url": "" - }, - "regen:verificationMethod": "" -} diff --git a/jsonld/credit-classes/C02-city-forest-credits-class.jsonld b/jsonld/credit-classes/C02-city-forest-credits-class.jsonld deleted file mode 100644 index 2219f7f..0000000 --- a/jsonld/credit-classes/C02-city-forest-credits-class.jsonld +++ /dev/null @@ -1,63 +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:projectActivities": { - "@container": "@list" - }, - "regen:ecosystemType": { - "@container": "@list" - } - }, - "@type": "regen:C02-CreditClass", - "schema:name": "", - "schema:description": "", - "schema:url": "", - "regen:sourceRegistry": { - "schema:name": "", - "schema:url": "" - }, - "regen:sectoralScope": [""], - "regen:offsetGenerationMethod": [""], - "regen:approvedMethodologies": { - "@type": "schema:ItemList", - "schema:itemListElement": [ - { - "schema:name": "", - "schema:url": "", - "schema:identifier": "", - "schema:version": "" - }, - { - "schema:name": "", - "schema:url": "", - "schema:identifier": "", - "schema:version": "" - } - ], - "schema:url": "" - }, - "regen:ecosystemType": [ - "" - ], - "regen:verificationMethod": "", - "regen:projectActivities": [ - "" - ], - "regen:carbonOffsetStandard": { - "schema:url": "" - } -} diff --git a/jsonld/credit-classes/C03-Toucan-TCO2-class.jsonld b/jsonld/credit-classes/C03-Toucan-TCO2-class.jsonld deleted file mode 100644 index b361863..0000000 --- a/jsonld/credit-classes/C03-Toucan-TCO2-class.jsonld +++ /dev/null @@ -1,59 +0,0 @@ -{ - "@context": { - "schema": "http://schema.org/", - "regen": "https://schema.regen.network#", - "xsd": "http://www.w3.org/2001/XMLSchema#", - "schema:itemListElement": { - "@container": "@list" - }, - "regen:sectoralScope": { - "@container": "@list" - }, - "regen:offsetGenerationMethod": { - "@container": "@list" - }, - "regen:projectActivities": { - "@container": "@list" - }, - "schema:url": { - "@type": "schema:URL" - } - }, - "@type": "regen:C03-CreditClass", - "schema:description": "", - "schema:name": "", - "schema:url": "", - "regen:sourceRegistry": { - "schema:name": "", - "schema:url": "" - }, - "regen:sectoralScope": [ - "" - ], - "regen:offsetGenerationMethod": [ - "" - ], - "regen:approvedMethodologies": { - "@type": "schema:ItemList", - "schema:itemListElement": [ - { - "schema:name": "", - "schema:url": "", - "schema:identifier": "", - "schema:version": "" - }, - { - "schema:name": "", - "schema:url": "", - "schema:identifier": "", - "schema:version": "" - } - ], - "schema:url": "" - }, - "regen:verificationMethod": "", - "regen:projectActivities": [ - "" - ], - "regen:tokenizationSource": "" -} diff --git a/jsonld/credit-classes/credit-class.jsonld b/jsonld/credit-classes/credit-class.jsonld index 1460c7e..1c0e8ff 100644 --- a/jsonld/credit-classes/credit-class.jsonld +++ b/jsonld/credit-classes/credit-class.jsonld @@ -20,9 +20,12 @@ }, "schema:image": { "@type": "schema:URL" + }, + "regen:certifications": { + "@container": "@list" } }, - "@type": "regen:CreditClass", + "@type": "regen:XXX-CreditClass", "schema:description": "", "schema:name": "", "schema:url": "", @@ -58,5 +61,11 @@ "regen:verificationMethod": "", "regen:projectActivities": [ "" + ], + "regen:certifications": [ + { + "schema:name": "", + "schema:url": "" + } ] } diff --git a/jsonld/projects/C03-project.jsonld b/jsonld/projects/C03-project.jsonld index 366cec3..23da662 100644 --- a/jsonld/projects/C03-project.jsonld +++ b/jsonld/projects/C03-project.jsonld @@ -65,10 +65,11 @@ ] } }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "", - "schema:url": "" - } + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "", + "schema:url": "" + } + ] } diff --git a/jsonld/projects/project.jsonld b/jsonld/projects/project.jsonld new file mode 100644 index 0000000..925c682 --- /dev/null +++ b/jsonld/projects/project.jsonld @@ -0,0 +1,81 @@ +{ + "@context": { + "schema": "http://schema.org/", + "regen": "https://schema.regen.network#", + "qudt": "http://qudt.org/schema/qudt/", + "unit": "http://qudt.org/vocab/unit/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema:url": { + "@type": "schema:URL" + }, + "qudt:unit": { + "@type": "qudt:Unit" + }, + "qudt:numericValue": { + "@type": "xsd:double" + }, + "regen:projectStartDate": { + "@type": "xsd:date" + }, + "regen:projectEndDate": { + "@type": "xsd:date" + }, + "regen:offsetGenerationMethod": { + "@container": "@list" + }, + "regen:ratings": { + "@container": "@list" + } + }, + "@type": "regen:XXX-Project", + "@id": "http://app.regen.network/project/", + "schema:name": "", + "schema:location": { + "@context": { + "type": "@type", + "@vocab": "https://purl.org/geojson/vocab#", + "coordinates": { + "@container": "@list" + }, + "bbox": { + "@container": "@list" + } + }, + "type": "Feature" + }, + "regen:projectSize": { + "qudt:unit": "unit:HA", + "qudt:numericValue": 0 + }, + "regen:projectActivity": { + "schema:name": "", + "schema:url": "" + }, + "regen:projectDeveloper": { + "@type": "regen:Organization", + "schema:name": "", + "schema:url": "", + "schema:description": "", + "regen:address": "" + }, + "regen:projectVerifier": { + "@type": "regen:Organization", + "schema:name": "", + "schema:url": "", + "schema:description": "", + "regen:address": "" + }, + "regen:offsetGenerationMethod": [ + "" + ], + "regen:projectType": "", + "regen:projectStartDate": "", + "regen:projectEndDate": "", + "regen:ratings": [ + { + "schema:name": "", + "schema:ratingValue": "", + "schema:url": "" + } + ] +} diff --git a/ops/C01/credit-class-metadata/C01-verified-carbon-standard-credit-class.jsonld b/ops/C01/credit-class-metadata/C01-verified-carbon-standard-credit-class.jsonld index 34f4251..02412f3 100644 --- a/ops/C01/credit-class-metadata/C01-verified-carbon-standard-credit-class.jsonld +++ b/ops/C01/credit-class-metadata/C01-verified-carbon-standard-credit-class.jsonld @@ -14,6 +14,9 @@ }, "regen:offsetGenerationMethod": { "@container": "@list" + }, + "regen:certifications": { + "@container": "@list" } }, "@type": "regen:C01-CreditClass", @@ -320,5 +323,11 @@ ], "schema:url": "https://library.regen.network/v/regen-registry-credit-classes/credits-from-other-registries/verified-carbon-standard-credit-class/approved-methodologies" }, - "regen:verificationMethod": "Third-party verified" + "regen:verificationMethod": "Third-party verified", + "regen:certifications": [ + { + "schema:name": "ICROA approved", + "schema:url": "https://icroa.org/" + } + ] } diff --git a/ops/C02/credit-class-metadata/C02-city-forest-credits-credit-class.jsonld b/ops/C02/credit-class-metadata/C02-city-forest-credits-credit-class.jsonld index cf12838..5f7991b 100644 --- a/ops/C02/credit-class-metadata/C02-city-forest-credits-credit-class.jsonld +++ b/ops/C02/credit-class-metadata/C02-city-forest-credits-credit-class.jsonld @@ -20,6 +20,9 @@ }, "regen:ecosystemType": { "@container": "@list" + }, + "regen:certifications": { + "@container": "@list" } }, "@type": "regen:C02-CreditClass", @@ -60,5 +63,11 @@ "regen:carbonOffsetStandard": { "schema:name": "City Forest Credits Standard", "schema:url": "https://www.cityforestcredits.org/wp-content/uploads/2022/03/City-Forest-Credits-Standard-V2.pdf" - } + }, + "regen:certifications": [ + { + "schema:name": "ICROA approved", + "schema:url": "https://icroa.org/" + } + ] } diff --git a/ops/C03/credit-class-metadata/C03-Toucan-TCO2-class.jsonld b/ops/C03/credit-class-metadata/C03-Toucan-TCO2-class.jsonld index c8b241f..aa2994d 100644 --- a/ops/C03/credit-class-metadata/C03-Toucan-TCO2-class.jsonld +++ b/ops/C03/credit-class-metadata/C03-Toucan-TCO2-class.jsonld @@ -332,5 +332,11 @@ "Avoided Conversion of Grasslands and Shrublands (ACoGS)", "Wetlands Restoration and Conservation (WRC)" ], - "regen:tokenizationSource": "Toucan" + "regen:tokenizationSource": "Toucan", + "regen:certifications": [ + { + "schema:name": "ICROA approved", + "schema:url": "https://icroa.org/" + } + ] } diff --git a/ops/C03/project-metadata/C03-001-project.jsonld b/ops/C03/project-metadata/C03-001-project.jsonld index 5142f15..f660d50 100644 --- a/ops/C03/project-metadata/C03-001-project.jsonld +++ b/ops/C03/project-metadata/C03-001-project.jsonld @@ -62,10 +62,11 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "AAA", - "schema:url": "https://bezerocarbon.com/listings/?filter=rimba+raya" - } + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "AAA", + "schema:url": "https://bezerocarbon.com/listings/?filter=rimba+raya" + } + ] } \ No newline at end of file diff --git a/ops/C03/project-metadata/C03-002-project.jsonld b/ops/C03/project-metadata/C03-002-project.jsonld index e512ab6..35ed869 100644 --- a/ops/C03/project-metadata/C03-002-project.jsonld +++ b/ops/C03/project-metadata/C03-002-project.jsonld @@ -58,10 +58,11 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "B", - "schema:url": "https://bezerocarbon.com/listings/?filter=RIU+sm" - } + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "B", + "schema:url": "https://bezerocarbon.com/listings/?filter=RIU+sm" + } + ] } \ No newline at end of file diff --git a/ops/C03/project-metadata/C03-003-project.jsonld b/ops/C03/project-metadata/C03-003-project.jsonld index f4f28d6..be5840b 100644 --- a/ops/C03/project-metadata/C03-003-project.jsonld +++ b/ops/C03/project-metadata/C03-003-project.jsonld @@ -57,10 +57,11 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "AAA-", - "schema:url": "https://bezerocarbon.com/listings/?filter=keo+seima" - } + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "AAA-", + "schema:url": "https://bezerocarbon.com/listings/?filter=keo+seima" + } + ] } \ No newline at end of file diff --git a/ops/C03/project-metadata/C03-004-project.jsonld b/ops/C03/project-metadata/C03-004-project.jsonld index c248746..defafb9 100644 --- a/ops/C03/project-metadata/C03-004-project.jsonld +++ b/ops/C03/project-metadata/C03-004-project.jsonld @@ -57,10 +57,11 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "BBB", - "schema:url": "https://bezerocarbon.com/listings/?filter=kasigau" - } + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "BBB", + "schema:url": "https://bezerocarbon.com/listings/?filter=kasigau" + } + ] } \ No newline at end of file diff --git a/ops/C03/project-metadata/C03-006-project.jsonld b/ops/C03/project-metadata/C03-006-project.jsonld index 2c37d56..8bbfc5a 100644 --- a/ops/C03/project-metadata/C03-006-project.jsonld +++ b/ops/C03/project-metadata/C03-006-project.jsonld @@ -57,10 +57,11 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "AA-", - "schema:url": "https://bezerocarbon.com/listings/?filter=mai+ndombe" - } + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "AA-", + "schema:url": "https://bezerocarbon.com/listings/?filter=mai+ndombe" + } + ] } \ No newline at end of file diff --git a/ops/C03/project-metadata/C03-007-project.jsonld b/ops/C03/project-metadata/C03-007-project.jsonld index f065258..0cd070d 100644 --- a/ops/C03/project-metadata/C03-007-project.jsonld +++ b/ops/C03/project-metadata/C03-007-project.jsonld @@ -60,10 +60,11 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "C", - "schema:url": "https://bezerocarbon.com/listings/?filter=pacajai" - } + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "C", + "schema:url": "https://bezerocarbon.com/listings/?filter=pacajai" + } + ] } \ No newline at end of file diff --git a/ops/C03/project-metadata/C03-008-project.jsonld b/ops/C03/project-metadata/C03-008-project.jsonld index 9149612..2a81b65 100644 --- a/ops/C03/project-metadata/C03-008-project.jsonld +++ b/ops/C03/project-metadata/C03-008-project.jsonld @@ -23,12 +23,13 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "BB", - "schema:url": "https://bezerocarbon.com/listings/?filter=INNER+MONGOLIA+CHAO%E2%80%99ER+IMPROVED+FOREST+MANAGEMENT+PROJECT" - }, + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "BB", + "schema:url": "https://bezerocarbon.com/listings/?filter=INNER+MONGOLIA+CHAO%E2%80%99ER+IMPROVED+FOREST+MANAGEMENT+PROJECT" + } + ], "schema:location": { "@context": { "type": "@type", diff --git a/ops/C03/project-metadata/C03-009-project.jsonld b/ops/C03/project-metadata/C03-009-project.jsonld index fff4e66..410dead 100644 --- a/ops/C03/project-metadata/C03-009-project.jsonld +++ b/ops/C03/project-metadata/C03-009-project.jsonld @@ -23,12 +23,13 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "BB", - "schema:url": "https://bezerocarbon.com/listings/?filter=1577" - }, + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "BB", + "schema:url": "https://bezerocarbon.com/listings/?filter=1577" + } + ], "schema:location": { "@context": { "type": "@type", diff --git a/ops/C03/project-metadata/C03-010-project.jsonld b/ops/C03/project-metadata/C03-010-project.jsonld index 592450b..879722d 100644 --- a/ops/C03/project-metadata/C03-010-project.jsonld +++ b/ops/C03/project-metadata/C03-010-project.jsonld @@ -23,12 +23,13 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "B", - "schema:url": "https://bezerocarbon.com/listings/?filter=1542" - }, + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "B", + "schema:url": "https://bezerocarbon.com/listings/?filter=1542" + } + ], "schema:location": { "@context": { "type": "@type", diff --git a/ops/C03/project-metadata/C03-011-project.jsonld b/ops/C03/project-metadata/C03-011-project.jsonld index b334b5f..fe3b814 100644 --- a/ops/C03/project-metadata/C03-011-project.jsonld +++ b/ops/C03/project-metadata/C03-011-project.jsonld @@ -23,12 +23,13 @@ } ] }, - "regen:rating": { - "@type": "regen:BeZeroCarbon", - "schema:name": "BeZero Carbon", - "schema:ratingValue": "BBB", - "schema:url": "https://bezerocarbon.com/listings/?filter=1162" - }, + "regen:ratings": [ + { + "schema:name": "BeZero Carbon", + "schema:ratingValue": "BBB", + "schema:url": "https://bezerocarbon.com/listings/?filter=1162" + } + ], "schema:location": { "@context": { "type": "@type", diff --git a/shacl/common.ttl b/shacl/common.ttl index f2b7633..93e5199 100644 --- a/shacl/common.ttl +++ b/shacl/common.ttl @@ -63,3 +63,22 @@ regen:ApprovedMethodologiesPropertyShape sh:path regen:approvedMethodologies ; sh:datatype schema:URL ; ] ; . + +regen:NameUrlShape a sh:NodeShape ; + sh:property regen:RequiredNamePropertyShape ; + sh:property regen:RequiredUrlPropertyShape ; +. + +regen:RequiredNamePropertyShape sh:path schema:name ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + sh:datatype xsd:string ; +. + +regen:RequiredUrlPropertyShape sh:path schema:url ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + sh:datatype schema:URL ; +. \ No newline at end of file diff --git a/shacl/credit-classes/credit-class.ttl b/shacl/credit-classes/credit-class.ttl index b71562e..368c041 100644 --- a/shacl/credit-classes/credit-class.ttl +++ b/shacl/credit-classes/credit-class.ttl @@ -54,4 +54,39 @@ regen:CreditClassShape a sh:NodeShape ; sh:datatype xsd:string ; ] ; sh:property regen:ApprovedMethodologiesPropertyShape ; + sh:property [ + sh:path regen:certifications; + sh:node dash:ListShape ; + sh:property [ + sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; + sh:node regen:NameUrlShape; + ] ; + sh:maxCount 1 ; + ] +. + +regen:MethodologyVersionShape a sh:NodeShape ; + sh:property [ + sh:path schema:url ; + sh:datatype schema:URL ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path schema:name ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + ] ; + sh:property [ + sh:path schema:identifier ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path schema:version ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + ] ; . diff --git a/shacl/projects/C01-project.ttl b/shacl/projects/C01-project.ttl index ee1dbcd..b0bab9c 100644 --- a/shacl/projects/C01-project.ttl +++ b/shacl/projects/C01-project.ttl @@ -1,12 +1,5 @@ -@prefix schema: . @prefix sh: . -@prefix xsd: . @prefix regen: . -@prefix qudt: . -@prefix unit: . -@prefix geojson: . -@prefix dash: . -@prefix rdf: . @prefix rdfs: . regen:C01-Project rdfs:subClassOf regen:Project . @@ -15,73 +8,14 @@ regen:C01-Project rdfs:subClassOf regen:Project . regen:C01-ProjectShape a sh:NodeShape ; sh:targetClass regen:C01-Project ; - sh:property regen:NamePropertyShape ; - sh:property regen:LocationPropertyShape ; sh:property regen:ProjectSizePropertyShape ; sh:property regen:ProjectActivityPropertyShape ; sh:property regen:ProjectStartDatePropertyShape ; sh:property regen:ProjectEndDatePropertyShape ; sh:property regen:ProjectTypePropertyShape ; - sh:property regen:ProjectDeveloperPropertyShape ; - sh:property regen:ProjectVerifierPropertyShape ; sh:property regen:OffsetGenerationMethodPropertyShape ; sh:property regen:VCSProjectIdPropertyShape ; sh:property regen:VCSProjectPagePropertyShape ; sh:property regen:VCSMethodologyPropertyShape . -regen:NameUrlShape a sh:NodeShape ; - sh:targetClass regen:NameUrl; - sh:property regen:RequiredNamePropertyShape ; - sh:property regen:RequiredUrlPropertyShape ; -. - -regen:NameUrlVersionShape a sh:NodeShape ; - sh:targetClass regen:NameUrlVersionUrl; - sh:property regen:RequiredNamePropertyShape ; - sh:property regen:RequiredUrlPropertyShape ; - sh:property regen:RequiredVersionPropertyShape ; -. - -regen:RequiredNamePropertyShape sh:path schema:name ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype xsd:string ; - sh:group regen:ProjectPageMetadataGroup ; -. - -regen:RequiredUrlPropertyShape sh:path schema:url ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:datatype schema:URL ; - sh:group regen:ProjectPageMetadataGroup ; -. - -regen:RequiredVersionPropertyShape sh:path schema:version ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:group regen:ProjectPageMetadataGroup ; - sh:datatype xsd:string ; -. - -regen:ProjectSizeShape a sh:NodeShape ; - sh:property [ - sh:path qudt:unit ; - sh:datatype qudt:Unit ; - sh:in ( "unit:HA"^^qudt:Unit "unit:AC"^^qudt:Unit ) ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:group regen:ProjectPageBasicInfoGroup ; - ] ; - sh:property [ - sh:path qudt:numericValue ; - sh:minExclusive 0 ; - sh:datatype xsd:double ; - sh:maxCount 1 ; - sh:maxCount 1 ; - sh:group regen:ProjectPageBasicInfoGroup ; - ] ; -. diff --git a/shacl/projects/C02-project.ttl b/shacl/projects/C02-project.ttl index 05e039f..8557bc6 100644 --- a/shacl/projects/C02-project.ttl +++ b/shacl/projects/C02-project.ttl @@ -1,18 +1,12 @@ @prefix schema: . @prefix sh: . -@prefix xsd: . @prefix regen: . -@prefix qudt: . -@prefix unit: . -@prefix geojson: . -@prefix dash: . -@prefix rdf: . @prefix rdfs: . +regen:C02-Project rdfs:subClassOf regen:Project . + regen:C02-ProjectShape a sh:NodeShape ; sh:targetClass regen:C02-Project ; - sh:property regen:NamePropertyShape ; - sh:property regen:LocationPropertyShape ; sh:property regen:ProjectSizePropertyShape ; sh:property regen:ProjectActivityPropertyShape ; sh:property regen:ProjectStartDatePropertyShape ; @@ -22,8 +16,6 @@ regen:C02-ProjectShape a sh:NodeShape ; sh:property regen:OffsetGenerationMethodPropertyShape ; sh:property regen:CFCProjectIdPropertyShape ; sh:property regen:CFCProjectPagePropertyShape ; - sh:property regen:ProjectDeveloperPropertyShape ; - sh:property regen:ProjectVerifierPropertyShape ; sh:property regen:ProjectDesignDocumentPropertyShape ; sh:property regen:OffsetProtocolPropertyShape ; . diff --git a/shacl/projects/C03-project.ttl b/shacl/projects/C03-project.ttl index 4bdbfc7..0bc7cc8 100644 --- a/shacl/projects/C03-project.ttl +++ b/shacl/projects/C03-project.ttl @@ -1,13 +1,13 @@ @prefix sh: . @prefix xsd: . @prefix regen: . -@prefix schema: . +@prefix rdfs: . + +regen:C03-Project rdfs:subClassOf regen:Project . regen:C03-ProjectShape a sh:NodeShape ; sh:targetClass regen:C03-Project ; - sh:property regen:NamePropertyShape ; - sh:property regen:LocationPropertyShape ; sh:property [ sh:path regen:toucanProjectTokenId ; sh:datatype xsd:integer ; @@ -19,36 +19,4 @@ regen:C03-ProjectShape a sh:NodeShape ; sh:property regen:ToucanURIPropertyShape ; sh:property regen:ApprovedMethodologiesPropertyShape ; - - sh:property regen:OffsetGenerationMethodOptionalPropertyShape ; - sh:property regen:ProjectActivityOptionalPropertyShape ; - sh:property regen:ProjectTypeOptionalPropertyShape ; - sh:property regen:ProjectOptionalStartDatePropertyShape ; - sh:property regen:ProjectOptionalEndDatePropertyShape ; - - sh:property [ - sh:path regen:rating ; - sh:node regen:BeZeroCarbon ; - sh:property [ - sh:path schema:name ; - sh:datatype xsd:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - sh:path schema:ratingValue ; - sh:datatype xsd:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - sh:path schema:url ; - sh:datatype schema:URL ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - ] . diff --git a/shacl/projects/common.ttl b/shacl/projects/common.ttl index a1f7bb0..11741fc 100644 --- a/shacl/projects/common.ttl +++ b/shacl/projects/common.ttl @@ -6,6 +6,8 @@ @prefix geojson: . @prefix dash: . @prefix rdf: . +@prefix qudt: . +@prefix unit: . regen:NamePropertyShape sh:path schema:name ; sh:minCount 1 ; @@ -28,6 +30,25 @@ regen:LocationPropertyShape sh:path schema:location ; sh:group regen:ProjectPageLocationGroup ; . +regen:ProjectSizeShape a sh:NodeShape ; + sh:property [ + sh:path qudt:unit ; + sh:datatype qudt:Unit ; + sh:in ( "unit:HA"^^qudt:Unit "unit:AC"^^qudt:Unit ) ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:group regen:ProjectPageBasicInfoGroup ; + ] ; + sh:property [ + sh:path qudt:numericValue ; + sh:minExclusive 0 ; + sh:datatype xsd:double ; + sh:maxCount 1 ; + sh:maxCount 1 ; + sh:group regen:ProjectPageBasicInfoGroup ; + ] ; +. + regen:ProjectSizePropertyShape sh:path regen:projectSize ; sh:node regen:ProjectSizeShape ; sh:minCount 1 ; @@ -35,6 +56,12 @@ regen:ProjectSizePropertyShape sh:path regen:projectSize ; sh:group regen:ProjectPageBasicInfoGroup ; . +regen:ProjectSizeOptionalPropertyShape sh:path regen:projectSize ; + sh:node regen:ProjectSizeShape ; + sh:maxCount 1 ; + sh:group regen:ProjectPageBasicInfoGroup ; +. + regen:ProjectActivityPropertyShape sh:path regen:projectActivity ; sh:minCount 1 ; sh:maxCount 1 ; @@ -192,12 +219,6 @@ regen:ProjectRoleShape regen:IndividualDisplay , regen:Organization , regen:OrganizationDisplay ; - sh:property [ - sh:path regen:showOnProjectPage ; - sh:datatype xsd:boolean ; - sh:hasValue true ; - sh:group regen:ProjectPageRolesGroup ; - ] ; sh:property [ sh:path schema:name ; sh:datatype xsd:string ; @@ -225,6 +246,21 @@ regen:ProjectRoleShape ] ; . +regen:NameUrlVersionShape a sh:NodeShape ; + sh:targetClass regen:NameUrlVersionUrl; + sh:property regen:RequiredNamePropertyShape ; + sh:property regen:RequiredUrlPropertyShape ; + sh:property regen:RequiredVersionPropertyShape ; +. + +regen:RequiredVersionPropertyShape sh:path schema:version ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + sh:group regen:ProjectPageMetadataGroup ; + sh:datatype xsd:string ; +. + # Groups regen:ProjectPageBasicInfoGroup diff --git a/shacl/projects/project.ttl b/shacl/projects/project.ttl index d891211..ecf426a 100644 --- a/shacl/projects/project.ttl +++ b/shacl/projects/project.ttl @@ -1,114 +1,57 @@ -@prefix dash: . -@prefix rdf: . -@prefix rdfs: . @prefix schema: . @prefix sh: . @prefix xsd: . @prefix regen: . +@prefix geojson: . +@prefix dash: . +@prefix rdf: . +@prefix rdfs: . -# regen:ProjectShape defines generic metadata that goes -# into the project.metadata column in the Postgres database. -# -# Note that project.metadata can also store other kind of data -# than is defined as part of other SHACL shapes (e.g. regen:ProjectPageShape -# used for validating self-service project page forms). +# Anchored -regen:ProjectShape - a rdfs:Class, sh:NodeShape ; +regen:ProjectShape a sh:NodeShape ; sh:targetClass regen:Project ; - rdfs:subClassOf rdfs:Resource ; - sh:property [ - sh:path regen:projectActivity ; - sh:node regen:NameURLShape ; - ] ; - sh:property [ - sh:path regen:additionalCertification ; - sh:node regen:StandardShape ; - ] ; - sh:property [ - sh:path regen:externalProjectUrl ; - sh:datatype schema:URL ; - ] ; - sh:property [ - sh:path schema:creditText ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path regen:glanceText ; + sh:property regen:NamePropertyShape ; + sh:property regen:LocationPropertyShape ; + sh:property regen:ProjectSizeOptionalPropertyShape ; + sh:property regen:ProjectActivityOptionalPropertyShape ; + sh:property regen:ProjectDeveloperPropertyShape ; + sh:property regen:ProjectVerifierPropertyShape ; + sh:property regen:OffsetGenerationMethodOptionalPropertyShape ; + sh:property regen:ProjectTypeOptionalPropertyShape ; + sh:property regen:ProjectOptionalStartDatePropertyShape ; + sh:property regen:ProjectOptionalEndDatePropertyShape ; + sh:property [ + sh:path regen:ratings ; sh:node dash:ListShape ; sh:property [ sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; - sh:datatype xsd:string ; + sh:minLength 1 ; + sh:node [ + sh:property [ + sh:path schema:name ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + ] ; + sh:property [ + sh:path schema:ratingValue ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + ] ; + sh:property [ + sh:path schema:url ; + sh:datatype schema:URL ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + ] ; + ] ] ; - ] ; - sh:property [ - sh:path regen:landManagementActions ; - sh:node dash:ListShape ; - sh:property [ - sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; - sh:node regen:LandManagementActionShape ; - ] ; - ] ; -. - -regen:LandManagementActionShape - a rdfs:Class, sh:NodeShape ; - sh:property [ - sh:path schema:image ; - sh:datatype schema:URL ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:name ; - sh:datatype xsd:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - sh:path schema:description ; - sh:datatype xsd:string ; - sh:minCount 1 ; sh:maxCount 1 ; - sh:minLength 1 ; - ] ; + ] . -regen:StandardShape - a rdfs:Class, sh:NodeShape ; - sh:property [ - sh:path schema:name ; - sh:datatype xsd:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:version ; - sh:datatype xsd:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path regen:documentId ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path schema:url ; - sh:datatype schema:URL ; - ] ; -. - -regen:NameURLShape - a rdfs:Class, sh:NodeShape ; - sh:property [ - sh:path schema:name ; - sh:datatype xsd:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:url ; - sh:datatype schema:URL ; - ] ; -. diff --git a/shacl/projects/project.ttl.legacy b/shacl/projects/project.ttl.legacy new file mode 100644 index 0000000..d891211 --- /dev/null +++ b/shacl/projects/project.ttl.legacy @@ -0,0 +1,114 @@ +@prefix dash: . +@prefix rdf: . +@prefix rdfs: . +@prefix schema: . +@prefix sh: . +@prefix xsd: . +@prefix regen: . + +# regen:ProjectShape defines generic metadata that goes +# into the project.metadata column in the Postgres database. +# +# Note that project.metadata can also store other kind of data +# than is defined as part of other SHACL shapes (e.g. regen:ProjectPageShape +# used for validating self-service project page forms). + +regen:ProjectShape + a rdfs:Class, sh:NodeShape ; + sh:targetClass regen:Project ; + rdfs:subClassOf rdfs:Resource ; + sh:property [ + sh:path regen:projectActivity ; + sh:node regen:NameURLShape ; + ] ; + sh:property [ + sh:path regen:additionalCertification ; + sh:node regen:StandardShape ; + ] ; + sh:property [ + sh:path regen:externalProjectUrl ; + sh:datatype schema:URL ; + ] ; + sh:property [ + sh:path schema:creditText ; + sh:datatype xsd:string ; + ] ; + sh:property [ + sh:path regen:glanceText ; + sh:node dash:ListShape ; + sh:property [ + sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; + sh:datatype xsd:string ; + ] ; + ] ; + sh:property [ + sh:path regen:landManagementActions ; + sh:node dash:ListShape ; + sh:property [ + sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; + sh:node regen:LandManagementActionShape ; + ] ; + ] ; +. + +regen:LandManagementActionShape + a rdfs:Class, sh:NodeShape ; + sh:property [ + sh:path schema:image ; + sh:datatype schema:URL ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path schema:name ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + ] ; + sh:property [ + sh:path schema:description ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:minLength 1 ; + ] ; +. + +regen:StandardShape + a rdfs:Class, sh:NodeShape ; + sh:property [ + sh:path schema:name ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path schema:version ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path regen:documentId ; + sh:datatype xsd:string ; + ] ; + sh:property [ + sh:path schema:url ; + sh:datatype schema:URL ; + ] ; +. + +regen:NameURLShape + a rdfs:Class, sh:NodeShape ; + sh:property [ + sh:path schema:name ; + sh:datatype xsd:string ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path schema:url ; + sh:datatype schema:URL ; + ] ; +.