David Price

Working dpr2

...@@ -3114,6 +3114,293 @@ dpr-tables:ProductFlowsOther ...@@ -3114,6 +3114,293 @@ dpr-tables:ProductFlowsOther
3114 ] ; 3114 ] ;
3115 rhspin:tableHeaders ("Field"^^xsd:string "Facility Name"^^xsd:string "Flow Purpose"^^xsd:string "Flow Definition"^^xsd:string "Material"^^xsd:string "Flow Density"^^xsd:string "Flow Temperature"^^xsd:string "Flow Pressure"^^xsd:string) . 3115 rhspin:tableHeaders ("Field"^^xsd:string "Facility Name"^^xsd:string "Flow Purpose"^^xsd:string "Flow Definition"^^xsd:string "Material"^^xsd:string "Flow Density"^^xsd:string "Flow Temperature"^^xsd:string "Flow Pressure"^^xsd:string) .
3116 3116
3117 +dpr-tables:ProductionFlows
3118 + rdf:type rhspin:TableTemplate ;
3119 + rdfs:label "Production Flows New"^^xsd:string ;
3120 + rdfs:subClassOf rhspin:DPRTableTemplates ;
3121 + spin:body
3122 + [ rdf:type sp:Select ;
3123 + sp:orderBy ([ sp:varName "facilityName"^^xsd:string
3124 + ] [ sp:varName "purposeTypeName"^^xsd:string
3125 + ] [ sp:varName "materialTypeName"^^xsd:string
3126 + ]) ;
3127 + sp:resultVariables ([ sp:varName "facilityName"^^xsd:string
3128 + ] [ sp:varName "purposeTypeName"^^xsd:string
3129 + ] [ sp:varName "materialTypeName"^^xsd:string
3130 + ] [ sp:varName "massValueString"^^xsd:string
3131 + ] [ sp:varName "volumeValueString"^^xsd:string
3132 + ] [ sp:varName "densityValueString"^^xsd:string
3133 + ] [ sp:varName "definitionTypeName"^^xsd:string
3134 + ] [ sp:varName "grossOrNet"^^xsd:string
3135 + ]) ;
3136 + sp:where ([ sp:object
3137 + [ sp:varName "productionFlowInReportingPeriod"^^xsd:string
3138 + ] ;
3139 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportsOnFlow> ;
3140 + sp:subject
3141 + [ sp:varName "report"^^xsd:string
3142 + ]
3143 + ] [ sp:object
3144 + [ sp:varName "productionFlowWhole"^^xsd:string
3145 + ] ;
3146 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
3147 + sp:subject
3148 + [ sp:varName "productionFlowInReportingPeriod"^^xsd:string
3149 + ]
3150 + ] [ rdf:type sp:NamedGraph ;
3151 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductionFlow> ;
3152 + sp:predicate rdf:type ;
3153 + sp:subject
3154 + [ sp:varName "productionFlowWhole"^^xsd:string
3155 + ]
3156 + ] [ sp:object
3157 + [ sp:varName "productionFlowFacility"^^xsd:string
3158 + ] ;
3159 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
3160 + sp:subject
3161 + [ sp:varName "productionFlowWhole"^^xsd:string
3162 + ]
3163 + ]) ;
3164 + sp:graphNameNode <http://www.reportinghub.no/data/erh>
3165 + ] [ rdf:type sp:Bind ;
3166 + sp:expression
3167 + [ rdf:type ep-spin-lib:selectNPDorERHorEPName ;
3168 + sp:arg1 [ sp:varName "productionFlowFacility"^^xsd:string
3169 + ]
3170 + ] ;
3171 + sp:variable
3172 + [ sp:varName "facilityName"^^xsd:string
3173 + ]
3174 + ] [ sp:object
3175 + [ sp:varName "productionFlowMixedPart"^^xsd:string
3176 + ] ;
3177 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasMixedPart> ;
3178 + sp:subject
3179 + [ sp:varName "productionFlowInReportingPeriod"^^xsd:string
3180 + ]
3181 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ;
3182 + sp:predicate rdf:type ;
3183 + sp:subject
3184 + [ sp:varName "productionFlowMixedPart"^^xsd:string
3185 + ]
3186 + ] [ sp:object
3187 + [ sp:varName "productFlowInMonthMaterial"^^xsd:string
3188 + ] ;
3189 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
3190 + sp:subject
3191 + [ sp:varName "productionFlowMixedPart"^^xsd:string
3192 + ]
3193 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
3194 + sp:predicate rdf:type ;
3195 + sp:subject
3196 + [ sp:varName "productFlowInMonthMaterial"^^xsd:string
3197 + ]
3198 + ] [ sp:object
3199 + [ sp:varName "productFlowInMonthMaterial"^^xsd:string
3200 + ] ;
3201 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
3202 + sp:subject
3203 + [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
3204 + ]
3205 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
3206 + sp:predicate rdf:type ;
3207 + sp:subject
3208 + [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
3209 + ]
3210 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInASpecifiedState> ;
3211 + sp:predicate rdf:type ;
3212 + sp:subject
3213 + [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
3214 + ]
3215 + ] [ rdf:type sp:Optional ;
3216 + sp:elements ([ sp:object
3217 + [ sp:varName "materialMass"^^xsd:string
3218 + ] ;
3219 + sp:predicate rdf:type ;
3220 + sp:subject
3221 + [ sp:varName "productFlowInMonthMaterial"^^xsd:string
3222 + ]
3223 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ;
3224 + sp:predicate rdf:type ;
3225 + sp:subject
3226 + [ sp:varName "materialMass"^^xsd:string
3227 + ]
3228 + ] [ rdf:type sp:Bind ;
3229 + sp:expression
3230 + [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ;
3231 + sp:arg1 [ sp:varName "materialMass"^^xsd:string
3232 + ]
3233 + ] ;
3234 + sp:variable
3235 + [ sp:varName "massValueString"^^xsd:string
3236 + ]
3237 + ])
3238 + ] [ rdf:type sp:Optional ;
3239 + sp:elements ([ sp:object
3240 + [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
3241 + ] ;
3242 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
3243 + sp:subject
3244 + [ sp:varName "stateOfMaterialThatFlowsInPeriodVolume"^^xsd:string
3245 + ]
3246 + ] [ sp:object
3247 + [ sp:varName "stateVolume"^^xsd:string
3248 + ] ;
3249 + sp:predicate rdf:type ;
3250 + sp:subject
3251 + [ sp:varName "stateOfMaterialThatFlowsInPeriodVolume"^^xsd:string
3252 + ]
3253 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
3254 + sp:predicate rdf:type ;
3255 + sp:subject
3256 + [ sp:varName "stateVolume"^^xsd:string
3257 + ]
3258 + ] [ rdf:type sp:Bind ;
3259 + sp:expression
3260 + [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ;
3261 + sp:arg1 [ sp:varName "stateVolume"^^xsd:string
3262 + ]
3263 + ] ;
3264 + sp:variable
3265 + [ sp:varName "volumeValueString"^^xsd:string
3266 + ]
3267 + ])
3268 + ] [ rdf:type sp:Optional ;
3269 + sp:elements ([ sp:object
3270 + [ sp:varName "productFlowInMonthMaterial"^^xsd:string
3271 + ] ;
3272 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
3273 + sp:subject
3274 + [ sp:varName "stateOfMaterialThatFlowsInPeriodDensity"^^xsd:string
3275 + ]
3276 + ] [ sp:object
3277 + [ sp:varName "stateDensity"^^xsd:string
3278 + ] ;
3279 + sp:predicate rdf:type ;
3280 + sp:subject
3281 + [ sp:varName "stateOfMaterialThatFlowsInPeriodDensity"^^xsd:string
3282 + ]
3283 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ;
3284 + sp:predicate rdf:type ;
3285 + sp:subject
3286 + [ sp:varName "stateDensity"^^xsd:string
3287 + ]
3288 + ] [ rdf:type sp:Bind ;
3289 + sp:expression
3290 + [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ;
3291 + sp:arg1 [ sp:varName "stateDensity"^^xsd:string
3292 + ]
3293 + ] ;
3294 + sp:variable
3295 + [ sp:varName "densityValueString"^^xsd:string
3296 + ]
3297 + ])
3298 + ] [ sp:object
3299 + [ sp:varName "productFlowWhole"^^xsd:string
3300 + ] ;
3301 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
3302 + sp:subject
3303 + [ sp:varName "productionFlowMixedPart"^^xsd:string
3304 + ]
3305 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductFlow> ;
3306 + sp:predicate rdf:type ;
3307 + sp:subject
3308 + [ sp:varName "productFlowWhole"^^xsd:string
3309 + ]
3310 + ] [ rdf:type sp:Optional ;
3311 + sp:elements ([ rdf:type sp:NamedGraph ;
3312 + sp:elements ([ sp:object
3313 + [ sp:varName "productionFlowPurposeType"^^xsd:string
3314 + ] ;
3315 + sp:predicate rdf:type ;
3316 + sp:subject
3317 + [ sp:varName "productionFlowWhole"^^xsd:string
3318 + ]
3319 + ]) ;
3320 + sp:graphNameNode <http://www.reportinghub.no/data/erh>
3321 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowPurposeType> ;
3322 + sp:predicate rdf:type ;
3323 + sp:subject
3324 + [ sp:varName "productionFlowPurposeType"^^xsd:string
3325 + ]
3326 + ] [ sp:object
3327 + [ sp:varName "purposeTypeName"^^xsd:string
3328 + ] ;
3329 + sp:predicate rdfs:label ;
3330 + sp:subject
3331 + [ sp:varName "productionFlowPurposeType"^^xsd:string
3332 + ]
3333 + ])
3334 + ] [ rdf:type sp:Optional ;
3335 + sp:elements ([ sp:object
3336 + [ sp:varName "productionFlowPartGrossOrNetType"^^xsd:string
3337 + ] ;
3338 + sp:predicate rdf:type ;
3339 + sp:subject
3340 + [ sp:varName "productFlowWhole"^^xsd:string
3341 + ]
3342 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductFlowGrossOrNetType> ;
3343 + sp:predicate rdf:type ;
3344 + sp:subject
3345 + [ sp:varName "productionFlowPartGrossOrNetType"^^xsd:string
3346 + ]
3347 + ] [ sp:object
3348 + [ sp:varName "grossOrNet"^^xsd:string
3349 + ] ;
3350 + sp:predicate rdfs:label ;
3351 + sp:subject
3352 + [ sp:varName "productionFlowPartGrossOrNetType"^^xsd:string
3353 + ]
3354 + ])
3355 + ] [ rdf:type sp:Optional ;
3356 + sp:elements ([ sp:object
3357 + [ sp:varName "productFlowMaterialType"^^xsd:string
3358 + ] ;
3359 + sp:predicate rdf:type ;
3360 + sp:subject
3361 + [ sp:varName "productFlowWhole"^^xsd:string
3362 + ]
3363 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#ReportingProductType> ;
3364 + sp:predicate rdf:type ;
3365 + sp:subject
3366 + [ sp:varName "productFlowMaterialType"^^xsd:string
3367 + ]
3368 + ] [ sp:object
3369 + [ sp:varName "materialTypeName"^^xsd:string
3370 + ] ;
3371 + sp:predicate rdfs:label ;
3372 + sp:subject
3373 + [ sp:varName "productFlowMaterialType"^^xsd:string
3374 + ]
3375 + ])
3376 + ] [ rdf:type sp:Optional ;
3377 + sp:elements ([ rdf:type sp:NamedGraph ;
3378 + sp:elements ([ sp:object
3379 + [ sp:varName "productionFlowDefinitionType"^^xsd:string
3380 + ] ;
3381 + sp:predicate rdf:type ;
3382 + sp:subject
3383 + [ sp:varName "productionFlowWhole"^^xsd:string
3384 + ]
3385 + ]) ;
3386 + sp:graphNameNode <http://www.reportinghub.no/data/erh>
3387 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowDefinitionType> ;
3388 + sp:predicate rdf:type ;
3389 + sp:subject
3390 + [ sp:varName "productionFlowDefinitionType"^^xsd:string
3391 + ]
3392 + ] [ sp:object
3393 + [ sp:varName "definitionTypeName"^^xsd:string
3394 + ] ;
3395 + sp:predicate rdfs:label ;
3396 + sp:subject
3397 + [ sp:varName "productionFlowDefinitionType"^^xsd:string
3398 + ]
3399 + ])
3400 + ])
3401 + ] ;
3402 + rhspin:tableHeaders ("Facility"^^xsd:string "Purpose"^^xsd:string "Material"^^xsd:string "Mass"^^xsd:string "Volume"^^xsd:string "Density"^^xsd:string "Flow type"^^xsd:string "Gross/Net"^^xsd:string) .
3403 +
3117 dpr-tables:ProductionOperationActivity 3404 dpr-tables:ProductionOperationActivity
3118 rdf:type rhspin:TableTemplate ; 3405 rdf:type rhspin:TableTemplate ;
3119 rdfs:label "Production Operation Activities"^^xsd:string ; 3406 rdfs:label "Production Operation Activities"^^xsd:string ;
...@@ -4204,30 +4491,32 @@ dpr-tables:ProductionVolumes ...@@ -4204,30 +4491,32 @@ dpr-tables:ProductionVolumes
4204 sp:subject 4491 sp:subject
4205 [ sp:varName "flow"^^xsd:string 4492 [ sp:varName "flow"^^xsd:string
4206 ] 4493 ]
4207 - ] [ rdf:type sp:NamedGraph ; 4494 + ] [ rdf:type sp:Optional ;
4208 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductionFlow> ; 4495 + sp:elements ([ rdf:type sp:NamedGraph ;
4209 - sp:predicate rdf:type ; 4496 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductionFlow> ;
4210 - sp:subject 4497 + sp:predicate rdf:type ;
4211 - [ sp:varName "flowWhole"^^xsd:string 4498 + sp:subject
4212 - ] 4499 + [ sp:varName "flowWhole"^^xsd:string
4213 - ] [ sp:object 4500 + ]
4214 - [ sp:varName "flowInOutFacility"^^xsd:string 4501 + ] [ sp:object
4502 + [ sp:varName "flowInOutFacility"^^xsd:string
4503 + ] ;
4504 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
4505 + sp:subject
4506 + [ sp:varName "flowWhole"^^xsd:string
4507 + ]
4508 + ]) ;
4509 + sp:graphNameNode <http://www.reportinghub.no/data/erh>
4510 + ] [ rdf:type sp:Bind ;
4511 + sp:expression
4512 + [ rdf:type ep-spin-lib:selectNPDorERHorEPName ;
4513 + sp:arg1 [ sp:varName "flowInOutFacility"^^xsd:string
4514 + ]
4215 ] ; 4515 ] ;
4216 - sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ; 4516 + sp:variable
4217 - sp:subject 4517 + [ sp:varName "flowInOutFacilityName"^^xsd:string
4218 - [ sp:varName "flowWhole"^^xsd:string
4219 ] 4518 ]
4220 - ]) ; 4519 + ])
4221 - sp:graphNameNode <http://www.reportinghub.no/data/erh>
4222 - ] [ rdf:type sp:Bind ;
4223 - sp:expression
4224 - [ rdf:type ep-spin-lib:selectNPDorERHorEPName ;
4225 - sp:arg1 [ sp:varName "productionFloflowInOutFacilitywFacility"^^xsd:string
4226 - ]
4227 - ] ;
4228 - sp:variable
4229 - [ sp:varName "flowInOutFacilityName"^^xsd:string
4230 - ]
4231 ] [ sp:object 4520 ] [ sp:object
4232 [ sp:varName "flowPurpose"^^xsd:string 4521 [ sp:varName "flowPurpose"^^xsd:string
4233 ] ; 4522 ] ;
......
...@@ -35,16 +35,14 @@ ...@@ -35,16 +35,14 @@
35 sp:subject spin:_arg1 35 sp:subject spin:_arg1
36 ]) ; 36 ]) ;
37 sp:graphNameNode <http://www.reportinghub.no/data/erh> 37 sp:graphNameNode <http://www.reportinghub.no/data/erh>
38 - ] [ rdf:type sp:TriplePath ; 38 + ] [ rdf:type sp:Bind ;
39 - sp:object 39 + sp:expression
40 - [ sp:varName "name"^^xsd:string 40 + [ rdf:type ep-spin-lib:selectNPDorERHorEPName ;
41 - ] ; 41 + sp:arg1 [ sp:varName "productionFlowFacility"^^xsd:string
42 - sp:path [ rdf:type sp:AltPath ; 42 + ]
43 - sp:path1 <http://www.reportinghub.no/np/schema/npd#name> ;
44 - sp:path2 <http://www.reportinghub.no/ep/schema/core#name>
45 ] ; 43 ] ;
46 - sp:subject 44 + sp:variable
47 - [ sp:varName "productionFlowFacility"^^xsd:string 45 + [ sp:varName "name"^^xsd:string
48 ] 46 ]
49 ]) 47 ])
50 ] ; 48 ] ;
...@@ -82,13 +80,16 @@ ...@@ -82,13 +80,16 @@
82 sp:subject 80 sp:subject
83 [ sp:varName "facilityPart"^^xsd:string 81 [ sp:varName "facilityPart"^^xsd:string
84 ] 82 ]
85 - ] [ sp:object 83 + ] [ rdf:type sp:NamedGraph ;
86 - [ sp:varName "facilityWholeName"^^xsd:string 84 + sp:elements ([ sp:object
87 - ] ; 85 + [ sp:varName "facilityWholeName"^^xsd:string
88 - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 86 + ] ;
89 - sp:subject 87 + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
90 - [ sp:varName "facilityWhole"^^xsd:string 88 + sp:subject
91 - ] 89 + [ sp:varName "facilityWhole"^^xsd:string
90 + ]
91 + ]) ;
92 + sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
92 ]) 93 ])
93 ] ; 94 ] ;
94 spin:constraint 95 spin:constraint
......
...@@ -78,8 +78,8 @@ WHERE { ...@@ -78,8 +78,8 @@ WHERE {
78 <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationMarineShip" /> 78 <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationMarineShip" />
79 79
80 80
81 - 81 + <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionFlows" />
82 - <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionVolumes" /> 82 +<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionVolumes" />
83 <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductFlows" /> 83 <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductFlows" />
84 84
85 <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:InjectionVolumes" /> 85 <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:InjectionVolumes" />
......
1 +# baseURI: http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2-importedfacts.ttl
2 +# imports: http://www.reportinghub.no/data/erh
3 +# imports: http://www.reportinghub.no/np/data/npd
4 +# imports: http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2
5 +
6 +@prefix TRYM_DAY_2012-02-28_final-dpr2-importedfacts: <http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2-importedfacts.ttl#> .
7 +@prefix owl: <http://www.w3.org/2002/07/owl#> .
8 +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
9 +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
10 +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
11 +
12 +<http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2-importedfacts.ttl>
13 + rdf:type owl:Ontology ;
14 + owl:imports <http://www.reportinghub.no/data/erh> , <http://www.reportinghub.no/np/data/npd> , <http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2> ;
15 + owl:versionInfo "Created with TopBraid Composer"^^xsd:string .