https://cacontology.projectvic.org/detection#PerceptualHashGUFOShape
Validates perceptual hash instances with gUFO foundational constraints.
Instances of cacontology-detection:PerceptualHash can have the following properties:
PROPERTY |
MIN COUNT |
MAX COUNT |
TYPE |
|
|---|---|---|---|---|
| cacontology-detection:PerceptualHash | ||||
| cacontology-detection:hashAlgorithm | 1 | 1 |
xsd:string
|
|
| cacontology-detection:perceptualHashValue | 1 | 1 |
xsd:string
|
|
| 1 | ||||
@prefix cacontology-detection: <https://cacontology.projectvic.org/detection#> .
@prefix gufo: <http://purl.org/nemo/gufo#> .
@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:hasValue gufo:Object ;
sh:message "Perceptual hash must be typed as gUFO Object"@en ;
sh:minCount 1 ;
sh:path rdf:type ],
[ 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 .