tbox: v1.6 - provenance portee par les classes concretes, isAbstract declare et non plus infere, ForeignKeyConstraint devient ForeignKey, les dix classes sans rdfs:comment completees

This commit is contained in:
Bastien Gourdon
2026-08-05 09:13:12 +02:00
parent f83b7d7491
commit 1c8ab77003
20 changed files with 4770 additions and 1081 deletions
+15 -15
View File
@@ -53,19 +53,19 @@ prs:DefinedObjectShape a sh:NodeShape ;
rdfs:comment "Applies to everything governance writes. Captured objects are deliberately exempt: see CapturedObjectShape." ;
sh:property [
sh:path pr:hasIdentifier ; sh:datatype xsd:string ;
sh:path pr:identifier ; sh:datatype xsd:string ;
sh:minCount 1 ; sh:maxCount 1 ;
sh:severity sh:Violation ;
sh:message "DQ-001 -- every defined object carries exactly one identifier. NOTE: uniqueness across the graph is NOT tested here; SHACL checks cardinality only. The reconciliation job tests uniqueness." ] ;
sh:property [
sh:path pr:hasName ; sh:datatype xsd:string ;
sh:path pr:name ; sh:datatype xsd:string ;
sh:minCount 1 ; sh:maxCount 1 ; sh:minLength 3 ;
sh:severity sh:Violation ;
sh:message "Every defined object carries exactly one canonical name." ] ;
sh:property [
sh:path pr:hasStatus ; sh:minCount 1 ;
sh:path pr:status ; sh:minCount 1 ;
sh:in ( "DRAFT" "UNDER_REVIEW" "PUBLISHED" "DEPRECATED" "RETIRED" ) ;
sh:severity sh:Violation ;
sh:message "LC-001 -- status must be one of DRAFT, UNDER_REVIEW, PUBLISHED, DEPRECATED, RETIRED." ] ;
@@ -76,7 +76,7 @@ prs:DefinedObjectShape a sh:NodeShape ;
sh:message "OW-001 -- at most one owning Data Domain. On a Data Element this may be re-declared to differ from the parent chain: that marks a borrowed element." ] ;
sh:property [
sh:path pr:hasVersion ; sh:maxCount 1 ;
sh:path pr:version ; sh:maxCount 1 ;
sh:severity sh:Warning ;
sh:message "A published object should carry a version." ] .
@@ -91,7 +91,7 @@ prs:PublishedShape a sh:NodeShape ;
sh:select """
PREFIX pr: <https://ontology.pernod-ricard.com/metamodel/>
SELECT $this WHERE {
$this pr:hasStatus "PUBLISHED" ;
$this pr:status "PUBLISHED" ;
pr:arbitrationStatus "TO_ARBITRATE" .
}""" ] ;
@@ -101,7 +101,7 @@ prs:PublishedShape a sh:NodeShape ;
sh:select """
PREFIX pr: <https://ontology.pernod-ricard.com/metamodel/>
SELECT $this WHERE {
$this pr:hasStatus "PUBLISHED" .
$this pr:status "PUBLISHED" .
FILTER NOT EXISTS { $this pr:owningDomain ?d }
}""" ] .
@@ -223,7 +223,7 @@ prs:BusinessObjectShape a sh:NodeShape ;
sh:message "The Business Object is where a steward is declared -- Data Objects and Data Elements inherit from here." ] ;
sh:property [
sh:path pr:hasBusinessDefinition ; sh:maxCount 0 ;
sh:path pr:businessDefinition ; sh:maxCount 0 ;
sh:severity sh:Violation ;
sh:message "A Business Object carries no definition of its own: meaning belongs to the Business Concept named by aboutConcept. Two definitions for one notion are two definitions free to diverge. MIGRATION: move the text to that Concept." ] ;
@@ -242,13 +242,13 @@ prs:BusinessConceptShape a sh:NodeShape ;
rdfs:comment "Note what is NOT here: no requirement that a Concept be realized by any Data Element or measured by any Metric. The business layer is allowed to run ahead of the data. Coverage is a dashboard metric, not a rule." ;
sh:property [
sh:path pr:hasBusinessDefinition ; sh:datatype xsd:string ;
sh:path pr:businessDefinition ; sh:datatype xsd:string ;
sh:minCount 1 ; sh:maxCount 1 ; sh:minLength 20 ;
sh:severity sh:Violation ;
sh:message "A Business Concept exists to carry meaning: it must hold exactly one business definition of at least 20 characters." ] ;
sh:property [
sh:path pr:hasFormula ; sh:maxCount 0 ;
sh:path pr:formula ; sh:maxCount 0 ;
sh:severity sh:Violation ;
sh:message "BR-003 -- the presence of a formula is what makes something a Metric. A Concept with a formula is a misclassified Metric." ] ;
@@ -262,13 +262,13 @@ prs:MetricShape a sh:NodeShape ;
sh:targetClass pr:Metric ;
sh:property [
sh:path pr:hasFormula ; sh:datatype xsd:string ;
sh:path pr:formula ; sh:datatype xsd:string ;
sh:minCount 1 ; sh:maxCount 1 ;
sh:severity sh:Violation ;
sh:message "BR-003 -- a Metric is a measurement with a calculation rule. No formula, no Metric." ] ;
sh:property [
sh:path pr:hasUnit ; sh:minCount 1 ;
sh:path pr:unit ; sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "A Metric states every unit its variants are expressed in. NOT capped at one: Sell Out Volume is computed in 9L and in L, Sell Out Value in EUR, USD and local currency. The single-unit rule belongs on the Data Element, where it holds -- see DataElementShape." ] ;
@@ -331,7 +331,7 @@ prs:MotherMetricShape a sh:NodeShape ;
sh:select """
PREFIX pr: <https://ontology.pernod-ricard.com/metamodel/>
SELECT $this WHERE {
$this pr:hasStatus "PUBLISHED" .
$this pr:status "PUBLISHED" .
FILTER NOT EXISTS { $this pr:computedBy ?de }
}""" ] .
@@ -413,7 +413,7 @@ prs:DataElementShape a sh:NodeShape ;
sh:severity sh:Info ] ;
sh:property [
sh:path pr:hasUnit ; sh:maxCount 1 ;
sh:path pr:unit ; sh:maxCount 1 ;
sh:severity sh:Violation ;
sh:message "A Data Element carries exactly one unit. This is the counterpart of the Metric rule: the mother metric lists the units its variants use, each variant states the single unit it is actually expressed in. An element with two units is two elements." ] ;
@@ -508,12 +508,12 @@ prs:BIFieldShape a sh:NodeShape ;
prs:NamingShape a sh:NodeShape ;
sh:targetClass pr:DefinedObject ;
sh:property [
sh:path pr:hasName ;
sh:path pr:name ;
sh:not [ sh:pattern "_NM$" ] ;
sh:severity sh:Warning ;
sh:message "NR-001 -- a canonical name must not end in a physical suffix. Written as sh:not[sh:pattern] rather than a lookbehind: sh:pattern is normatively XPath 2.0 regex, which has no lookbehind, so the v0.1.1 form only worked under pySHACL." ] ;
sh:property [
sh:path pr:hasName ;
sh:path pr:name ;
sh:not [ sh:pattern "^[a-z_]+$" ] ;
sh:severity sh:Warning ;
sh:message "NR-002 -- a canonical name is written for humans, not as a snake_case identifier." ] .