SPIN_EP-PROD-property.ttl 7.84 KB
# baseURI: http://www.reportinghub.no/ep/spin/prod-property
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/erhfacts
# imports: http://www.reportinghub.no/ep/schema/1.0/production

@prefix ep-report:  <http://www.reportinghub.no/ep/schema/report#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix prod-property:  <http://www.reportinghub.no/ep/spin/prod-property#> .
@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.reportinghub.no/ep/schema/flow#reportedFlowMaterial>
      rdf:type spin:MagicProperty , owl:ObjectProperty ;
      rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
      rdfs:label "report end flow material"^^xsd:string ;
      rdfs:range <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
      rdfs:subClassOf spin:MagicProperties ;
      spin:body
              [ rdf:type sp:Select ;
                sp:distinct "true"^^xsd:boolean ;
                sp:resultVariables ([ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
                          ]) ;
                sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
                            sp:predicate rdf:type ;
                            sp:subject spin:_arg1
                          ] [ sp:object
                                    [ sp:varName "productionFlowMixedPart"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasMixedPart> ;
                            sp:subject spin:_arg1
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "productionFlowMixedPart"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "productFlowInMonthMaterial"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
                            sp:subject
                                    [ sp:varName "productionFlowMixedPart"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "productFlowInMonthMaterial"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "productFlowInMonthMaterial"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject
                                    [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInASpecifiedState> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
                                    ]
                          ])
              ] ;
      spin:constraint
              [ rdf:type spl:Argument ;
                rdfs:comment "the flow that has part the material"^^xsd:string ;
                spl:predicate sp:arg1 ;
                spl:valueType <http://www.reportinghub.no/ep/schema/flow#ProductionFlow>
              ] ;
      spin:returnType <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> .

ep-report:reportsOnFlow
      rdf:type spin:MagicProperty , owl:ObjectProperty ;
      rdfs:domain ep-report:ProductionReport ;
      rdfs:label "reports on flow"^^xsd:string ;
      rdfs:range <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
      rdfs:subClassOf spin:MagicProperties ;
      spin:body
              [ rdf:type sp:Select ;
                sp:distinct "true"^^xsd:boolean ;
                sp:resultVariables ([ sp:varName "productionFlow"^^xsd:string
                          ]) ;
                sp:where ([ sp:object ep-report:ProductionReport ;
                            sp:predicate rdf:type ;
                            sp:subject spin:_arg1
                          ] [ sp:object
                                    [ sp:varName "productionReport"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
                            sp:subject
                                    [ sp:varName "productVolumeReport"^^xsd:string
                                    ]
                          ] [ sp:object ep-report:ProductVolumeReport ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "productVolumeReport"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "productionFlowNetwork"^^xsd:string
                                    ] ;
                            sp:predicate ep-report:reportOn ;
                            sp:subject
                                    [ sp:varName "productVolumeReport"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowNetwork> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "productionFlowNetwork"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "productionFlow"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasNetworkPart> ;
                            sp:subject
                                    [ sp:varName "productionFlowNetwork"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "productionFlow"^^xsd:string
                                    ]
                          ])
              ] ;
      spin:constraint
              [ rdf:type spl:Argument ;
                rdfs:comment "the report that contains flows"^^xsd:string ;
                spl:predicate sp:arg1 ;
                spl:valueType ep-report:ProductionReport
              ] ;
      spin:returnType <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> .

<http://www.reportinghub.no/ep/spin/prod-property>
      rdf:type owl:Ontology ;
      owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/erhfacts> , <http://www.reportinghub.no/ep/schema/1.0/production> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .