Code development platform for open source projects from the European Union institutions 🔵 EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content

Main classification (CPV code) is valid

Rule Definition

Main classification (CPV code) is a value from NAL "CPV".


Additional Information

Rule elaboration

Validity Business Rule with ID VAL007 as defined in deliverable D06.06 – Data Quality Action Plan.

Ontology property involved: http://data.europa.eu/a4g/ontology#hasMainClassification

Link to the NAL: https://op.europa.eu/en/web/eu-vocabularies/concept-scheme/-/resource?uri=http://data.europa.eu/cpv/cpv

NAL stands for "Name authority list"

Rule source

https://code.europa.eu/eproc/ppds/documentation/-/blob/main/documents/d0606_data_quality_action_plan.md#22-validity-business-rules

Rule implementation

ppsh:Purpose-hasMainClassification-values

Implementation note

Implementation in PPDS SHACL shapes graph:

ppsh:Purpose-hasMainClassification-values a sh:SPARQLConstraint ;
    sh:description "The CPV code must be listed in the applicable controlled list." ;
    sh:severity sh:Warning ;
    sh:message "VAL007" ;
    sh:name "Main classification (CPV code) is valid" ;
	sh:targetClass epo:Purpose ;
    sh:select """
        PREFIX epo: <http://data.europa.eu/a4g/ontology#>
        SELECT $this (epo:hasMainClassification AS ?path) (?mainClassification AS ?value) WHERE {
			$this a epo:Purpose .
			$this epo:hasMainClassification ?mainClassification .
			?mainClassification skos:inScheme <http://data.europa.eu/cpv/cpv> .
		}

https://sdlc.webcloud.ec.europa.eu/ppds/docker/ppds-shacl-shapes/-/blob/featured/revision_0.3.3/ppds-shapes.ttl?ref_type=heads

Related rules

#54

#76

Related generic rule

(If the rule is a specialisation of a generic rule registered in this Rulebook, the URL of that generic rule is provided here)

History note

(If applicable, add here a note about a previous state of the rule, before the Rulebook)

Edited by Enrique Jose Barcala Soto