@prefix : <https://w3id.org/citydata/part2/v1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix cdm1: <https://w3id.org/citydata/part1/v1/> .
@base <https://w3id.org/citydata/part2/v1/> .

<https://w3id.org/citydata/part2/v1/OrganizationSHACL> rdf:type owl:Ontology ;
                                                        owl:imports :CoreSHACL ,
                                                                    :OrganizationPattern ;
                                                        dcterms:title "City Data Model Part 2 - Organization Pattern - SHACL constraints" ;
                                                        vann:preferredNamespacePrefix "cdm2" ;
                                                        vann:preferredNamespaceUri "https://w3id.org/citydata/part2/v1/" ;
                                                        skos:definition "SHACL validation shapes for the Organization Pattern pattern module." .

#################################################################
#    Shapes
#################################################################

###  https://w3id.org/citydata/part2/v1/BusinessEstablishmentShape
:BusinessEstablishmentShape rdf:type sh:NodeShape ;
                            sh:property [ sh:class :Address ;
                                          sh:path :hasAddress
                                        ] ,
                                        [ sh:class cdm1:Location ;
                                          sh:node :MaxOneShape ;
                                          sh:path cdm1:hasLocation
                                        ] ;
                            sh:targetClass :BusinessEstablishment .


###  https://w3id.org/citydata/part2/v1/CompensationShape
:CompensationShape rdf:type sh:NodeShape ;
                   sh:property [ sh:class cdm1:MonetaryValue ;
                                 sh:node :MaxOneShape ;
                                 sh:path :hasPay
                               ] ;
                   sh:targetClass :Compensation .


###  https://w3id.org/citydata/part2/v1/EmploymentShape
:EmploymentShape rdf:type sh:NodeShape ;
                 sh:property [ sh:class :Compensation ;
                               sh:node :MinOneShape ;
                               sh:path :hasCompensation
                             ] ,
                             [ sh:class :Occupation ;
                               sh:path :employedAs
                             ] ,
                             [ sh:class :Organization ;
                               sh:node :MinOneShape ;
                               sh:path :employedBy
                             ] ,
                             [ sh:class :EmploymentStatus ;
                               sh:path :hasEmploymentStatus
                             ] ;
                 sh:targetClass :Employment .


###  https://w3id.org/citydata/part2/v1/EmploymentStatusShape
:EmploymentStatusShape rdf:type sh:NodeShape ;
                       sh:property [ sh:class :Code ;
                                     sh:path :hasCode
                                   ] ;
                       sh:targetClass :EmploymentStatus .


###  https://w3id.org/citydata/part2/v1/ForProfitOrganizationShape
:ForProfitOrganizationShape rdf:type sh:NodeShape ;
                            sh:property [ sh:class :IndustryType ;
                                          sh:path :hasIndustryType
                                        ] ,
                                        [ sh:class :BusinessEstablishment ;
                                          sh:path :hasEstablishment
                                        ] ;
                            sh:targetClass :ForProfitOrganization .


###  https://w3id.org/citydata/part2/v1/GovernmentOrganizationShape
:GovernmentOrganizationShape rdf:type sh:NodeShape ;
                             sh:property [ sh:class :JurisdictionalArea ;
                                           sh:path :jurisdiction
                                         ] ,
                                         [ sh:class :Program ;
                                           sh:path :hasProgram
                                         ] ;
                             sh:targetClass :GovernmentOrganization .


###  https://w3id.org/citydata/part2/v1/IndustryTypeShape
:IndustryTypeShape rdf:type sh:NodeShape ;
                   sh:property [ sh:class :Code ;
                                 sh:path :hasCode
                               ] ;
                   sh:targetClass :IndustryType .


###  https://w3id.org/citydata/part2/v1/JurisdictionalAreaShape
:JurisdictionalAreaShape rdf:type sh:NodeShape ;
                         sh:property [ sh:class :GovernmentOrganization ;
                                       sh:path :hasGovernment
                                     ] ;
                         sh:targetClass :JurisdictionalArea .


###  https://w3id.org/citydata/part2/v1/NonProfitOrganizationShape
:NonProfitOrganizationShape rdf:type sh:NodeShape ;
                            sh:property [ sh:class :Program ;
                                          sh:path :hasProgram
                                        ] ;
                            sh:targetClass :NonProfitOrganization .


###  https://w3id.org/citydata/part2/v1/OccupationShape
:OccupationShape rdf:type sh:NodeShape ;
                 sh:property [ sh:class :Code ;
                               sh:path :hasCode
                             ] ;
                 sh:targetClass :Occupation .


###  https://w3id.org/citydata/part2/v1/OperationShape
:OperationShape rdf:type sh:NodeShape ;
                sh:property [ sh:datatype xsd:time ;
                              sh:node :MaxOneShape ;
                              sh:path :hasOpeningTime
                            ] ,
                            [ sh:datatype xsd:time ;
                              sh:node :MaxOneShape ;
                              sh:path :hasClosingTime
                            ] ;
                sh:targetClass :Operation .


###  https://w3id.org/citydata/part2/v1/OrganizationAgentShape
:OrganizationAgentShape rdf:type sh:NodeShape ;
                        sh:property [ sh:class :Employment ;
                                      sh:path :hasEmployment
                                    ] ,
                                    [ sh:class :Organization ;
                                      sh:path org:memberOf
                                    ] ,
                                    [ sh:class :Goal ;
                                      sh:path :hasGoal
                                    ] ,
                                    [ sh:class :Role ;
                                      sh:path :playsRole
                                    ] ;
                        sh:targetClass :OrganizationAgent .


###  https://w3id.org/citydata/part2/v1/OrganizationShape
:OrganizationShape rdf:type sh:NodeShape ;
                   sh:property [ sh:class cdm1:Location ;
                                 sh:path cdm1:hasLocation
                               ] ,
                               [ sh:class :PhoneNumber ;
                                 sh:path :hasTelephone
                               ] ,
                               [ sh:class :Address ;
                                 sh:path :orgAddress
                               ] ,
                               [ sh:class :Goal ;
                                 sh:path :hasGoal
                               ] ,
                               [ sh:class :Operation ;
                                 sh:path :operatingHours
                               ] ;
                   sh:targetClass :Organization .


###  https://w3id.org/citydata/part2/v1/RoleShape
:RoleShape rdf:type sh:NodeShape ;
           sh:property [ sh:class :Goal ;
                         sh:path :hasGoal
                       ] ,
                       [ sh:class cdm1:Resource ;
                         sh:path :hasResource
                       ] ,
                       [ sh:class cdm1:Activity ;
                         sh:path :hasProcess
                       ] ;
           sh:targetClass :Role .


###  https://w3id.org/citydata/part2/v1/SalaryShape
:SalaryShape rdf:type sh:NodeShape ;
             sh:property [ sh:class cdm1:MonetaryValue ;
                           sh:node :MaxOneShape ;
                           sh:path :annualPay
                         ] ;
             sh:targetClass :Salary .


###  https://w3id.org/citydata/part2/v1/WageShape
:WageShape rdf:type sh:NodeShape ;
           sh:property [ sh:class cdm1:MonetaryValue ;
                         sh:node :MaxOneShape ;
                         sh:path :hourlyPay
                       ] ,
                       [ sh:class cdm1:MonetaryValue ;
                         sh:path :overtimePay
                       ] ;
           sh:targetClass :Wage .
