Ontology Version: 2.2.0

cacontology-asset-forfeiture:FinancialAccountShape leaf node


URI

https://cacontology.projectvic.org/asset-forfeiture#FinancialAccountShape

Label

Financial Account Shape

Description

Enhanced validation shape for financial accounts with gUFO Object validation and financial verification.

Shape Properties

Instances of cacontology-asset-forfeiture:FinancialAccount can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

cacontology-asset-forfeiture:FinancialAccount
cacontology-asset-forfeiture:accountFunds 0 1 xsd:decimal
1 1 xsd:string

Implementation

@prefix cacontology-asset-forfeiture: <https://cacontology.projectvic.org/asset-forfeiture#> .
@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-asset-forfeiture:FinancialAccountShape a sh:NodeShape ;
    rdfs:label "Financial Account Shape"@en ;
    rdfs:comment "Enhanced validation shape for financial accounts with gUFO Object validation and financial verification."@en ;
    sh:property [ sh:hasValue gufo:Object ;
            sh:message "Financial account must be instance of gUFO Object"@en ;
            sh:path rdf:type ],
        [ sh:datatype xsd:decimal ;
            sh:maxCount 1 ;
            sh:message "Account funds must be non-negative"@en ;
            sh:minCount 0 ;
            sh:minInclusive 0.0 ;
            sh:path cacontology-asset-forfeiture:accountFunds ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:message "Financial account must specify institution"@en ;
            sh:minCount 1 ;
            sh:minLength 2 ;
            sh:path cacontology-asset-forfeiture:financialInstitution ] ;
    sh:rule [ a sh:SPARQLRule ;
            sh:construct """
            INSERT { $this a cacontology-asset-forfeiture:FinancialVerificationError . }
            WHERE {
                $this a cacontology-asset-forfeiture:FinancialAccount .
                FILTER NOT EXISTS { 
                    $this cacontology-asset-forfeiture:hasVerification ?verification .
                    ?verification cacontology-asset-forfeiture:verificationType "institutional_records" .
                }
            }
        """ ;
            sh:message "Financial accounts must be verified through financial institution records"@en ;
            sh:prefixes cacontology-asset-forfeiture: ;
            sh:severity sh:Violation ] ;
    sh:targetClass cacontology-asset-forfeiture:FinancialAccount .