Holger Knublauch

Added rhspin:graphForWellBoreWithId

......@@ -98,15 +98,15 @@ arg:wellName
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The value to match against."^^xsd:string ;
spl:predicate sp:arg1
] ;
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
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The value to match against."^^xsd:string ;
spl:predicate sp:arg1
] ;
spin:returnType rdfs:Resource .
npdata:npd
......@@ -513,15 +513,15 @@ rhspin:dtypeValue
] ;
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
] ;
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
] .
rhspin:facilityById
......@@ -570,7 +570,7 @@ rhspin:fieldById
rhspin:graphForDDR
rdf:type spin:Function ;
rdfs:comment "Gets the URI resource of the named graph that holds the reports for a given DDR."^^xsd:string ;
rdfs:comment "Gets the URI resource of the named graph that holds the reports for a given DDR. This function needs to be called on the (in-memory) graph that contains the newly generated DDR triples. To get the graph for a DDR later, fetch the well bore id from the reports metadata graph and then call rhspin:graphForWellBoreWithId."^^xsd:string ;
rdfs:label "graph for DDR"^^xsd:string ;
rdfs:subClassOf spin:Functions ;
spin:body
......@@ -617,6 +617,61 @@ rhspin:graphForDDR
] ;
spin:returnType rdfs:Resource .
rhspin:graphForWellBoreWithId
rdf:type spin:Function ;
rdfs:comment "Gets the URI resource of the named graph that holds the reports for a given well bore."^^xsd:string ;
rdfs:label "graph for well bore with id"^^xsd:string ;
rdfs:subClassOf spin:Functions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type sp:iri ;
sp:arg1 [ sp:varName "uri"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "id"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object
[ sp:varName "licence"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object
[ sp:varName "licenceId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "licence"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "https://www.reportinghub.no/ep/graph/licence-" ;
sp:arg2 [ sp:varName "licenceId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "uri"^^xsd:string
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The id of the well bore to get the graph for."^^xsd:string ;
spl:predicate arg:id ;
spl:valueType xsd:string
] ;
spin:returnType rdfs:Resource .
rhspin:licenceById
rdf:type spin:Function ;
rdfs:label "license by id"^^xsd:string ;
......@@ -819,8 +874,9 @@ rhspin:npdTripleExists
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The object to match."^^xsd:string ;
spl:predicate sp:arg3
rdfs:comment "The subject to find"^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
] ;
spin:constraint
[ rdf:type spl:Argument ;
......@@ -830,9 +886,8 @@ rhspin:npdTripleExists
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The subject to find"^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
rdfs:comment "The object to match."^^xsd:string ;
spl:predicate sp:arg3
] ;
spin:returnType xsd:boolean .
......@@ -979,15 +1034,6 @@ rhspin:wellByName
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> .
_:b17
sp:varName "wellBore"^^xsd:string .
_:b16
sp:varName "company"^^xsd:string .
_:b15
sp:varName "companyName"^^xsd:string .
_:b39
sp:varName "wellBore"^^xsd:string .
......@@ -1054,6 +1100,15 @@ _:b19
_:b18
sp:varName "startedAt"^^xsd:string .
_:b17
sp:varName "wellBore"^^xsd:string .
_:b16
sp:varName "company"^^xsd:string .
_:b15
sp:varName "companyName"^^xsd:string .
_:b14
sp:varName "company"^^xsd:string .
......