@prefix cim: <https://cim.ucaiug.io/ns#> .
@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#> .

cim:IdentifiedObject a sh:NodeShape ;
    rdfs:comment "This is a root class to provide common identification for all classes needing identification and naming attributes." ;
    sh:closed true ;
    sh:ignoredProperties ( cim:Location.mainAddress rdf:type cim:Location.PowerSystemResources ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description """The name is any free human readable and possibly non unique text naming the object.\r
""" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path cim:IdentifiedObject.name ],
        [ sh:datatype xsd:string ;
            sh:description """Master resource identifier issued by a model authority. The mRID is unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended.\r
For CIMXML data files in RDF syntax conforming to IEC 61970-552, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements.""" ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path cim:IdentifiedObject.mRID ] ;
    sh:targetClass cim:IdentifiedObject .

cim:Location a sh:NodeShape ;
    rdfs:comment """The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more position points (coordinates) in a given coordinate system.\r
""" ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description """The name is any free human readable and possibly non unique text naming the object.\r
""" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path cim:IdentifiedObject.name ],
        [ sh:datatype xsd:string ;
            sh:description """Master resource identifier issued by a model authority. The mRID is unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended.\r
For CIMXML data files in RDF syntax conforming to IEC 61970-552, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements.""" ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path cim:IdentifiedObject.mRID ],
        [ sh:datatype xsd:string ;
            sh:description "All power system resources at this location." ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path cim:Location.PowerSystemResources ],
        [ sh:class cim:StreetAddress ;
            sh:description "Main address of the location." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 0 ;
            sh:path cim:Location.mainAddress ] ;
    sh:targetClass cim:Location .

cim:StreetAddress a sh:NodeShape ;
    rdfs:comment "General purpose street and postal address information." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class cim:StreetDetail ;
            sh:description "Street detail." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 1 ;
            sh:path cim:StreetAddress.streetDetail ],
        [ sh:datatype xsd:string ;
            sh:description "Postal code for the address." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path cim:StreetAddress.postalCode ] ;
    sh:targetClass cim:StreetAddress .

cim:StreetDetail a sh:NodeShape ;
    rdfs:comment """Street details, in the context of address.\r
""" ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Designator of the specific location on the street." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path cim:StreetDetail.number ] ;
    sh:targetClass cim:StreetDetail .


