ref:PreferredShape leaf node


URI

https://brickschema.org/schema/Brick/ref#PreferredShape

Label

PreferredShape

Targets (1)

Property Constraints (1)

Focus nodes of this shape (ref:hasExternalReference) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
ref:hasExternalReference Points to the external reference for this entity, which contains additional metadata/data not included in this graph.
sh:message An entity can only have one 'preferred' External Reference
0 *

Implementation

@prefix ref: <https://brickschema.org/schema/Brick/ref#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ref:PreferredShape a sh:NodeShape ;
    sh:property [ sh:message "An entity can only have one 'preferred' External Reference" ;
            sh:path ref:hasExternalReference ;
            sh:qualifiedMaxCount 1 ;
            sh:qualifiedValueShape [ sh:class ref:ExternalReference ;
                    sh:property [ sh:datatype xsd:boolean ;
                            sh:hasValue true ;
                            sh:path ref:preferred ] ] ] ;
    sh:targetSubjectsOf ref:hasExternalReference .