Ontology Version: 3.1.0

cacontology-corruption-shapes:CorruptionDataQualityShape leaf node


URI

https://cacontology.projectvic.org/law-enforcement-corruption/shapes#CorruptionDataQualityShape

Label

Corruption Data Quality Shape

Description

Comprehensive gUFO quality validation for law enforcement corruption data.

Property Constraints (3)

Focus nodes of this shape (cacontology-corruption:LawEnforcementCorruption) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
cacontology-corruption:hasDataCompleteness Data completeness measurement (0.0 to 1.0) - gUFO quality aspect.
sh:message Data completeness should be measured (0.0-1.0)
0 1 xsd:double
sh:minInclusive 0.0
sh:maxInclusive 1.0
sh:severity sh:Info
cacontology-corruption:hasDataQuality Data quality assessment (poor, fair, good, excellent, validated) - gUFO quality aspect.
sh:message Data quality level should be assessed
0 1 xsd:string
sh:in poor, fair, good, excellent, validated
sh:severity sh:Warning
cacontology-corruption:hasValidationLevel Validation thoroughness (none, basic, standard, comprehensive, full_verification) - gUFO quality aspect.
sh:message Validation thoroughness should be specified
0 1 xsd:string
sh:in none, basic, standard, comprehensive, full_verification
sh:severity sh:Info

Implementation

@prefix cacontology-corruption: <https://cacontology.projectvic.org/law-enforcement-corruption#> .
@prefix cacontology-corruption-shapes: <https://cacontology.projectvic.org/law-enforcement-corruption/shapes#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
cacontology-corruption-shapes:CorruptionDataQualityShape a sh:NodeShape ;
    rdfs:label "Corruption Data Quality Shape"@en ;
    rdfs:comment "Comprehensive gUFO quality validation for law enforcement corruption data."@en ;
    sh:property [ sh:datatype xsd:string ;
            sh:in ( "poor" "fair" "good" "excellent" "validated" ) ;
            sh:maxCount 1 ;
            sh:message "Data quality level should be assessed"@en ;
            sh:path cacontology-corruption:hasDataQuality ;
            sh:severity sh:Warning ],
        [ sh:datatype xsd:double ;
            sh:maxCount 1 ;
            sh:maxInclusive 1.0 ;
            sh:message "Data completeness should be measured (0.0-1.0)"@en ;
            sh:minInclusive 0.0 ;
            sh:path cacontology-corruption:hasDataCompleteness ;
            sh:severity sh:Info ],
        [ sh:datatype xsd:string ;
            sh:in ( "none" "basic" "standard" "comprehensive" "full_verification" ) ;
            sh:maxCount 1 ;
            sh:message "Validation thoroughness should be specified"@en ;
            sh:path cacontology-corruption:hasValidationLevel ;
            sh:severity sh:Info ] ;
    sh:sparql [ sh:message "Excellent data quality should have high completeness and comprehensive validation"@en ;
            sh:prefixes [ sh:declare [ sh:namespace "https://cacontology.projectvic.org/law-enforcement-corruption#"^^xsd:anyURI ;
                            sh:prefix "cacontology-corruption" ] ] ;
            sh:select """
            SELECT $this
            WHERE {
                $this cacontology-corruption:hasDataQuality "excellent" .
                OPTIONAL {
                    $this cacontology-corruption:hasDataCompleteness ?completeness .
                    FILTER (?completeness >= 0.8)
                }
                OPTIONAL {
                    $this cacontology-corruption:hasValidationLevel ?validation .
                    FILTER (?validation IN ("comprehensive", "full_verification"))
                }
                FILTER (!BOUND(?completeness) || !BOUND(?validation))
            }
        """ ;
            sh:severity sh:Warning ] ;
    sh:targetClass cacontology-corruption:LawEnforcementCorruption .