Ontology Version: 2.2.0

cacontology-us-ncmec1:ProcessingTimeValidationShape leaf node


URI

https://cacontology.projectvic.org/us/ncmec#ProcessingTimeValidationShape

Label

Processing Time Validation Shape

Description

Validates processing time reasonableness.

Implementation

@prefix cacontology-us-ncmec1: <https://cacontology.projectvic.org/us/ncmec#> .
@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-us-ncmec1:ProcessingTimeValidationShape a sh:NodeShape ;
    rdfs:label "Processing Time Validation Shape"@en ;
    rdfs:comment "Validates processing time reasonableness."@en ;
    sh:sparql [ sh:message "Processing time should be consistent with start and end times."@en ;
            sh:prefixes [ sh:declare [ sh:namespace "https://cacontology.projectvic.org/us/ncmec#"^^xsd:anyURI ;
                            sh:prefix "icacus" ],
                        [ sh:namespace "https://ontology.unifiedcyberontology.org/uco/core/"^^xsd:anyURI ;
                            sh:prefix "uco-core" ] ] ;
            sh:select """
            SELECT $this WHERE {
                $this uco-core:startTime ?start ;
                      uco-core:endTime ?end ;
                      cacontology-us-ncmec:processingTime ?declaredTime .
                BIND((?end - ?start) / 3600 AS ?actualHours)
                FILTER (ABS(?actualHours - ?declaredTime) > 1.0)
            }
        """ ] ;
    sh:targetClass cacontology-us-ncmec1:TipProcessing .