Holger Knublauch
Committed by David Price

Added rhspin:ddrActivityStartDate

......@@ -30,6 +30,11 @@
rdfs:label "company name"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
<http://spinrdf.org/arg#ddr>
rdf:type rdf:Property ;
rdfs:label "ddr"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
<http://spinrdf.org/arg#id>
rdf:type rdf:Property ;
rdfs:label "id"^^xsd:string ;
......@@ -87,14 +92,14 @@
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The property that must be used in the result resource."^^xsd:string ;
spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ;
spl:valueType rdf:Property
rdfs:comment "The value to match against."^^xsd:string ;
spl:predicate sp:arg1
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The value to match against."^^xsd:string ;
spl:predicate sp:arg1
rdfs:comment "The property that must be used in the result resource."^^xsd:string ;
spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ;
spl:valueType rdf:Property
] ;
spin:returnType rdfs:Resource .
......@@ -349,6 +354,35 @@ rhspin:companyWithName
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/organization#Company> .
rhspin:ddrActivityStartDate
rdf:type spin:Function ;
rdfs:comment "Gets the declared start time of the activity in a DDR, as an xsd:date literal."^^xsd:string ;
rdfs:label "DDR activity start date"^^xsd:string ;
rdfs:subClassOf spin:Functions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type xsd:date ;
sp:arg1 _:b15
]) ;
sp:where ([ rdf:type sp:TriplePath ;
sp:object _:b15 ;
sp:path [ rdf:type sp:SeqPath ;
sp:path1 <http://www.reportinghub.no/ep/schema/activity#reportOn> ;
sp:path2 <http://www.reportinghub.no/ep/schema/activity#startedAt>
] ;
sp:subject
[ sp:varName "ddr"^^xsd:string
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The DailyDrillingReport to get the start date of."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#ddr> ;
spl:valueType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport>
] ;
spin:returnType xsd:date .
rhspin:discoveryById
rdf:type spin:Function ;
rdfs:label "discovery by id"^^xsd:string ;
......@@ -378,26 +412,26 @@ rhspin:dtypeValue
rdfs:subClassOf spl:OntologyFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b15) ;
sp:where ([ sp:object _:b16 ;
sp:resultVariables (_:b16) ;
sp:where ([ sp:object _:b17 ;
sp:predicate spin:_arg2 ;
sp:subject spin:_arg1
] [ sp:object _:b15 ;
] [ sp:object _:b16 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b16
sp:subject _:b17
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The subject of the value."^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The predicate that points to the reified value."^^xsd:string ;
spl:predicate sp:arg2 ;
spl:valueType rdf:Property
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The subject of the value."^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
] .
rhspin:facilityById
......@@ -474,9 +508,9 @@ rhspin:licenceForWellBore
rdfs:subClassOf spin:Functions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b17) ;
sp:resultVariables (_:b18) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object _:b17 ;
sp:elements ([ sp:object _:b18 ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
......@@ -500,7 +534,7 @@ rhspin:normalizeString
rdfs:subClassOf spl:StringFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b18) ;
sp:resultVariables (_:b19) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:regex ;
......@@ -508,67 +542,67 @@ rhspin:normalizeString
sp:arg2 "\\((.*)\\)" ;
sp:arg3 ""
] ;
sp:variable _:b19
sp:variable _:b20
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:trim ;
sp:arg1 _:b19
sp:arg1 _:b20
] ;
sp:variable _:b20
sp:variable _:b21
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:encodeURL ;
sp:arg1 _:b20
sp:arg1 _:b21
] ;
sp:variable _:b21
sp:variable _:b22
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:regex ;
sp:arg1 _:b21 ;
sp:arg1 _:b22 ;
sp:arg2 "%2F" ;
sp:arg3 "_"
] ;
sp:variable _:b22
sp:variable _:b23
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:regex ;
sp:arg1 _:b22 ;
sp:arg1 _:b23 ;
sp:arg2 "%[0-9A-F][0-9A-F]" ;
sp:arg3 ""
] ;
sp:variable _:b23
sp:variable _:b24
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:regex ;
sp:arg1 _:b23 ;
sp:arg1 _:b24 ;
sp:arg2 "\\+" ;
sp:arg3 "_"
] ;
sp:variable _:b24
sp:variable _:b25
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:regex ;
sp:arg1 _:b24 ;
sp:arg1 _:b25 ;
sp:arg2 "_+" ;
sp:arg3 "_"
] ;
sp:variable _:b25
sp:variable _:b26
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:regex ;
sp:arg1 _:b25 ;
sp:arg1 _:b26 ;
sp:arg2 "\\*" ;
sp:arg3 ""
] ;
sp:variable _:b26
sp:variable _:b27
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type xsd:string ;
sp:arg1 [ rdf:type spif:upperCase ;
sp:arg1 _:b26
sp:arg1 _:b27
]
] ;
sp:variable _:b18
sp:variable _:b19
])
] ;
spin:constraint
......@@ -585,9 +619,9 @@ rhspin:npdId
rdfs:subClassOf spl:StringFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b27) ;
sp:resultVariables (_:b28) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object _:b27 ;
sp:elements ([ sp:object _:b28 ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "resource"^^xsd:string
......@@ -610,9 +644,9 @@ rhspin:npdName
rdfs:subClassOf spl:StringFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b28) ;
sp:resultVariables (_:b29) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object _:b28 ;
sp:elements ([ sp:object _:b29 ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "resource"^^xsd:string
......@@ -724,27 +758,27 @@ rhspin:wellBoreByName
rdfs:subClassOf spl:URIFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b29) ;
sp:resultVariables (_:b30) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object _:b30 ;
sp:elements (([ sp:object _:b31 ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject _:b29
sp:subject _:b30
]) ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:replaceAll ;
sp:arg1 _:b30 ;
sp:arg1 _:b31 ;
sp:arg2 "/0" ;
sp:arg3 "/"
] ;
sp:variable _:b31
] [ sp:object _:b31 ;
sp:variable _:b32
] [ sp:object _:b32 ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject _:b29
sp:subject _:b30
]))
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject _:b29
sp:subject _:b30
]) ;
sp:graphNameNode npdata:npd
])
......@@ -783,63 +817,58 @@ rhspin:wellByName
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> .
_:b5 sp:varName "wellName"^^xsd:string .
_:b6 sp:varName "well"^^xsd:string .
_:b8 sp:varName "wellBore"^^xsd:string .
_:b7 sp:varName "company"^^xsd:string .
_:b15
sp:varName "startedAt"^^xsd:string .
_:b31
_:b32
sp:varName "str"^^xsd:string .
_:b30
_:b31
sp:varName "wellBoreName"^^xsd:string .
_:b29
_:b30
sp:varName "wellBore"^^xsd:string .
_:b28
_:b29
sp:varName "name"^^xsd:string .
_:b27
_:b28
sp:varName "id"^^xsd:string .
_:b26
_:b27
sp:varName "t4"^^xsd:string .
_:b25
_:b26
sp:varName "t3"^^xsd:string .
_:b24
_:b25
sp:varName "t2"^^xsd:string .
_:b23
_:b24
sp:varName "t1"^^xsd:string .
_:b22
_:b23
sp:varName "t0b"^^xsd:string .
_:b21
_:b22
sp:varName "t0a"^^xsd:string .
_:b20
_:b21
sp:varName "s2"^^xsd:string .
_:b19
_:b20
sp:varName "s1"^^xsd:string .
_:b18
_:b19
sp:varName "normalizedStr"^^xsd:string .
_:b17
_:b18
sp:varName "licence"^^xsd:string .
_:b16
_:b17
sp:varName "reif"^^xsd:string .
_:b15
_:b16
sp:varName "value"^^xsd:string .
_:b14
......@@ -859,6 +888,14 @@ _:b10
_:b9 sp:varName "licence"^^xsd:string .
_:b8 sp:varName "wellBore"^^xsd:string .
_:b7 sp:varName "company"^^xsd:string .
_:b6 sp:varName "well"^^xsd:string .
_:b5 sp:varName "wellName"^^xsd:string .
_:b4 sp:varName "wellBore"^^xsd:string .
_:b3 sp:varName "wellBoreId"^^xsd:string .
......