bsh:DeprecationRule leaf node


URI

https://brickschema.org/schema/BrickShape#DeprecationRule

Label

DeprecationRule

Targets (1)

Property Constraints (4)

Focus nodes of this shape (brick:deprecation) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
brick:deprecatedInVersion 0 1 xsd:string
brick:deprecationMitigationMessage 0 1 xsd:string
brick:deprecationMitigationRule 0 1 sh:NodeShape
rdf:type / brick:deprecation
sh:message This concept is deprecated
0 0
sh:severity sh:Warning

Implementation

@prefix brick: <https://brickschema.org/schema/Brick#> .
@prefix bsh: <https://brickschema.org/schema/BrickShape#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

bsh:DeprecationRule a sh:NodeShape ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:path brick:deprecatedInVersion ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:path brick:deprecationMitigationMessage ],
        [ sh:class sh:NodeShape ;
            sh:maxCount 1 ;
            sh:path brick:deprecationMitigationRule ],
        [ sh:maxCount 0 ;
            sh:message "This concept is deprecated" ;
            sh:path ( rdf:type brick:deprecation ) ;
            sh:severity sh:Warning ] ;
    sh:rule [ a sh:SPARQLRule ;
            sh:construct """
        CONSTRUCT { $this owl:deprecated true }
        WHERE { $this brick:deprecation ?dep }
        """ ;
            sh:prefixes <https://brickschema.org/schema/1.4/Brick> ] ;
    sh:targetSubjectsOf brick:deprecation .