Holger Knublauch

Added rhspin:GetLicenceInfo

......@@ -105,15 +105,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
......@@ -138,6 +138,76 @@ rhspin:DDRTableTemplates
spl:valueType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport>
] .
rhspin:GetLicenceInfo
rdf:type spin:SelectTemplate ;
rdfs:comment "Gets the NPD id and a type identifier (\"PL\" or \"BA\") for a licence specified by a name."^^xsd:string ;
rdfs:label "Get licence info"^^xsd:string ;
rdfs:subClassOf spin:SelectTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "id"^^xsd:string
] [ sp:varName "typeName"^^xsd:string
]) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "owner"^^xsd:string
]
] [ sp:object
[ sp:varName "type"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "owner"^^xsd:string
]
] [ sp:object
[ sp:varName "id"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "owner"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
] [ rdf:type sp:NamedGraph ;
sp:elements ([ rdf:type sp:TriplePath ;
sp:object <http://www.reportinghub.no/np/schema/npd#Owner> ;
sp:path [ rdf:type sp:ModPath ;
sp:modMax -2 ;
sp:modMin 0 ;
sp:subPath rdfs:subClassOf
] ;
sp:subject
[ sp:varName "type"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/schema/1.0/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ sp:varName "type"^^xsd:string
] ;
sp:arg2 <http://www.reportinghub.no/np/schema/npd#Licence>
] ;
sp:arg2 "PL" ;
sp:arg3 "BA"
] ;
sp:variable
[ sp:varName "typeName"^^xsd:string
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The name of the licence."^^xsd:string ;
spl:predicate arg:name ;
spl:valueType xsd:string
] .
rhspin:GetWellBoresOfWell
rdf:type spin:SelectTemplate ;
rdfs:comment "Gets an ordered list of well bores that belong to a given Well. Result variables are ?wellBoreId and ?wellBoreName."^^xsd:string ;
......@@ -267,15 +337,15 @@ rhspin:WDRTableTemplates
spin:abstract "true"^^xsd:boolean ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The start date of the reporting week."^^xsd:string ;
spl:predicate arg:startDate ;
spl:valueType xsd:date
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The DDR that serves as root of the query."^^xsd:string ;
spl:predicate arg:wellBore ;
spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore>
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The start date of the reporting week."^^xsd:string ;
spl:predicate arg:startDate ;
spl:valueType xsd:date
] .
rhspin:baaById
......@@ -640,16 +710,16 @@ rhspin:ddrOfWeek
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The first day of the week."^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType xsd:date
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The well bore that the DDR must be about."^^xsd:string ;
spl:predicate sp:arg2 ;
spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore>
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The first day of the week."^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType xsd:date
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> .
rhspin:ddrWellBoreId
......@@ -736,15 +806,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
......@@ -1324,8 +1394,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 ;
......@@ -1335,9 +1406,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 .
......