Holger Knublauch

Added npd:licenceOperator and mapping to fill it, changed upload

constraints
......@@ -92,15 +92,27 @@
sp:arg1 [ sp:varName "company"^^xsd:string
]
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "wellBore"^^xsd:string
] ;
sp:predicate rhspin:companyHasLicenceForWellBore ;
sp:subject
[ sp:varName "company"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:licenceForWellBore ;
arg:wellBore
[ sp:varName "wellBore"^^xsd:string
]
] ;
sp:variable
[ sp:varName "licence"^^xsd:string
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:not ;
sp:arg1 [ rdf:type rhspin:npdTripleExists ;
sp:arg1 [ sp:varName "licence"^^xsd:string
] ;
sp:arg2 <http://www.reportinghub.no/np/schema/npd#licenceOperator> ;
sp:arg3 [ sp:varName "company"^^xsd:string
]
]
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:coalesce ;
......@@ -112,7 +124,20 @@
sp:arg2 "Unknown well bore"
] ;
sp:variable
[ sp:varName "displayName"^^xsd:string
[ sp:varName "wellBoreName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:coalesce ;
sp:arg1 [ rdf:type rhspin:npdName ;
arg:resource
[ sp:varName "licence"^^xsd:string
]
] ;
sp:arg2 "Unknown licence"
] ;
sp:variable
[ sp:varName "licenceName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -120,8 +145,11 @@
sp:arg1 "Your company (" ;
sp:arg2 [ sp:varName "companyName"^^xsd:string
] ;
sp:arg3 ") does not hold a licence for well bore " ;
sp:arg4 [ sp:varName "displayName"^^xsd:string
sp:arg3 ") is not the operator of licence " ;
sp:arg4 [ sp:varName "licenceName"^^xsd:string
] ;
sp:arg5 " for well bore " ;
sp:arg6 [ sp:varName "wellBoreName"^^xsd:string
]
] ;
sp:variable
......
This diff could not be displayed because it is too large.
......@@ -7,6 +7,7 @@
# imports: file:///www.reportinghub.no/transform/npd/facilitymoveable
# imports: file:///www.reportinghub.no/transform/npd/field
# imports: file:///www.reportinghub.no/transform/npd/licence
# imports: file:///www.reportinghub.no/transform/npd/licenceop
# imports: file:///www.reportinghub.no/transform/npd/licensee
# imports: file:///www.reportinghub.no/transform/npd/tufoperator
# imports: file:///www.reportinghub.no/transform/npd/wbdev
......@@ -24,8 +25,8 @@
@prefix : <http://www.reportinghub.no/transform/spreadsheets2npd#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix baa-2011-07-30: <file:///www.reportinghub.no/transform/npd/baa-2011-07-30#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix licenceop: <file:///www.reportinghub.no/transform/npd/licenceop#> .
@prefix npdi: <http://www.reportinghub.no/np/data/npd/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
......@@ -651,6 +652,60 @@
<http://www.reportinghub.no/np/schema/npd#licensingActivity>
] .
licenceop:LicenceOp
spinmap:rule
[ rdf:type spinmap:Mapping-0-1 ;
spinmap:context :LicenceOp-Licence ;
spinmap:expression <http://www.reportinghub.no/np/schema/npd#Licence> ;
spinmap:targetPredicate1
rdf:type
] ;
spinmap:rule
[ rdf:type sp:Construct ;
sp:templates ([ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceOperator> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:notExists ;
sp:elements ([ sp:object
[ sp:varName "dateTo"^^xsd:string
] ;
sp:predicate licenceop:prlOperDateValidTo ;
sp:subject spin:_this
])
]
] [ sp:object
[ sp:varName "companyId"^^xsd:string
] ;
sp:predicate licenceop:cmpNpdidCompany ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:companyById ;
arg:id [ sp:varName "companyId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "operator"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spinmap:targetResource ;
sp:arg1 spin:_this ;
spinmap:context :LicenceOp-Licence
] ;
sp:variable
[ sp:varName "target"^^xsd:string
]
])
] .
<file:///www.reportinghub.no/transform/npd/licensee#Licensee>
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
......@@ -1339,7 +1394,7 @@ arg:wellName
<http://www.reportinghub.no/transform/spreadsheets2npd>
rdf:type owl:Ontology ;
rdfs:comment "Takes spreadsheets imported from the NPD fact pages and maps them into the NPD ontology."^^xsd:string ;
owl:imports <file:///www.reportinghub.no/transform/npd/baa> , <file:///www.reportinghub.no/transform/npd/baalicensee> , <file:///www.reportinghub.no/transform/npd/company> , <file:///www.reportinghub.no/transform/npd/discovery> , <file:///www.reportinghub.no/transform/npd/facilityfixed> , <file:///www.reportinghub.no/transform/npd/facilitymoveable> , <file:///www.reportinghub.no/transform/npd/field> , <file:///www.reportinghub.no/transform/npd/licence> , <file:///www.reportinghub.no/transform/npd/licensee> , <file:///www.reportinghub.no/transform/npd/tufoperator> , <file:///www.reportinghub.no/transform/npd/wbdev> , <file:///www.reportinghub.no/transform/npd/wbexp> , <file:///www.reportinghub.no/transform/npd/wbid> , <file:///www.reportinghub.no/transform/npd/wbsha> , <http://spinrdf.org/spin> , <http://topbraid.org/spin/spinmapl> , <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/well> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/spin/rh> ;
owl:imports <file:///www.reportinghub.no/transform/npd/baa> , <file:///www.reportinghub.no/transform/npd/baalicensee> , <file:///www.reportinghub.no/transform/npd/company> , <file:///www.reportinghub.no/transform/npd/discovery> , <file:///www.reportinghub.no/transform/npd/facilityfixed> , <file:///www.reportinghub.no/transform/npd/facilitymoveable> , <file:///www.reportinghub.no/transform/npd/field> , <file:///www.reportinghub.no/transform/npd/licence> , <file:///www.reportinghub.no/transform/npd/licenceop> , <file:///www.reportinghub.no/transform/npd/licensee> , <file:///www.reportinghub.no/transform/npd/tufoperator> , <file:///www.reportinghub.no/transform/npd/wbdev> , <file:///www.reportinghub.no/transform/npd/wbexp> , <file:///www.reportinghub.no/transform/npd/wbid> , <file:///www.reportinghub.no/transform/npd/wbsha> , <http://spinrdf.org/spin> , <http://topbraid.org/spin/spinmapl> , <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/well> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/spin/rh> ;
owl:versionInfo "0.1.0"^^xsd:string .
:BAA-BusinessArrangementArea
......@@ -1418,6 +1473,15 @@ arg:wellName
] ;
spinmap:targetClass <http://www.reportinghub.no/ep/schema/facility#Field> .
:LicenceOp-Licence
rdf:type spinmap:Context ;
spinmap:sourceClass licenceop:LicenceOp ;
spinmap:target
[ rdf:type :buildLicenceOpURI ;
spinmap:source spinmap:_source
] ;
spinmap:targetClass <http://www.reportinghub.no/np/schema/npd#Licence> .
:License-License
rdf:type spinmap:Context ;
spinmap:sourceClass <file:///www.reportinghub.no/transform/npd/licence#Licence> ;
......@@ -1716,6 +1780,22 @@ arg:wellName
] ;
spin:returnType rdfs:Resource .
:buildLicenceOpURI
rdf:type spinmap:TargetFunction ;
rdfs:label "build licence op URI"^^xsd:string ;
rdfs:subClassOf spinmap:TargetFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type rhspin:licenceById ;
arg:id [ rdf:type spl:object ;
sp:arg1 [ sp:varName "source"^^xsd:string
] ;
sp:arg2 licenceop:prlNpdidLicence
]
]) ;
sp:where ()
] .
:buildLicenceURI
rdf:type spinmap:TargetFunction ;
rdfs:label "build licence URI"^^xsd:string ;
......
......@@ -12,11 +12,11 @@
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
composite:index "1"^^xsd:int
composite:index "0"^^xsd:int
] ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
composite:index "0"^^xsd:int
composite:index "1"^^xsd:int
] ;
inference:completeMode
"true"^^xsd:boolean ;
......
# baseURI: file:///www.reportinghub.no/transform/npd/licenceop
# imports: http://topbraid.org/tables
@prefix licenceop: <file:///www.reportinghub.no/transform/npd/licenceop#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tables: <http://topbraid.org/tables#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<file:///www.reportinghub.no/transform/npd/licenceop>
rdf:type owl:Ontology ;
owl:imports <http://topbraid.org/tables> .
licenceop:LicenceOp
rdf:type owl:Class ;
rdfs:label "licenceop" ;
tables:sheetIndex "0"^^xsd:int .
licenceop:cmpLongName
rdf:type owl:DatatypeProperty ;
rdfs:domain licenceop:LicenceOp ;
rdfs:label "cmpLongName" ;
rdfs:range xsd:string ;
tables:columnIndex "3"^^xsd:int .
licenceop:cmpNpdidCompany
rdf:type owl:DatatypeProperty ;
rdfs:domain licenceop:LicenceOp ;
rdfs:label "cmpNpdidCompany" ;
rdfs:range xsd:string ;
tables:columnIndex "5"^^xsd:int .
licenceop:datesyncNPD
rdf:type owl:DatatypeProperty ;
rdfs:domain licenceop:LicenceOp ;
rdfs:label "DatesyncNPD" ;
rdfs:range xsd:string ;
tables:columnIndex "6"^^xsd:int .
licenceop:prlName
rdf:type owl:DatatypeProperty ;
rdfs:domain licenceop:LicenceOp ;
rdfs:label "ÔªøprlName" ;
rdfs:range xsd:string ;
tables:columnIndex "0"^^xsd:int .
licenceop:prlNpdidLicence
rdf:type owl:DatatypeProperty ;
rdfs:domain licenceop:LicenceOp ;
rdfs:label "prlNpdidLicence" ;
rdfs:range xsd:string ;
tables:columnIndex "4"^^xsd:int .
licenceop:prlOperDateValidFrom
rdf:type owl:DatatypeProperty ;
rdfs:domain licenceop:LicenceOp ;
rdfs:label "prlOperDateValidFrom" ;
rdfs:range xsd:string ;
tables:columnIndex "1"^^xsd:int .
licenceop:prlOperDateValidTo
rdf:type owl:DatatypeProperty ;
rdfs:domain licenceop:LicenceOp ;
rdfs:label "prlOperDateValidTo" ;
rdfs:range xsd:string ;
tables:columnIndex "2"^^xsd:int .