TRANSFORM_mpr-comment-v1.1.1.ttl 16.3 KB
# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-comment-v1.1.1
# imports: http://spinrdf.org/spin
# imports: http://www.epim.no/schemas/mprml/1
# imports: http://www.reportinghub.no/ep/dpr/spin/1.1/lib
# imports: http://www.reportinghub.no/ep/mpr/spin/1.1/lib
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/flow
# imports: http://www.reportinghub.no/ep/schema/1.0/material
# imports: http://www.reportinghub.no/ep/transform/transform-helper-schema

@prefix :        <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-comment-v1.1.1#> .
@prefix ep-dpr-spin-lib:  <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> .
@prefix ep-mpr-spin-lib:  <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sp:      <http://spinrdf.org/sp#> .
@prefix spin:    <http://spinrdf.org/spin#> .
@prefix spl:     <http://spinrdf.org/spl#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

<http://www.epim.no/schemas/mprml/1#Cs_datedComment>
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment "STEP 90203 Set the commentation role (whole life person not set)"^^xsd:string ;
                sp:templates ([ sp:object _:b1 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#commentator> ;
                            sp:subject
                                    [ sp:varName "commentingActivity"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Person> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b1
                          ] [ sp:object _:b2 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject _:b1
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonRole> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b2
                          ] [ sp:object
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ] ;
                            sp:predicate rdf:type ;
                            sp:subject _:b2
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonRoleType> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonRole> ;
                            sp:predicate rdfs:subClassOf ;
                            sp:subject
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "role"^^xsd:string
                                    ] ;
                            sp:predicate rdfs:label ;
                            sp:subject
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ]
                          ]) ;
                sp:where ([ sp:object spin:_this ;
                            sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
                            sp:subject
                                    [ sp:varName "commentingActivity"^^xsd:string
                                    ]
                          ] [ rdf:type sp:NotExists ;
                            sp:elements ([ sp:object
                                                [ sp:varName "commentator"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#commentator> ;
                                        sp:subject
                                                [ sp:varName "commentingActivity"^^xsd:string
                                                ]
                                      ])
                          ] [ sp:object
                                    [ sp:varName "role"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.epim.no/schemas/mprml/1#role> ;
                            sp:subject spin:_this
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-mpr-spin-lib:buildPersonRoleTypeURI ;
                                      sp:arg1 [ sp:varName "role"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ]
                          ])
              ] ;
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment "STEP 90202 Set the commentation role (whole life person set)"^^xsd:string ;
                sp:templates ([ sp:object _:b3 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject
                                    [ sp:varName "commentator"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonRole> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b3
                          ] [ sp:object
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ] ;
                            sp:predicate rdf:type ;
                            sp:subject _:b3
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonRoleType> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonRole> ;
                            sp:predicate rdfs:subClassOf ;
                            sp:subject
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "role"^^xsd:string
                                    ] ;
                            sp:predicate rdfs:label ;
                            sp:subject
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ]
                          ]) ;
                sp:where ([ sp:object spin:_this ;
                            sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
                            sp:subject
                                    [ sp:varName "commentingActivity"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "commentator"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#commentator> ;
                            sp:subject
                                    [ sp:varName "commentingActivity"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "role"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.epim.no/schemas/mprml/1#role> ;
                            sp:subject spin:_this
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-mpr-spin-lib:buildPersonRoleTypeURI ;
                                      sp:arg1 [ sp:varName "role"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "personRoleType"^^xsd:string
                                    ]
                          ])
              ] ;
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment "STEP 90201 Set the commentation whole life person"^^xsd:string ;
                sp:templates ([ sp:object _:b4 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#commentator> ;
                            sp:subject
                                    [ sp:varName "commentingActivity"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Person> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b4
                          ] [ sp:object
                                    [ sp:varName "person"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject _:b4
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#WholeLifePerson> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "person"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "who"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
                            sp:subject
                                    [ sp:varName "person"^^xsd:string
                                    ]
                          ]) ;
                sp:where ([ sp:object spin:_this ;
                            sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
                            sp:subject
                                    [ sp:varName "commentingActivity"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "who"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.epim.no/schemas/mprml/1#who> ;
                            sp:subject spin:_this
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-dpr-spin-lib:buildPersonURI ;
                                      sp:arg1 [ sp:varName "who"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "person"^^xsd:string
                                    ]
                          ])
              ] ;
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment "STEP 90200 Create the commenting activity"^^xsd:string ;
                sp:templates ([ sp:object _:b5 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
                            sp:subject
                                    [ sp:varName "activityForComment"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "typeOfPartCommentedOn"^^xsd:string
                                    ] ;
                            sp:predicate rdf:type ;
                            sp:subject _:b5
                          ] [ sp:object
                                    [ sp:varName "dTimStart"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
                            sp:subject _:b5
                          ] [ sp:object
                                    [ sp:varName "dTimEnd"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
                            sp:subject _:b5
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/production-activity#MakeAComment> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b6
                          ] [ sp:object _:b5 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#commentUpon> ;
                            sp:subject _:b6
                          ] [ sp:object
                                    [ sp:varName "remark"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#commentMade> ;
                            sp:subject _:b6
                          ] [ sp:object spin:_this ;
                            sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
                            sp:subject _:b6
                          ]) ;
                sp:where ([ sp:object spin:_this ;
                            sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#forComment> ;
                            sp:subject
                                    [ sp:varName "activityForComment"^^xsd:string
                                    ]
                          ] [ sp:object spin:_this ;
                            sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#typeOfPartCommentedOn> ;
                            sp:subject
                                    [ sp:varName "typeOfPartCommentedOn"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object
                                                [ sp:varName "dTimStart"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
                                        sp:subject spin:_this
                                      ])
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object
                                                [ sp:varName "dTimEnd"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
                                        sp:subject spin:_this
                                      ])
                          ] [ sp:object
                                    [ sp:varName "remark"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.epim.no/schemas/mprml/1#remark> ;
                            sp:subject spin:_this
                          ])
              ] .

<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-comment-v1.1.1>
      rdf:type owl:Ontology ;
      owl:imports <http://www.reportinghub.no/ep/schema/1.0/material> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/flow> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.epim.no/schemas/mprml/1> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .