Ontology Version: 3.1.0

cacontology-detection:PerceptualHashGUFOShape leaf node


URI

https://cacontology.projectvic.org/detection#PerceptualHashGUFOShape

Label

gUFO Perceptual Hash Shape

Description

Validates perceptual hash instances with gUFO foundational constraints.

Targets (1)

Property Constraints (2)

Focus nodes of this shape (cacontology-detection:PerceptualHash) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
cacontology-detection:hashAlgorithm The specific algorithm used for perceptual hashing (e.g., 'pHash', 'aHash', 'dHash').
sh:message Hash algorithm must be from the allowed list
1 1 xsd:string
sh:in pHash, aHash, dHash, wHash, colorHash, blockHash
cacontology-detection:perceptualHashValue The perceptual hash value as a hexadecimal string.
sh:message Perceptual hash value must be a hexadecimal string (8-128 characters)
1 1 xsd:string
sh:pattern ^[0-9A-Fa-f]+$
sh:minLength 8
sh:maxLength 128

Implementation

@prefix cacontology-detection: <https://cacontology.projectvic.org/detection#> .
@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-detection:PerceptualHashGUFOShape a sh:NodeShape ;
    rdfs:label "gUFO Perceptual Hash Shape"@en ;
    rdfs:comment "Validates perceptual hash instances with gUFO foundational constraints."@en ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:maxLength 128 ;
            sh:message "Perceptual hash value must be a hexadecimal string (8-128 characters)"@en ;
            sh:minCount 1 ;
            sh:minLength 8 ;
            sh:path cacontology-detection:perceptualHashValue ;
            sh:pattern "^[0-9A-Fa-f]+$" ],
        [ sh:datatype xsd:string ;
            sh:in ( "pHash" "aHash" "dHash" "wHash" "colorHash" "blockHash" ) ;
            sh:maxCount 1 ;
            sh:message "Hash algorithm must be from the allowed list"@en ;
            sh:minCount 1 ;
            sh:path cacontology-detection:hashAlgorithm ] ;
    sh:targetClass cacontology-detection:PerceptualHash .