Holger Knublauch

Added constraint to compare well bore number with name

...@@ -27,6 +27,58 @@ ...@@ -27,6 +27,58 @@
27 27
28 ddr:Obj_drillReport 28 ddr:Obj_drillReport
29 spin:constraint 29 spin:constraint
30 + [ rdf:type sp:Construct ;
31 + sp:templates ([ sp:object spin:ConstraintViolation ;
32 + sp:predicate rdf:type ;
33 + sp:subject _:b1
34 + ] [ sp:object spin:_this ;
35 + sp:predicate spin:violationRoot ;
36 + sp:subject _:b1
37 + ] [ sp:object ddr:nameWellbore ;
38 + sp:predicate spin:violationPath ;
39 + sp:subject _:b1
40 + ] [ sp:object
41 + [ sp:varName "message"^^xsd:string
42 + ] ;
43 + sp:predicate rdfs:label ;
44 + sp:subject _:b1
45 + ]) ;
46 + sp:where ([ sp:object
47 + [ sp:varName "wellBoreName"^^xsd:string
48 + ] ;
49 + sp:predicate <http://www.reportinghub.no/ep/spin/lib#nameWellbore> ;
50 + sp:subject spin:_this
51 + ] [ rdf:type sp:Bind ;
52 + sp:expression
53 + [ rdf:type rhspin:wellBoreByName ;
54 + arg:wellBoreName
55 + [ sp:varName "wellBoreName"^^xsd:string
56 + ]
57 + ] ;
58 + sp:variable
59 + [ sp:varName "wellBore"^^xsd:string
60 + ]
61 + ] [ rdf:type sp:Filter ;
62 + sp:expression
63 + [ rdf:type sp:not ;
64 + sp:arg1 [ rdf:type sp:bound ;
65 + sp:arg1 [ sp:varName "wellBore"^^xsd:string
66 + ]
67 + ]
68 + ]
69 + ] [ rdf:type sp:Bind ;
70 + sp:expression
71 + [ rdf:type fn:concat ;
72 + sp:arg1 "Unregistered well bore name " ;
73 + sp:arg2 [ sp:varName "wellBoreName"^^xsd:string
74 + ]
75 + ] ;
76 + sp:variable
77 + [ sp:varName "message"^^xsd:string
78 + ]
79 + ])
80 + ] ;
81 + spin:constraint
30 [ rdf:type sp:Ask ; 82 [ rdf:type sp:Ask ;
31 rdfs:comment "DDRs can only be submitted if a user is logged in"^^xsd:string ; 83 rdfs:comment "DDRs can only be submitted if a user is logged in"^^xsd:string ;
32 sp:where ([ rdf:type sp:Bind ; 84 sp:where ([ rdf:type sp:Bind ;
...@@ -50,24 +102,29 @@ ddr:Obj_drillReport ...@@ -50,24 +102,29 @@ ddr:Obj_drillReport
50 [ rdf:type sp:Construct ; 102 [ rdf:type sp:Construct ;
51 sp:templates ([ sp:object spin:ConstraintViolation ; 103 sp:templates ([ sp:object spin:ConstraintViolation ;
52 sp:predicate rdf:type ; 104 sp:predicate rdf:type ;
53 - sp:subject _:b1 105 + sp:subject _:b2
54 ] [ sp:object spin:_this ; 106 ] [ sp:object spin:_this ;
55 sp:predicate spin:violationRoot ; 107 sp:predicate spin:violationRoot ;
56 - sp:subject _:b1 108 + sp:subject _:b2
57 ] [ sp:object ddr:nameWellbore ; 109 ] [ sp:object ddr:nameWellbore ;
58 sp:predicate spin:violationPath ; 110 sp:predicate spin:violationPath ;
59 - sp:subject _:b1 111 + sp:subject _:b2
60 ] [ sp:object 112 ] [ sp:object
61 [ sp:varName "message"^^xsd:string 113 [ sp:varName "message"^^xsd:string
62 ] ; 114 ] ;
63 sp:predicate rdfs:label ; 115 sp:predicate rdfs:label ;
64 - sp:subject _:b1 116 + sp:subject _:b2
65 ]) ; 117 ]) ;
66 sp:where ([ sp:object 118 sp:where ([ sp:object
67 [ sp:varName "wellBoreName"^^xsd:string 119 [ sp:varName "wellBoreName"^^xsd:string
68 ] ; 120 ] ;
69 sp:predicate <http://www.reportinghub.no/ep/spin/lib#nameWellbore> ; 121 sp:predicate <http://www.reportinghub.no/ep/spin/lib#nameWellbore> ;
70 sp:subject spin:_this 122 sp:subject spin:_this
123 + ] [ sp:object
124 + [ sp:varName "wellBoreNumber"^^xsd:string
125 + ] ;
126 + sp:predicate <http://www.reportinghub.no/ep/spin/lib#numberWellbore> ;
127 + sp:subject spin:_this
71 ] [ rdf:type sp:Bind ; 128 ] [ rdf:type sp:Bind ;
72 sp:expression 129 sp:expression
73 [ rdf:type rhspin:wellBoreByName ; 130 [ rdf:type rhspin:wellBoreByName ;
...@@ -78,19 +135,31 @@ ddr:Obj_drillReport ...@@ -78,19 +135,31 @@ ddr:Obj_drillReport
78 sp:variable 135 sp:variable
79 [ sp:varName "wellBore"^^xsd:string 136 [ sp:varName "wellBore"^^xsd:string
80 ] 137 ]
138 + ] [ rdf:type sp:Bind ;
139 + sp:expression
140 + [ rdf:type rhspin:wellBoreById ;
141 + arg:id [ sp:varName "wellBoreNumber"^^xsd:string
142 + ]
143 + ] ;
144 + sp:variable
145 + [ sp:varName "wellBore2"^^xsd:string
146 + ]
81 ] [ rdf:type sp:Filter ; 147 ] [ rdf:type sp:Filter ;
82 sp:expression 148 sp:expression
83 - [ rdf:type sp:not ; 149 + [ rdf:type sp:ne ;
84 - sp:arg1 [ rdf:type sp:bound ;
85 sp:arg1 [ sp:varName "wellBore"^^xsd:string 150 sp:arg1 [ sp:varName "wellBore"^^xsd:string
86 - ] 151 + ] ;
152 + sp:arg2 [ sp:varName "wellBore2"^^xsd:string
87 ] 153 ]
88 ] 154 ]
89 ] [ rdf:type sp:Bind ; 155 ] [ rdf:type sp:Bind ;
90 sp:expression 156 sp:expression
91 [ rdf:type fn:concat ; 157 [ rdf:type fn:concat ;
92 - sp:arg1 "Unregistered well bore name " ; 158 + sp:arg1 "Well bore number " ;
93 - sp:arg2 [ sp:varName "wellBoreName"^^xsd:string 159 + sp:arg2 [ sp:varName "wellBoreNumber"^^xsd:string
160 + ] ;
161 + sp:arg3 "mismatches well bore name " ;
162 + sp:arg4 [ sp:varName "wellBoreName"^^xsd:string
94 ] 163 ]
95 ] ; 164 ] ;
96 sp:variable 165 sp:variable
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 31
32 <http://www.reportinghub.no/ep/spin/1.1/lib> 32 <http://www.reportinghub.no/ep/spin/1.1/lib>
33 rdf:type owl:Ontology ; 33 rdf:type owl:Ontology ;
34 - owl:imports <http://www.reportinghub.no/spin/rh> , <http://www.reportinghub.no/ep/schema/1.0/drilling-equipment-type> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://spinrdf.org/spin> , <http://www.witsml.org/schemas/1series> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> ; 34 + owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/drilling-equipment-type> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/spin/rh> , <http://www.witsml.org/schemas/1series> ;
35 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 35 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
36 36
37 ep-spin-lib:Function 37 ep-spin-lib:Function
...@@ -628,12 +628,12 @@ ep-spin-lib:buildURI ...@@ -628,12 +628,12 @@ ep-spin-lib:buildURI
628 ] ; 628 ] ;
629 spin:constraint 629 spin:constraint
630 [ rdf:type spl:Argument ; 630 [ rdf:type spl:Argument ;
631 - spl:predicate sp:arg1 ; 631 + spl:predicate sp:arg2 ;
632 spl:valueType xsd:string 632 spl:valueType xsd:string
633 ] ; 633 ] ;
634 spin:constraint 634 spin:constraint
635 [ rdf:type spl:Argument ; 635 [ rdf:type spl:Argument ;
636 - spl:predicate sp:arg2 ; 636 + spl:predicate sp:arg1 ;
637 spl:valueType xsd:string 637 spl:valueType xsd:string
638 ] . 638 ] .
639 639
...@@ -1223,6 +1223,42 @@ ep-spin-lib:normalizeTimeFromDateTime ...@@ -1223,6 +1223,42 @@ ep-spin-lib:normalizeTimeFromDateTime
1223 spl:valueType xsd:dateTime 1223 spl:valueType xsd:dateTime
1224 ] . 1224 ] .
1225 1225
1226 +ep-spin-lib:numberWellbore
1227 + rdf:type spin:MagicProperty ;
1228 + rdfs:comment "A magic property that safely gets the NPD number of a well bore (variable on the right) from a DDR SXML structure (resource on the left side)."^^xsd:string ;
1229 + rdfs:label "number wellbore"^^xsd:string ;
1230 + rdfs:subClassOf spin:MagicProperties ;
1231 + spin:body
1232 + [ rdf:type sp:Select ;
1233 + sp:resultVariables ([ sp:varName "number"^^xsd:string
1234 + ]) ;
1235 + sp:where ([ sp:object
1236 + [ sp:varName "ref"^^xsd:string
1237 + ] ;
1238 + sp:predicate ddr:wellboreAliasRef ;
1239 + sp:subject spin:_arg1
1240 + ] [ sp:object ddr:WNS_NPDnumber ;
1241 + sp:predicate ddr:namingSystemRef ;
1242 + sp:subject
1243 + [ sp:varName "ref"^^xsd:string
1244 + ]
1245 + ] [ sp:object
1246 + [ sp:varName "number"^^xsd:string
1247 + ] ;
1248 + sp:predicate ddr:name ;
1249 + sp:subject
1250 + [ sp:varName "ref"^^xsd:string
1251 + ]
1252 + ])
1253 + ] ;
1254 + spin:constraint
1255 + [ rdf:type spl:Argument ;
1256 + rdfs:comment "The drill report (left hand side)."^^xsd:string ;
1257 + spl:predicate sp:arg1 ;
1258 + spl:valueType ddr:Obj_drillReport
1259 + ] ;
1260 + spin:returnType xsd:string .
1261 +
1226 ep-spin-lib:selectActivitySuccessType 1262 ep-spin-lib:selectActivitySuccessType
1227 rdf:type spin:Function ; 1263 rdf:type spin:Function ;
1228 rdfs:label "select ActivitySuccessType"^^xsd:string ; 1264 rdfs:label "select ActivitySuccessType"^^xsd:string ;
...@@ -3954,251 +3990,251 @@ ddr:TTUC_Enumeration_1 ...@@ -3954,251 +3990,251 @@ ddr:TTUC_Enumeration_1
3954 rdfs:label "Enumeration"^^xsd:string ; 3990 rdfs:label "Enumeration"^^xsd:string ;
3955 dtype:value ddr:TTUC_degC . 3991 dtype:value ddr:TTUC_degC .
3956 3992
3957 -_:b1 sp:varName "uri"^^xsd:string . 3993 +_:b86
3958 - 3994 + sp:varName "yieldPointScale"^^xsd:string .
3959 -_:b2 sp:varName "uri"^^xsd:string .
3960 3995
3961 -_:b3 sp:varName "uri"^^xsd:string . 3996 +_:b85
3997 + sp:varName "wirelineFormationTestGoodnessOfSealType"^^xsd:string .
3962 3998
3963 -_:b4 sp:varName "uri"^^xsd:string . 3999 +_:b84
4000 + sp:varName "wellTestType"^^xsd:string .
3964 4001
3965 -_:b5 sp:varName "uri"^^xsd:string . 4002 +_:b83
4003 + sp:varName "wellKillingType"^^xsd:string .
3966 4004
3967 -_:b6 sp:varName "uri"^^xsd:string . 4005 +_:b82
4006 + sp:varName "wellControlIncidentType"^^xsd:string .
3968 4007
3969 -_:b7 sp:varName "uri"^^xsd:string . 4008 +_:b81
4009 + sp:varName "wellCementJobType"^^xsd:string .
3970 4010
3971 -_:b8 sp:varName "uri"^^xsd:string . 4011 +_:b80
4012 + sp:varName "wellCementJobTopPlugType"^^xsd:string .
3972 4013
3973 -_:b9 sp:varName "uri"^^xsd:string . 4014 +_:b79
4015 + sp:varName "wellCementJobPlugBumpingType"^^xsd:string .
3974 4016
3975 -_:b10 4017 +_:b78
3976 - sp:varName "uri"^^xsd:string . 4018 + sp:varName "wellCementJobFloatHoldingType"^^xsd:string .
3977 4019
3978 -_:b11 4020 +_:b77
3979 - sp:varName "uri"^^xsd:string . 4021 + sp:varName "wellCementJobCasingRotationType"^^xsd:string .
3980 4022
3981 -_:b12 4023 +_:b76
3982 - sp:varName "uri"^^xsd:string . 4024 + sp:varName "wellCementJobCasingReciprocationType"^^xsd:string .
3983 4025
3984 -_:b13 4026 +_:b75
3985 - sp:varName "uri"^^xsd:string . 4027 + sp:varName "wellCementJobBottomPlugType"^^xsd:string .
3986 4028
3987 -_:b14 4029 +_:b74
3988 - sp:varName "uri"^^xsd:string . 4030 + sp:varName "wellBoreTightnessType"^^xsd:string .
3989 4031
3990 -_:b15 4032 +_:b73
3991 - sp:varName "uri"^^xsd:string . 4033 + sp:varName "wellBoreHphtType"^^xsd:string .
3992 4034
3993 -_:b16 4035 +_:b72
3994 - sp:varName "uri"^^xsd:string . 4036 + sp:varName "wellBoreDrillingType"^^xsd:string .
3995 4037
3996 -_:b17 4038 +_:b71
3997 - sp:varName "uri"^^xsd:string . 4039 + sp:varName "volumetricFlowRateScale"^^xsd:string .
3998 4040
3999 -_:b18 4041 +_:b70
4000 - sp:varName "uri"^^xsd:string . 4042 + sp:varName "volumeScale"^^xsd:string .
4001 4043
4002 -_:b19 4044 +_:b69
4003 - sp:varName "uri"^^xsd:string . 4045 + sp:varName "durationScale"^^xsd:string .
4004 4046
4005 -_:b20 4047 +_:b68
4006 - sp:varName "uri"^^xsd:string . 4048 + sp:varName "temperatureScale"^^xsd:string .
4007 4049
4008 -_:b21 4050 +_:b67
4009 - sp:varName "uri"^^xsd:string . 4051 + sp:varName "strengthScale"^^xsd:string .
4010 4052
4011 -_:b22 4053 +_:b66
4012 - sp:varName "uri"^^xsd:string . 4054 + sp:varName "speedScale"^^xsd:string .
4013 4055
4014 -_:b23 4056 +_:b65
4015 - sp:varName "uri"^^xsd:string . 4057 + sp:varName "specificVolumeScale"^^xsd:string .
4016 4058
4017 -_:b24 4059 +_:b64
4018 - sp:varName "uri"^^xsd:string . 4060 + sp:varName "specificMassScale"^^xsd:string .
4019 4061
4020 -_:b25 4062 +_:b63
4021 - sp:varName "uri"^^xsd:string . 4063 + sp:varName "pressureTestType"^^xsd:string .
4022 4064
4023 -_:b26 4065 +_:b62
4024 - sp:varName "uri"^^xsd:string . 4066 + sp:varName "pressureScale"^^xsd:string .
4025 4067
4026 -_:b27 4068 +_:b61
4027 - sp:varName "uri"^^xsd:string . 4069 + sp:varName "porePressureDeterminationType"^^xsd:string .
4028 4070
4029 -_:b28 4071 +_:b60
4030 - sp:varName "uri"^^xsd:string . 4072 + sp:varName "plasticViscosityScale"^^xsd:string .
4031 4073
4032 -_:b29 4074 +_:b59
4033 - sp:varName "uri"^^xsd:string . 4075 + sp:varName "angleScale"^^xsd:string .
4034 4076
4035 -_:b30 4077 +_:b58
4036 - sp:varName "uri"^^xsd:string . 4078 + sp:varName "mudClass"^^xsd:string .
4037 4079
4038 -_:b31 4080 +_:b57
4039 - sp:varName "normalizedStr"^^xsd:string . 4081 + sp:varName "massPerUnitLengthScale"^^xsd:string .
4040 4082
4041 -_:b32 4083 +_:b56
4042 - sp:varName "s1"^^xsd:string . 4084 + sp:varName "lengthScale"^^xsd:string .
4043 4085
4044 -_:b33 4086 +_:b55
4045 - sp:varName "s2"^^xsd:string . 4087 + sp:varName "dailyDrillingReportType"^^xsd:string .
4046 4088
4047 -_:b34 4089 +_:b54
4048 - sp:varName "t0a"^^xsd:string . 4090 + sp:varName "innerBarrelType"^^xsd:string .
4049 4091
4050 -_:b35 4092 +_:b53
4051 - sp:varName "t0b"^^xsd:string . 4093 + sp:varName "gasReadingType"^^xsd:string .
4052 4094
4053 -_:b36 4095 +_:b52
4054 - sp:varName "t1"^^xsd:string . 4096 + sp:varName "fluidType"^^xsd:string .
4055 4097
4056 -_:b37 4098 +_:b51
4057 - sp:varName "t2"^^xsd:string . 4099 + sp:varName "fixedOrMoveableRigType"^^xsd:string .
4058 4100
4059 -_:b38 4101 +_:b50
4060 - sp:varName "t3"^^xsd:string . 4102 + sp:varName "drillingEquipmentType"^^xsd:string .
4061 4103
4062 -_:b39 4104 +_:b49
4063 - sp:varName "t4"^^xsd:string . 4105 + sp:varName "drillingActivityTypeAccordingToEquipmentType"^^xsd:string .
4064 4106
4065 -_:b40 4107 +_:b48
4066 - sp:varName "activitySuccessType"^^xsd:string . 4108 + sp:varName "drillingActivityPurposeType"^^xsd:string .
4067 4109
4068 -_:b41 4110 +_:b47
4069 - sp:varName "casingRoleType"^^xsd:string . 4111 + sp:varName "drillingActivityOutcomeType"^^xsd:string .
4070 4112
4071 -_:b42 4113 +_:b46
4072 - sp:varName "cementingFluidReturnType"^^xsd:string . 4114 + sp:varName "densityScale"^^xsd:string .
4073 4115
4074 -_:b43 4116 +_:b45
4075 - sp:varName "classOfWellDatumObject"^^xsd:string . 4117 + sp:varName "dailyDrillingReportType"^^xsd:string .
4076 4118
4077 _:b44 4119 _:b44
4078 sp:varName "componentType"^^xsd:string . 4120 sp:varName "componentType"^^xsd:string .
4079 4121
4080 -_:b45 4122 +_:b43
4081 - sp:varName "dailyDrillingReportType"^^xsd:string . 4123 + sp:varName "classOfWellDatumObject"^^xsd:string .
4082 4124
4083 -_:b46 4125 +_:b42
4084 - sp:varName "densityScale"^^xsd:string . 4126 + sp:varName "cementingFluidReturnType"^^xsd:string .
4085 4127
4086 -_:b47 4128 +_:b41
4087 - sp:varName "drillingActivityOutcomeType"^^xsd:string . 4129 + sp:varName "casingRoleType"^^xsd:string .
4088 4130
4089 -_:b48 4131 +_:b40
4090 - sp:varName "drillingActivityPurposeType"^^xsd:string . 4132 + sp:varName "activitySuccessType"^^xsd:string .
4091 4133
4092 -_:b49 4134 +_:b39
4093 - sp:varName "drillingActivityTypeAccordingToEquipmentType"^^xsd:string . 4135 + sp:varName "t4"^^xsd:string .
4094 4136
4095 -_:b50 4137 +_:b38
4096 - sp:varName "drillingEquipmentType"^^xsd:string . 4138 + sp:varName "t3"^^xsd:string .
4097 4139
4098 -_:b51 4140 +_:b37
4099 - sp:varName "fixedOrMoveableRigType"^^xsd:string . 4141 + sp:varName "t2"^^xsd:string .
4100 4142
4101 -_:b52 4143 +_:b36
4102 - sp:varName "fluidType"^^xsd:string . 4144 + sp:varName "t1"^^xsd:string .
4103 4145
4104 -_:b53 4146 +_:b35
4105 - sp:varName "gasReadingType"^^xsd:string . 4147 + sp:varName "t0b"^^xsd:string .
4106 4148
4107 -_:b54 4149 +_:b34
4108 - sp:varName "innerBarrelType"^^xsd:string . 4150 + sp:varName "t0a"^^xsd:string .
4109 4151
4110 -_:b55 4152 +_:b33
4111 - sp:varName "dailyDrillingReportType"^^xsd:string . 4153 + sp:varName "s2"^^xsd:string .
4112 4154
4113 -_:b56 4155 +_:b32
4114 - sp:varName "lengthScale"^^xsd:string . 4156 + sp:varName "s1"^^xsd:string .
4115 4157
4116 -_:b57 4158 +_:b31
4117 - sp:varName "massPerUnitLengthScale"^^xsd:string . 4159 + sp:varName "normalizedStr"^^xsd:string .
4118 4160
4119 -_:b58 4161 +_:b30
4120 - sp:varName "mudClass"^^xsd:string . 4162 + sp:varName "uri"^^xsd:string .
4121 4163
4122 -_:b59 4164 +_:b29
4123 - sp:varName "angleScale"^^xsd:string . 4165 + sp:varName "uri"^^xsd:string .
4124 4166
4125 -_:b60 4167 +_:b28
4126 - sp:varName "plasticViscosityScale"^^xsd:string . 4168 + sp:varName "uri"^^xsd:string .
4127 4169
4128 -_:b61 4170 +_:b27
4129 - sp:varName "porePressureDeterminationType"^^xsd:string . 4171 + sp:varName "uri"^^xsd:string .
4130 4172
4131 -_:b62 4173 +_:b26
4132 - sp:varName "pressureScale"^^xsd:string . 4174 + sp:varName "uri"^^xsd:string .
4133 4175
4134 -_:b63 4176 +_:b25
4135 - sp:varName "pressureTestType"^^xsd:string . 4177 + sp:varName "uri"^^xsd:string .
4136 4178
4137 -_:b64 4179 +_:b24
4138 - sp:varName "specificMassScale"^^xsd:string . 4180 + sp:varName "uri"^^xsd:string .
4139 4181
4140 -_:b65 4182 +_:b23
4141 - sp:varName "specificVolumeScale"^^xsd:string . 4183 + sp:varName "uri"^^xsd:string .
4142 4184
4143 -_:b66 4185 +_:b22
4144 - sp:varName "speedScale"^^xsd:string . 4186 + sp:varName "uri"^^xsd:string .
4145 4187
4146 -_:b67 4188 +_:b21
4147 - sp:varName "strengthScale"^^xsd:string . 4189 + sp:varName "uri"^^xsd:string .
4148 4190
4149 -_:b68 4191 +_:b20
4150 - sp:varName "temperatureScale"^^xsd:string . 4192 + sp:varName "uri"^^xsd:string .
4151 4193
4152 -_:b69 4194 +_:b19
4153 - sp:varName "durationScale"^^xsd:string . 4195 + sp:varName "uri"^^xsd:string .
4154 4196
4155 -_:b70 4197 +_:b18
4156 - sp:varName "volumeScale"^^xsd:string . 4198 + sp:varName "uri"^^xsd:string .
4157 4199
4158 -_:b71 4200 +_:b17
4159 - sp:varName "volumetricFlowRateScale"^^xsd:string . 4201 + sp:varName "uri"^^xsd:string .
4160 4202
4161 -_:b72 4203 +_:b16
4162 - sp:varName "wellBoreDrillingType"^^xsd:string . 4204 + sp:varName "uri"^^xsd:string .
4163 4205
4164 -_:b73 4206 +_:b15
4165 - sp:varName "wellBoreHphtType"^^xsd:string . 4207 + sp:varName "uri"^^xsd:string .
4166 4208
4167 -_:b74 4209 +_:b14
4168 - sp:varName "wellBoreTightnessType"^^xsd:string . 4210 + sp:varName "uri"^^xsd:string .
4169 4211
4170 -_:b75 4212 +_:b13
4171 - sp:varName "wellCementJobBottomPlugType"^^xsd:string . 4213 + sp:varName "uri"^^xsd:string .
4172 4214
4173 -_:b76 4215 +_:b12
4174 - sp:varName "wellCementJobCasingReciprocationType"^^xsd:string . 4216 + sp:varName "uri"^^xsd:string .
4175 4217
4176 -_:b77 4218 +_:b11
4177 - sp:varName "wellCementJobCasingRotationType"^^xsd:string . 4219 + sp:varName "uri"^^xsd:string .
4178 4220
4179 -_:b78 4221 +_:b10
4180 - sp:varName "wellCementJobFloatHoldingType"^^xsd:string . 4222 + sp:varName "uri"^^xsd:string .
4181 4223
4182 -_:b79 4224 +_:b9 sp:varName "uri"^^xsd:string .
4183 - sp:varName "wellCementJobPlugBumpingType"^^xsd:string .
4184 4225
4185 -_:b80 4226 +_:b8 sp:varName "uri"^^xsd:string .
4186 - sp:varName "wellCementJobTopPlugType"^^xsd:string .
4187 4227
4188 -_:b81 4228 +_:b7 sp:varName "uri"^^xsd:string .
4189 - sp:varName "wellCementJobType"^^xsd:string .
4190 4229
4191 -_:b82 4230 +_:b6 sp:varName "uri"^^xsd:string .
4192 - sp:varName "wellControlIncidentType"^^xsd:string .
4193 4231
4194 -_:b83 4232 +_:b5 sp:varName "uri"^^xsd:string .
4195 - sp:varName "wellKillingType"^^xsd:string .
4196 4233
4197 -_:b84 4234 +_:b4 sp:varName "uri"^^xsd:string .
4198 - sp:varName "wellTestType"^^xsd:string .
4199 4235
4200 -_:b85 4236 +_:b3 sp:varName "uri"^^xsd:string .
4201 - sp:varName "wirelineFormationTestGoodnessOfSealType"^^xsd:string .
4202 4237
4203 -_:b86 4238 +_:b2 sp:varName "uri"^^xsd:string .
4204 - sp:varName "yieldPointScale"^^xsd:string . 4239 +
4240 +_:b1 sp:varName "uri"^^xsd:string .
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
8 # imports: http://www.reportinghub.no/ep/schema/1.0/production-report 8 # imports: http://www.reportinghub.no/ep/schema/1.0/production-report
9 # imports: http://www.reportinghub.no/ep/schema/1.0/report 9 # imports: http://www.reportinghub.no/ep/schema/1.0/report
10 # imports: http://www.reportinghub.no/np/schema/1.0/npd 10 # imports: http://www.reportinghub.no/np/schema/1.0/npd
11 +# imports: http://www.reportinghub.no/system/schema/reporting
11 12
12 @prefix afn: <http://jena.hpl.hp.com/ARQ/function#> . 13 @prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
13 @prefix arg: <http://spinrdf.org/arg#> . 14 @prefix arg: <http://spinrdf.org/arg#> .
...@@ -64,6 +65,11 @@ arg:report ...@@ -64,6 +65,11 @@ arg:report
64 rdfs:label "report"^^xsd:string ; 65 rdfs:label "report"^^xsd:string ;
65 rdfs:subPropertyOf sp:arg . 66 rdfs:subPropertyOf sp:arg .
66 67
68 +arg:reportType
69 + rdf:type rdf:Property ;
70 + rdfs:label "report type"^^xsd:string ;
71 + rdfs:subPropertyOf sp:arg .
72 +
67 arg:resource 73 arg:resource
68 rdf:type rdf:Property ; 74 rdf:type rdf:Property ;
69 rdfs:label "resource"^^xsd:string ; 75 rdfs:label "resource"^^xsd:string ;
...@@ -121,15 +127,15 @@ arg:wellName ...@@ -121,15 +127,15 @@ arg:wellName
121 ] ; 127 ] ;
122 spin:constraint 128 spin:constraint
123 [ rdf:type spl:Argument ; 129 [ rdf:type spl:Argument ;
124 - rdfs:comment "The value to match against."^^xsd:string ;
125 - spl:predicate sp:arg1
126 - ] ;
127 - spin:constraint
128 - [ rdf:type spl:Argument ;
129 rdfs:comment "The property that must be used in the result resource."^^xsd:string ; 130 rdfs:comment "The property that must be used in the result resource."^^xsd:string ;
130 spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ; 131 spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ;
131 spl:valueType rdf:Property 132 spl:valueType rdf:Property
132 ] ; 133 ] ;
134 + spin:constraint
135 + [ rdf:type spl:Argument ;
136 + rdfs:comment "The value to match against."^^xsd:string ;
137 + spl:predicate sp:arg1
138 + ] ;
133 spin:returnType rdfs:Resource . 139 spin:returnType rdfs:Resource .
134 140
135 npdata:npd 141 npdata:npd
...@@ -139,7 +145,7 @@ npdata:npd ...@@ -139,7 +145,7 @@ npdata:npd
139 <http://www.reportinghub.no/spin/rh> 145 <http://www.reportinghub.no/spin/rh>
140 rdf:type owl:Ontology ; 146 rdf:type owl:Ontology ;
141 rdfs:comment "A collection of SPIN functions and templates to support working with the ReportingHub schemas."^^xsd:string ; 147 rdfs:comment "A collection of SPIN functions and templates to support working with the ReportingHub schemas."^^xsd:string ;
142 - owl:imports <http://spinrdf.org/spin> , <http://topbraid.org/spin/spinmapl> , <http://www.linkedmodel.org/schema/dtype> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/production-report> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/np/schema/1.0/npd> ; 148 + owl:imports <http://spinrdf.org/spin> , <http://topbraid.org/spin/spinmapl> , <http://www.linkedmodel.org/schema/dtype> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/production-report> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/system/schema/reporting> ;
143 owl:versionInfo "0.1.1"^^xsd:string . 149 owl:versionInfo "0.1.1"^^xsd:string .
144 150
145 rhspin:DDRTableTemplates 151 rhspin:DDRTableTemplates
...@@ -423,15 +429,15 @@ rhspin:WDRTableTemplates ...@@ -423,15 +429,15 @@ rhspin:WDRTableTemplates
423 spin:abstract "true"^^xsd:boolean ; 429 spin:abstract "true"^^xsd:boolean ;
424 spin:constraint 430 spin:constraint
425 [ rdf:type spl:Argument ; 431 [ rdf:type spl:Argument ;
426 - rdfs:comment "The start date of the reporting week."^^xsd:string ;
427 - spl:predicate arg:startDate ;
428 - spl:valueType xsd:date
429 - ] ;
430 - spin:constraint
431 - [ rdf:type spl:Argument ;
432 rdfs:comment "The DDR that serves as root of the query."^^xsd:string ; 432 rdfs:comment "The DDR that serves as root of the query."^^xsd:string ;
433 spl:predicate arg:wellBore ; 433 spl:predicate arg:wellBore ;
434 spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> 434 spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore>
435 + ] ;
436 + spin:constraint
437 + [ rdf:type spl:Argument ;
438 + rdfs:comment "The start date of the reporting week."^^xsd:string ;
439 + spl:predicate arg:startDate ;
440 + spl:valueType xsd:date
435 ] . 441 ] .
436 442
437 rhspin:baaById 443 rhspin:baaById
...@@ -934,16 +940,16 @@ rhspin:ddrOfWeek ...@@ -934,16 +940,16 @@ rhspin:ddrOfWeek
934 ] ; 940 ] ;
935 spin:constraint 941 spin:constraint
936 [ rdf:type spl:Argument ; 942 [ rdf:type spl:Argument ;
937 - rdfs:comment "The first day of the week."^^xsd:string ;
938 - spl:predicate sp:arg1 ;
939 - spl:valueType xsd:date
940 - ] ;
941 - spin:constraint
942 - [ rdf:type spl:Argument ;
943 rdfs:comment "The well bore that the DDR must be about."^^xsd:string ; 943 rdfs:comment "The well bore that the DDR must be about."^^xsd:string ;
944 spl:predicate sp:arg2 ; 944 spl:predicate sp:arg2 ;
945 spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> 945 spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore>
946 ] ; 946 ] ;
947 + spin:constraint
948 + [ rdf:type spl:Argument ;
949 + rdfs:comment "The first day of the week."^^xsd:string ;
950 + spl:predicate sp:arg1 ;
951 + spl:valueType xsd:date
952 + ] ;
947 spin:returnType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> . 953 spin:returnType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> .
948 954
949 rhspin:ddrWellBoreId 955 rhspin:ddrWellBoreId
...@@ -1030,15 +1036,15 @@ rhspin:dtypeValue ...@@ -1030,15 +1036,15 @@ rhspin:dtypeValue
1030 ] ; 1036 ] ;
1031 spin:constraint 1037 spin:constraint
1032 [ rdf:type spl:Argument ; 1038 [ rdf:type spl:Argument ;
1033 - rdfs:comment "The predicate that points to the reified value."^^xsd:string ;
1034 - spl:predicate sp:arg2 ;
1035 - spl:valueType rdf:Property
1036 - ] ;
1037 - spin:constraint
1038 - [ rdf:type spl:Argument ;
1039 rdfs:comment "The subject of the value."^^xsd:string ; 1039 rdfs:comment "The subject of the value."^^xsd:string ;
1040 spl:predicate sp:arg1 ; 1040 spl:predicate sp:arg1 ;
1041 spl:valueType rdfs:Resource 1041 spl:valueType rdfs:Resource
1042 + ] ;
1043 + spin:constraint
1044 + [ rdf:type spl:Argument ;
1045 + rdfs:comment "The predicate that points to the reified value."^^xsd:string ;
1046 + spl:predicate sp:arg2 ;
1047 + spl:valueType rdf:Property
1042 ] . 1048 ] .
1043 1049
1044 rhspin:facilityById 1050 rhspin:facilityById
...@@ -1681,17 +1687,17 @@ rhspin:npdIndividualById ...@@ -1681,17 +1687,17 @@ rhspin:npdIndividualById
1681 ] ; 1687 ] ;
1682 spin:constraint 1688 spin:constraint
1683 [ rdf:type spl:Argument ; 1689 [ rdf:type spl:Argument ;
1684 - rdfs:comment "The NPD id to match."^^xsd:string ;
1685 - spl:predicate arg:id ;
1686 - spl:valueType xsd:string
1687 - ] ;
1688 - spin:constraint
1689 - [ rdf:type spl:Argument ;
1690 rdfs:comment "The rdf:type that the result must have."^^xsd:string ; 1690 rdfs:comment "The rdf:type that the result must have."^^xsd:string ;
1691 spl:optional "true"^^xsd:boolean ; 1691 spl:optional "true"^^xsd:boolean ;
1692 spl:predicate arg:type ; 1692 spl:predicate arg:type ;
1693 spl:valueType rdfs:Class 1693 spl:valueType rdfs:Class
1694 ] ; 1694 ] ;
1695 + spin:constraint
1696 + [ rdf:type spl:Argument ;
1697 + rdfs:comment "The NPD id to match."^^xsd:string ;
1698 + spl:predicate arg:id ;
1699 + spl:valueType xsd:string
1700 + ] ;
1695 spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . 1701 spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> .
1696 1702
1697 rhspin:npdIndividualByName 1703 rhspin:npdIndividualByName
...@@ -1756,17 +1762,17 @@ rhspin:npdIndividualByName ...@@ -1756,17 +1762,17 @@ rhspin:npdIndividualByName
1756 ] ; 1762 ] ;
1757 spin:constraint 1763 spin:constraint
1758 [ rdf:type spl:Argument ; 1764 [ rdf:type spl:Argument ;
1759 - rdfs:comment "The NPD name to match."^^xsd:string ;
1760 - spl:predicate arg:name ;
1761 - spl:valueType xsd:string
1762 - ] ;
1763 - spin:constraint
1764 - [ rdf:type spl:Argument ;
1765 rdfs:comment "The rdf:type that the result must have."^^xsd:string ; 1765 rdfs:comment "The rdf:type that the result must have."^^xsd:string ;
1766 spl:optional "true"^^xsd:boolean ; 1766 spl:optional "true"^^xsd:boolean ;
1767 spl:predicate arg:type ; 1767 spl:predicate arg:type ;
1768 spl:valueType rdfs:Class 1768 spl:valueType rdfs:Class
1769 ] ; 1769 ] ;
1770 + spin:constraint
1771 + [ rdf:type spl:Argument ;
1772 + rdfs:comment "The NPD name to match."^^xsd:string ;
1773 + spl:predicate arg:name ;
1774 + spl:valueType xsd:string
1775 + ] ;
1770 spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . 1776 spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> .
1771 1777
1772 rhspin:npdName 1778 rhspin:npdName
...@@ -1812,8 +1818,9 @@ rhspin:npdTripleExists ...@@ -1812,8 +1818,9 @@ rhspin:npdTripleExists
1812 ] ; 1818 ] ;
1813 spin:constraint 1819 spin:constraint
1814 [ rdf:type spl:Argument ; 1820 [ rdf:type spl:Argument ;
1815 - rdfs:comment "The object to match."^^xsd:string ; 1821 + rdfs:comment "The subject to find"^^xsd:string ;
1816 - spl:predicate sp:arg3 1822 + spl:predicate sp:arg1 ;
1823 + spl:valueType rdfs:Resource
1817 ] ; 1824 ] ;
1818 spin:constraint 1825 spin:constraint
1819 [ rdf:type spl:Argument ; 1826 [ rdf:type spl:Argument ;
...@@ -1823,9 +1830,8 @@ rhspin:npdTripleExists ...@@ -1823,9 +1830,8 @@ rhspin:npdTripleExists
1823 ] ; 1830 ] ;
1824 spin:constraint 1831 spin:constraint
1825 [ rdf:type spl:Argument ; 1832 [ rdf:type spl:Argument ;
1826 - rdfs:comment "The subject to find"^^xsd:string ; 1833 + rdfs:comment "The object to match."^^xsd:string ;
1827 - spl:predicate sp:arg1 ; 1834 + spl:predicate sp:arg3
1828 - spl:valueType rdfs:Resource
1829 ] ; 1835 ] ;
1830 spin:returnType xsd:boolean . 1836 spin:returnType xsd:boolean .
1831 1837
...@@ -1930,11 +1936,30 @@ rhspin:tufById ...@@ -1930,11 +1936,30 @@ rhspin:tufById
1930 spl:valueType xsd:string 1936 spl:valueType xsd:string
1931 ] . 1937 ] .
1932 1938
1939 +rhspin:userCanDownload
1940 + rdf:type spin:Function ;
1941 + rdfs:comment "Checks whether the current user has the privilege to download reports of a given type. This is used to control which parts of the UI are visible, depending on who is logged in. The implementation of this function is Java only."^^xsd:string ;
1942 + rdfs:label "user can download"^^xsd:string ;
1943 + rdfs:subClassOf spin:Functions ;
1944 + spin:constraint
1945 + [ rdf:type spl:Argument ;
1946 + rdfs:comment "The type of report to check, e.g. REPORT.DDR, REPORT.DPR, REPORT.NPTR, REPORT.WDR."^^xsd:string ;
1947 + spl:predicate arg:reportType ;
1948 + spl:valueType rdfs:Class
1949 + ] ;
1950 + spin:returnType xsd:boolean .
1951 +
1933 rhspin:userCanUpload 1952 rhspin:userCanUpload
1934 rdf:type spin:Function ; 1953 rdf:type spin:Function ;
1935 - rdfs:comment "Checks whether the current user has the privilege to upload reports. This is used to control which parts of the UI are visible, depending on who is logged in. The implementation of this function is Java only."^^xsd:string ; 1954 + rdfs:comment "Checks whether the current user has the privilege to upload reports of a given type. This is used to control which parts of the UI are visible, depending on who is logged in. The implementation of this function is Java only."^^xsd:string ;
1936 rdfs:label "user can upload"^^xsd:string ; 1955 rdfs:label "user can upload"^^xsd:string ;
1937 rdfs:subClassOf spin:Functions ; 1956 rdfs:subClassOf spin:Functions ;
1957 + spin:constraint
1958 + [ rdf:type spl:Argument ;
1959 + rdfs:comment "The type of report to check, e.g. REPORT.DDR, REPORT.DPR."^^xsd:string ;
1960 + spl:predicate arg:reportType ;
1961 + spl:valueType rdfs:Class
1962 + ] ;
1938 spin:returnType xsd:boolean . 1963 spin:returnType xsd:boolean .
1939 1964
1940 rhspin:userIsAppAdmin 1965 rhspin:userIsAppAdmin
...@@ -2053,71 +2078,71 @@ rhspin:wellByName ...@@ -2053,71 +2078,71 @@ rhspin:wellByName
2053 ] ; 2078 ] ;
2054 spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . 2079 spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> .
2055 2080
2056 -_:b1 sp:varName "subject"^^xsd:string . 2081 +_:b26
2057 - 2082 + sp:varName "name"^^xsd:string .
2058 -_:b2 sp:varName "wellBoreName"^^xsd:string .
2059 2083
2060 -_:b3 sp:varName "wellBoreId"^^xsd:string . 2084 +_:b25
2085 + sp:varName "id"^^xsd:string .
2061 2086
2062 -_:b4 sp:varName "wellBore"^^xsd:string . 2087 +_:b24
2088 + sp:varName "t4"^^xsd:string .
2063 2089
2064 -_:b5 sp:varName "wellName"^^xsd:string . 2090 +_:b23
2091 + sp:varName "t3"^^xsd:string .
2065 2092
2066 -_:b6 sp:varName "well"^^xsd:string . 2093 +_:b22
2094 + sp:varName "t2"^^xsd:string .
2067 2095
2068 -_:b7 sp:varName "company"^^xsd:string . 2096 +_:b21
2097 + sp:varName "t1"^^xsd:string .
2069 2098
2070 -_:b8 sp:varName "wellBore"^^xsd:string . 2099 +_:b20
2100 + sp:varName "t0b"^^xsd:string .
2071 2101
2072 -_:b9 sp:varName "company"^^xsd:string . 2102 +_:b19
2103 + sp:varName "t0a"^^xsd:string .
2073 2104
2074 -_:b10 2105 +_:b18
2075 - sp:varName "companyName"^^xsd:string . 2106 + sp:varName "s2"^^xsd:string .
2076 2107
2077 -_:b11 2108 +_:b17
2078 - sp:varName "company"^^xsd:string . 2109 + sp:varName "s1"^^xsd:string .
2079 2110
2080 -_:b12 2111 +_:b16
2081 - sp:varName "wellBore"^^xsd:string . 2112 + sp:varName "normalizedStr"^^xsd:string .
2082 2113
2083 -_:b13 2114 +_:b15
2084 - sp:varName "value"^^xsd:string . 2115 + sp:varName "licence"^^xsd:string .
2085 2116
2086 _:b14 2117 _:b14
2087 sp:varName "reif"^^xsd:string . 2118 sp:varName "reif"^^xsd:string .
2088 2119
2089 -_:b15 2120 +_:b13
2090 - sp:varName "licence"^^xsd:string . 2121 + sp:varName "value"^^xsd:string .
2091 2122
2092 -_:b16 2123 +_:b12
2093 - sp:varName "normalizedStr"^^xsd:string . 2124 + sp:varName "wellBore"^^xsd:string .
2094 2125
2095 -_:b17 2126 +_:b11
2096 - sp:varName "s1"^^xsd:string . 2127 + sp:varName "company"^^xsd:string .
2097 2128
2098 -_:b18 2129 +_:b10
2099 - sp:varName "s2"^^xsd:string . 2130 + sp:varName "companyName"^^xsd:string .
2100 2131
2101 -_:b19 2132 +_:b9 sp:varName "company"^^xsd:string .
2102 - sp:varName "t0a"^^xsd:string .
2103 2133
2104 -_:b20 2134 +_:b8 sp:varName "wellBore"^^xsd:string .
2105 - sp:varName "t0b"^^xsd:string .
2106 2135
2107 -_:b21 2136 +_:b7 sp:varName "company"^^xsd:string .
2108 - sp:varName "t1"^^xsd:string .
2109 2137
2110 -_:b22 2138 +_:b6 sp:varName "well"^^xsd:string .
2111 - sp:varName "t2"^^xsd:string .
2112 2139
2113 -_:b23 2140 +_:b5 sp:varName "wellName"^^xsd:string .
2114 - sp:varName "t3"^^xsd:string .
2115 2141
2116 -_:b24 2142 +_:b4 sp:varName "wellBore"^^xsd:string .
2117 - sp:varName "t4"^^xsd:string .
2118 2143
2119 -_:b25 2144 +_:b3 sp:varName "wellBoreId"^^xsd:string .
2120 - sp:varName "id"^^xsd:string .
2121 2145
2122 -_:b26 2146 +_:b2 sp:varName "wellBoreName"^^xsd:string .
2123 - sp:varName "name"^^xsd:string . 2147 +
2148 +_:b1 sp:varName "subject"^^xsd:string .
......