Holger Knublauch

Added rhspin:fieldNameByOwner

......@@ -116,15 +116,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
......@@ -418,15 +418,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
......@@ -876,16 +876,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
......@@ -972,15 +972,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
......@@ -1027,6 +1027,41 @@ rhspin:fieldById
spl:valueType xsd:string
] .
rhspin:fieldNameByOwner
rdf:type spin:Function ;
rdfs:label "field name by owner"^^xsd:string ;
rdfs:subClassOf spin:Functions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "fieldName"^^xsd:string
]) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "owner"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#fieldOwner> ;
sp:subject
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "field"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The licence or BAA to get the field name of."^^xsd:string ;
spl:predicate arg:owner ;
spl:valueType <http://www.reportinghub.no/np/schema/npd#Owner>
] ;
spin:returnType xsd:string .
rhspin:graphForDDR
rdf:type spin:Function ;
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 ;
......@@ -1588,17 +1623,17 @@ rhspin:npdIndividualById
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The NPD id to match."^^xsd:string ;
spl:predicate arg:id ;
spl:valueType xsd:string
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The rdf:type that the result must have."^^xsd:string ;
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:type ;
spl:valueType rdfs:Class
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The NPD id to match."^^xsd:string ;
spl:predicate arg:id ;
spl:valueType xsd:string
] ;
spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> .
rhspin:npdIndividualByName
......@@ -1663,17 +1698,17 @@ rhspin:npdIndividualByName
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The NPD name to match."^^xsd:string ;
spl:predicate arg:name ;
spl:valueType xsd:string
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The rdf:type that the result must have."^^xsd:string ;
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:type ;
spl:valueType rdfs:Class
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The NPD name to match."^^xsd:string ;
spl:predicate arg:name ;
spl:valueType xsd:string
] ;
spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> .
rhspin:npdName
......@@ -1719,8 +1754,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 ;
......@@ -1730,9 +1766,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 .
......