Ontology Version: 2.2.0

cacontology-street:LocationTransitionValidationShape leaf node


URI

https://cacontology.projectvic.org/street#LocationTransitionValidationShape

Label

Location Transition Validation Shape

Description

Validates location transition consistency.

Shape Properties

Instances of cacontology-street:LocationTransition can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

cacontology-street:LocationTransition
cacontology-street:transportationMethod 0 1 xsd:string

Implementation

@prefix cacontology-street: <https://cacontology.projectvic.org/street#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
cacontology-street:LocationTransitionValidationShape a sh:NodeShape ;
    rdfs:label "Location Transition Validation Shape"@en ;
    rdfs:comment "Validates location transition consistency."@en ;
    sh:sparql [ sh:message "Location transition should have both source and destination locations."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this a cacontology-street:LocationTransition .
                FILTER NOT EXISTS {
                    ?contact cacontology-street:initialContactLocation ?source .
                    ?exploitation cacontology-street:exploitationLocation ?dest .
                    ?contact cacontology-street:escalatesTo ?proposition .
                    ?proposition cacontology-street:respondsTo ?response .
                }
            }
        """ ] ;
    sh:targetClass cacontology-street:LocationTransition .