Holger Knublauch

Mapping spreadsheets to NPD

# Saved by TopBraid on Thu Jul 28 15:55:54 BST 2011
# baseURI: http://www.reportinghub.no/1.1/schema/npd
# imports: http://topbraid.org/spin/spinmapl
# imports: http://spinrdf.org/spin
@prefix npd: <http://www.reportinghub.no/schema/npd#> .
@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 sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/1.1/schema/npd>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://topbraid.org/spin/spinmapl> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
npd:Company
rdf:type owl:Class ;
rdfs:subClassOf npd:npdIndividual .
npd:CompanyLicense
rdf:type owl:Class ;
rdfs:comment "A class that relates a Company to a License it has been granted."^^xsd:string ;
rdfs:subClassOf npd:Individual .
npd:Facility
rdf:type owl:Class ;
rdfs:subClassOf npd:npdIndividual .
npd:Field
rdf:type owl:Class ;
rdfs:subClassOf npd:npdIndividual .
npd:FixedFacility
rdf:type owl:Class ;
rdfs:subClassOf npd:Facility .
npd:Individual
rdf:type owl:Class ;
rdfs:subClassOf owl:Thing .
npd:License
rdf:type owl:Class ;
rdfs:subClassOf npd:npdIndividual .
npd:MoveableFacility
rdf:type owl:Class ;
rdfs:subClassOf npd:Facility .
npd:OperatingCompany
rdf:type owl:Class ;
rdfs:subClassOf npd:Company .
npd:ParentCompany
rdf:type owl:Class ;
rdfs:subClassOf npd:Company .
npd:SubSurfaceFixedFacility
rdf:type owl:Class ;
rdfs:subClassOf npd:FixedFacility .
npd:SurfaceFixedFacility
rdf:type owl:Class ;
rdfs:subClassOf npd:FixedFacility .
npd:Well
rdf:type owl:Class ;
rdfs:subClassOf npd:Individual .
npd:WellBore
rdf:type owl:Class ;
rdfs:subClassOf npd:npdIndividual .
npd:awardedTo
rdf:type owl:ObjectProperty ;
rdfs:domain npd:CompanyLicense ;
rdfs:range npd:Company .
npd:belongsTo
rdf:type owl:ObjectProperty ;
rdfs:domain npd:Facility ;
rdfs:range npd:Field .
npd:currentActivityStatus
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Field ;
rdfs:range xsd:string .
npd:currentOperator
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Current Operator field in fixed facility tables"^^xsd:string ;
rdfs:domain npd:FixedFacility ;
rdfs:range npd:Company .
npd:currentlyResponsibleCompany
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Currently Reponsible Company field in moveable facility tables"^^xsd:string ;
rdfs:domain npd:MoveableFacility ;
rdfs:range npd:Company .
npd:discoverWellBore
rdf:type owl:ObjectProperty ;
rdfs:domain npd:Field ;
rdfs:range npd:WellBore .
npd:endDate
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Individual ;
rdfs:range xsd:date .
npd:facilityKind
rdf:type owl:DatatypeProperty ;
rdfs:comment "corresponds to Kind field in both the fixed and moveable facility tables"^^xsd:string ;
rdfs:domain npd:Facility ;
rdfs:range xsd:string .
npd:fieldOperator
rdf:type owl:ObjectProperty ;
rdfs:domain npd:Field ;
rdfs:range npd:Company .
npd:fixedFacilityPhase
rdf:type owl:DatatypeProperty ;
rdfs:comment "corresponds to Phase field in fixed facility tables"^^xsd:string ;
rdfs:domain npd:FixedFacility ;
rdfs:range xsd:string .
npd:id
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:npdIndividual ;
rdfs:range xsd:string .
npd:licenseAwarded
rdf:type owl:ObjectProperty ;
rdfs:domain npd:CompanyLicense ;
rdfs:range npd:Company .
npd:name
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Individual ;
rdfs:range xsd:string .
npd:npdIndividual
rdf:type owl:Class ;
rdfs:comment "An npd:Individual that has an npd:id"^^xsd:string ;
rdfs:subClassOf npd:Individual .
npd:parentCo
rdf:type owl:ObjectProperty ;
rdfs:domain npd:OperatingCompany ;
rdfs:range npd:ParentCompany .
npd:partOfWell
rdf:type owl:ObjectProperty ;
rdfs:domain npd:WellBore ;
rdfs:range npd:Well .
npd:percentageInterest
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:CompanyLicense ;
rdfs:range xsd:float .
npd:startDate
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Individual ;
rdfs:range xsd:date .
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
# baseURI: file:///www.reportinghub.no/transform/wellbore-npdid-overview
# imports: http://topbraid.org/tables
@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 wbid: <file:///www.reportinghub.no/transform/wellbore-npdid-overview#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<file:///www.reportinghub.no/transform/wellbore-npdid-overview>
rdf:type owl:Ontology ;
owl:imports <http://topbraid.org/tables> .
wbid:WBID
rdf:type owl:Class ;
rdfs:label "wellbore-npdid-overview"^^xsd:string ;
tables:sheetIndex "0"^^xsd:int .
wbid:datesyncNPD
rdf:type owl:DatatypeProperty ;
rdfs:domain wbid:WBID ;
rdfs:label "datesyncNPD" ;
rdfs:range xsd:string ;
tables:columnIndex "4"^^xsd:int .
wbid:wlbNpdidWellbore
rdf:type owl:DatatypeProperty ;
rdfs:domain wbid:WBID ;
rdfs:label "wlbNpdidWellbore" ;
rdfs:range xsd:string ;
tables:columnIndex "1"^^xsd:int .
wbid:wlbWell
rdf:type owl:DatatypeProperty ;
rdfs:domain wbid:WBID ;
rdfs:label "wlbWell" ;
rdfs:range xsd:string ;
tables:columnIndex "2"^^xsd:int .
wbid:wlbWellType
rdf:type owl:DatatypeProperty ;
rdfs:domain wbid:WBID ;
rdfs:label "wlbWellType" ;
rdfs:range xsd:string ;
tables:columnIndex "3"^^xsd:int .
wbid:wlbWellboreName
rdf:type owl:DatatypeProperty ;
rdfs:domain wbid:WBID ;
rdfs:label "ÔªøwlbWellboreName" ;
rdfs:range xsd:string ;
tables:columnIndex "0"^^xsd:int .
# Saved by TopBraid on Fri Jul 29 17:18:40 BST 2011
# baseURI: http://www.reportinghub.no/1.1/schema/npd
@prefix npd: <http://www.reportinghub.no/schema/npd#> .
@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 sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/1.1/schema/npd>
rdf:type owl:Ontology ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
npd:BusinessArrangementArea
rdf:type owl:Class ;
rdfs:comment "A business arrangement area in this context is an area which is a result of unitisations, sliding scale rules or other business arrangements which have altered the terms of the original production licence."^^xsd:string ;
rdfs:subClassOf npd:Owner , npd:NpdIndividual , npd:TemporalIndividual .
npd:Company
rdf:type owl:Class ;
rdfs:subClassOf npd:NpdIndividual .
npd:Discovery
rdf:type owl:Class ;
rdfs:comment "A discovery is a petroleum deposit or several petroleum deposits collectively, which have been discovered in the same well, in which through testing, sampling or logging there has been established a probability of the existence of mobile petroleum (includes both commercial and technical discovery)."^^xsd:string ;
rdfs:subClassOf npd:NpdIndividual .
npd:Facility
rdf:type owl:Class ;
rdfs:subClassOf npd:NpdIndividual , npd:TemporalIndividual .
npd:Field
rdf:type owl:Class ;
rdfs:comment "A field is a discovery or several discoveries combined which the licensees have decided to develop, and for which the authorities have approved a plan for development and operation (PDO) or granted a PDO exemption."^^xsd:string ;
rdfs:subClassOf npd:NpdIndividual .
npd:FixedFacility
rdf:type owl:Class ;
rdfs:comment "'Permanently placed facility' is a generic term for all facilities that are placed on a field permanently. Floating production facilities, which in principle are mobile, come under this definition as they are meant to be permanently placed on the field."^^xsd:string ;
rdfs:subClassOf npd:Facility .
npd:Individual
rdf:type owl:Class ;
rdfs:subClassOf owl:Thing .
npd:License
rdf:type owl:Class ;
rdfs:comment "Production licences are granted by the Ministry of Petroleum and Energy. Transfer of a production licence or participating interest in a production licence must be approved by the ministry."^^xsd:string ;
rdfs:subClassOf npd:Owner , npd:NpdIndividual , npd:TemporalIndividual .
npd:MoveableFacility
rdf:type owl:Class ;
rdfs:comment "Mobile facilities are facilities not meant to be permanently placed on the field during the lifetime of the field, for example mobile drilling units."^^xsd:string ;
rdfs:subClassOf npd:Facility .
npd:NpdIndividual
rdf:type owl:Class ;
rdfs:subClassOf npd:Individual .
npd:OperatingCompany
rdf:type owl:Class ;
rdfs:subClassOf npd:Company .
npd:Owner
rdf:type owl:Class ;
rdfs:comment "Supertype of BAA and License - i.e. anything that can own a Field"^^xsd:string ;
rdfs:subClassOf npd:Individual .
npd:ParcellBAA
rdf:type owl:Class ;
rdfs:subClassOf npd:BusinessArrangementArea .
npd:ParentCompany
rdf:type owl:Class ;
rdfs:subClassOf npd:Company .
npd:SeismicAreaBAA
rdf:type owl:Class ;
rdfs:subClassOf npd:BusinessArrangementArea .
npd:Share
rdf:type owl:Class ;
rdfs:comment "A company's share in something - e.g. a BAA or a License"^^xsd:string ;
rdfs:subClassOf npd:TemporalIndividual .
npd:ShareOfBAA
rdf:type owl:Class ;
rdfs:subClassOf npd:Share .
npd:ShareOfLicense
rdf:type owl:Class ;
rdfs:comment "A class that relates a Company to a License it has been granted."^^xsd:string ;
rdfs:subClassOf npd:Share .
npd:SlidingScaleBAA
rdf:type owl:Class ;
rdfs:subClassOf npd:BusinessArrangementArea .
npd:SubSurfaceFixedFacility
rdf:type owl:Class ;
rdfs:subClassOf npd:FixedFacility .
npd:SurfaceFixedFacility
rdf:type owl:Class ;
rdfs:subClassOf npd:FixedFacility .
npd:TemporalIndividual
rdf:type owl:Class ;
rdfs:comment "An individual (cringe) that has temporal extent. If Matthew and Chris ever found out about this, they'd string me up."^^xsd:string ;
rdfs:subClassOf npd:Individual .
npd:UnitizedBAA
rdf:type owl:Class ;
rdfs:subClassOf npd:BusinessArrangementArea .
npd:Well
rdf:type owl:Class ;
rdfs:subClassOf npd:Individual .
npd:WellBore
rdf:type owl:Class ;
rdfs:subClassOf npd:NpdIndividual , npd:TemporalIndividual .
npd:baaShared
rdf:type owl:ObjectProperty ;
rdfs:domain npd:ShareOfBAA ;
rdfs:range npd:BusinessArrangementArea .
npd:belongsTo
rdf:type owl:ObjectProperty ;
rdfs:domain npd:Facility ;
rdfs:range npd:Field .
npd:companyShortName
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Company ;
rdfs:range xsd:string ;
rdfs:subPropertyOf rdfs:label .
npd:currentActivityStatus
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Field ;
rdfs:range xsd:string .
npd:currentOperator
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Current Operator field in fixed facility tables"^^xsd:string ;
rdfs:domain npd:FixedFacility ;
rdfs:range npd:Company .
npd:currentlyResponsibleCompany
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Currently Reponsible Company field in moveable facility tables"^^xsd:string ;
rdfs:domain npd:MoveableFacility ;
rdfs:range npd:Company .
npd:discoveryCurrentActivityStatus
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Discovery ;
rdfs:range xsd:string .
npd:discoveryField
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Field NPDID field in NPD Discovery table (overview)"^^xsd:string ;
rdfs:domain npd:Discovery ;
rdfs:range npd:WellBore .
npd:discoveryHCType
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Discovery ;
rdfs:range xsd:string .
npd:discoveryMainNcsArea
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Discovery ;
rdfs:range xsd:string .
npd:discoveryOperator
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Operator field in NPD Discovery table (overview)"^^xsd:string ;
rdfs:domain npd:Discovery ;
rdfs:range npd:Company .
npd:discoveryOwner
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Owner field in NPD Discovery table (see also Owner Kind)"^^xsd:string ;
rdfs:domain npd:Discovery ;
rdfs:range npd:Owner .
npd:discoveryWellBore
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Discovery Wellbore NPDID in the Discovery table (overview)"^^xsd:string ;
rdfs:domain npd:Discovery ;
rdfs:range npd:WellBore .
npd:discoveryYear
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Discovery ;
rdfs:range xsd:date .
npd:drilledInProductionLicense
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Drilled in Production License field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range npd:License .
npd:drillingFacility
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Drilled in Production License field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range npd:Facility .
npd:drillingOperator
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Drilling Operator field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range npd:Company .
npd:endDate
rdf:type owl:DatatypeProperty ;
rdfs:comment "The date at which an individual ceases to exist"^^xsd:string ;
rdfs:domain npd:TemporalIndividual ;
rdfs:range xsd:date .
npd:facilityKind
rdf:type owl:DatatypeProperty ;
rdfs:comment "corresponds to Kind field in both the fixed and moveable facility tables"^^xsd:string ;
rdfs:domain npd:Facility ;
rdfs:range xsd:string .
npd:fieldDiscoveryWellBore
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Discovery Wellbore NPDID in the Field table "^^xsd:string ;
rdfs:domain npd:Field ;
rdfs:range npd:WellBore .
npd:fieldOperator
rdf:type owl:ObjectProperty ;
rdfs:domain npd:Field ;
rdfs:range npd:Company .
npd:fieldOwner
rdf:type owl:ObjectProperty ;
rdfs:comment "The owner column in the NPD Field table may correspond to a BAA or a License, as indicated by the Owner Kind column"^^xsd:string ;
rdfs:domain npd:Field ;
rdfs:range npd:Owner .
npd:fixedFacilityPhase
rdf:type owl:DatatypeProperty ;
rdfs:comment "corresponds to Phase field in fixed facility tables"^^xsd:string ;
rdfs:domain npd:FixedFacility ;
rdfs:range xsd:string .
npd:hasParentCompany
rdf:type owl:ObjectProperty ;
rdfs:domain npd:OperatingCompany ;
rdfs:range npd:ParentCompany .
npd:id
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:NpdIndividual ;
rdfs:range xsd:string .
npd:licenseShared
rdf:type owl:ObjectProperty ;
rdfs:domain npd:ShareOfLicense ;
rdfs:range npd:License .
npd:licenseStatus
rdf:type owl:DatatypeProperty ;
rdfs:comment "corresponds to the Status field in the License table"^^xsd:string ;
rdfs:domain npd:License ;
rdfs:range xsd:string .
npd:licensingActivity
rdf:type owl:DatatypeProperty ;
rdfs:comment "corresponds to the licensing activity field in the License table"^^xsd:string ;
rdfs:domain npd:License ;
rdfs:range xsd:string .
npd:name
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Individual ;
rdfs:range xsd:string ;
rdfs:subPropertyOf rdfs:label .
npd:partOfWell
rdf:type owl:ObjectProperty ;
rdfs:domain npd:WellBore ;
rdfs:range npd:Well .
npd:percentageOfShare
rdf:type owl:DatatypeProperty ;
rdfs:domain npd:Share ;
rdfs:range xsd:float .
npd:productionFacility
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Production Facility field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range npd:Facility .
npd:shareHolder
rdf:type owl:ObjectProperty ;
rdfs:comment "Equivalent to AwardedTo field in License table"^^xsd:string ;
rdfs:domain npd:Share ;
rdfs:range npd:Company .
npd:startDate
rdf:type owl:DatatypeProperty ;
rdfs:comment "The date at which an individual comes into existance"^^xsd:string ;
rdfs:domain npd:TemporalIndividual ;
rdfs:range xsd:date .
npd:wellBoreCompletionDate
rdf:type owl:DatatypeProperty ;
rdfs:comment "Corresponds to Completion Date field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range xsd:date .
npd:wellBoreContent
rdf:type owl:DatatypeProperty ;
rdfs:comment "Corresponds to Content field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range xsd:string .
npd:wellBoreDrillPermit
rdf:type owl:DatatypeProperty ;
rdfs:comment "Corresponds to Drill Permit field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range xsd:string .
npd:wellBorePurpose
rdf:type owl:DatatypeProperty ;
rdfs:comment "Corresponds to Purpose field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range xsd:string .
npd:wellBoreType
rdf:type owl:DatatypeProperty ;
rdfs:comment "Corresponds to Type field in WellBore tables"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range xsd:string .
npd:wellboreOwner
rdf:type owl:ObjectProperty ;
rdfs:comment "Corresponds to Owner field in WellBore tables - see also Owner Kind"^^xsd:string ;
rdfs:domain npd:WellBore ;
rdfs:range npd:Owner .
# baseURI: http://www.reportinghub.no/spin/rh
# imports: http://topbraid.org/spin/spinmapl
# imports: http://www.reportinghub.no/1.1,1/schema/ddr
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/1.1/schema/npd
# imports: http://spinrdf.org/spin
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@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 rhspin: <http://www.reportinghub.no/spin/rh#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spif: <http://spinrdf.org/spif#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
......@@ -16,10 +19,18 @@
rdf:type rdf:Property ;
rdfs:label "well"^^xsd:string .
<http://spinrdf.org/arg#wellBoreName>
rdf:type rdf:Property ;
rdfs:label "well bore name"^^xsd:string .
<http://spinrdf.org/arg#wellName>
rdf:type rdf:Property ;
rdfs:label "well name"^^xsd:string .
<http://www.reportinghub.no/spin/rh>
rdf:type owl:Ontology ;
rdfs:comment "A collection of SPIN functions and templates to support working with the ReportingHub schemas."^^xsd:string ;
owl:imports <http://www.reportinghub.no/1.1/schema/npd> , <http://www.reportinghub.no/1.1,1/schema/ddr> , <http://spinrdf.org/spin> ;
owl:imports <http://topbraid.org/spin/spinmapl> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/1.1,1/schema/ddr> , <http://www.reportinghub.no/1.1/schema/npd> ;
owl:versionInfo "0.1.0"^^xsd:string .
rhspin:GetWellBoresOfWell
......@@ -58,6 +69,66 @@ rhspin:userName
rdfs:subClassOf spin:Functions ;
spin:returnType xsd:string .
rhspin:wellBoreByName
rdf:type spin:Function ;
rdfs:comment "Gets the URI resource of a well bore based on its NPD name."^^xsd:string ;
rdfs:label "well bore by name"^^xsd:string ;
rdfs:subClassOf spl:URIFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type sp:iri ;
sp:arg1 [ rdf:type fn:concat ;
sp:arg1 "https://www.reportinghub.no/data/npd/WellBore-" ;
sp:arg2 [ rdf:type spif:replaceAll ;
sp:arg1 [ rdf:type spif:replaceAll ;
sp:arg1 [ sp:varName "wellBoreName"^^xsd:string
] ;
sp:arg2 " " ;
sp:arg3 "_"
] ;
sp:arg2 "/" ;
sp:arg3 "__"
]
]
]) ;
sp:where ()
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The NPD ID of the well bore to get the URI of."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#wellBoreName> ;
spl:valueType xsd:string
] ;
spin:returnType <http://www.reportinghub.no/schema/npd#WellBore> .
rhspin:wellByName
rdf:type spin:Function ;
rdfs:comment "Gets the URI resource of a well based on its NPD name."^^xsd:string ;
rdfs:label "well by name"^^xsd:string ;
rdfs:subClassOf spl:URIFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type sp:iri ;
sp:arg1 [ rdf:type fn:concat ;
sp:arg1 "https://www.reportinghub.no/data/npd/Well-" ;
sp:arg2 [ rdf:type spif:replaceAll ;
sp:arg1 [ sp:varName "wellName"^^xsd:string
] ;
sp:arg2 "/" ;
sp:arg3 "__"
]
]
]) ;
sp:where ()
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The NPD name of the well to get the URI of."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#wellName> ;
spl:valueType xsd:string
] ;
spin:returnType <http://www.reportinghub.no/schema/npd#WellBore> .
_:b2 sp:varName "wellBore"^^xsd:string .
_:b1 sp:varName "wellBoreName"^^xsd:string .
......
# baseURI: http://www.reportinghub.no/transform/spreadsheets2npd
# imports: http://topbraid.org/spin/spinmapl
# imports: file:///www.reportinghub.no/transform/wellbore-npdid-overview-2011-07-30
# imports: file:///www.reportinghub.no/transform/wellbore-npdid-overview
# imports: http://www.reportinghub.no/1.1/schema/npd
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/spin/rh
@prefix : <http://www.reportinghub.no/transform/spreadsheets2npd#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix npdi: <https://www.reportinghub.no/data/npd/> .
@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 rhspin: <http://www.reportinghub.no/spin/rh#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spinmap: <http://spinrdf.org/spinmap#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#WBID>
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression
[ rdf:type rhspin:wellByName ;
arg:wellName spin:_arg1
] ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWell> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#partOfWell>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-Well ;
spinmap:expression spin:_arg1 ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWell> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#name>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-0-1 ;
spinmap:context :WBID-Well ;
spinmap:expression <http://www.reportinghub.no/schema/npd#Well> ;
spinmap:targetPredicate1
rdf:type
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression spin:_arg1 ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWellboreName> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#name>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression spin:_arg1 ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWellType> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#wellBoreType>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression spin:_arg1 ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbNpdidWellbore> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#id>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-0-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression <http://www.reportinghub.no/schema/npd#WellBore> ;
spinmap:targetPredicate1
rdf:type
] .
arg:well
rdfs:subPropertyOf sp:arg .
arg:wellBoreName
rdfs:subPropertyOf sp:arg .
arg:wellName
rdfs:subPropertyOf sp:arg .
<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 <http://www.reportinghub.no/spin/rh> , <file:///www.reportinghub.no/transform/wellbore-npdid-overview> , <file:///www.reportinghub.no/transform/wellbore-npdid-overview-2011-07-30> , <http://spinrdf.org/spin> , <http://topbraid.org/spin/spinmapl> , <http://www.reportinghub.no/1.1/schema/npd> ;
owl:versionInfo "0.1.0"^^xsd:string .
:WBID-Well
rdf:type spinmap:Context ;
spinmap:sourceClass <file:///www.reportinghub.no/transform/wellbore-npdid-overview#WBID> ;
spinmap:target
[ rdf:type :buildWellURI ;
spinmap:source spinmap:_source
] ;
spinmap:targetClass <http://www.reportinghub.no/schema/npd#Well> .
:WBID-WellBore
rdf:type spinmap:Context ;
spinmap:sourceClass <file:///www.reportinghub.no/transform/wellbore-npdid-overview#WBID> ;
spinmap:target
[ rdf:type :buildWellBoreURI ;
spinmap:source spinmap:_source
] ;
spinmap:targetClass <http://www.reportinghub.no/schema/npd#WellBore> .
:buildWellBoreURI
rdf:type spinmap:TargetFunction ;
rdfs:label "build well bore URI"^^xsd:string ;
rdfs:subClassOf spinmap:TargetFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type rhspin:wellBoreByName ;
arg:wellBoreName _:b1
]) ;
sp:where ([ sp:object _:b1 ;
sp:predicate <file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWellboreName> ;
sp:subject
[ sp:varName "source"^^xsd:string
]
])
] ;
spin:returnType rdfs:Resource .
:buildWellURI
rdf:type spinmap:TargetFunction ;
rdfs:label "build well URI"^^xsd:string ;
rdfs:subClassOf spinmap:TargetFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type rhspin:wellByName ;
arg:wellName _:b2
]) ;
sp:where ([ sp:object _:b2 ;
sp:predicate <file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWell> ;
sp:subject
[ sp:varName "source"^^xsd:string
]
])
] .
_:b1 sp:varName "wellBoreId"^^xsd:string .
_:b2 sp:varName "wellName"^^xsd:string .
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
@prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> .
@prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> .
@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 visual: <http://topbraid.org/visual#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
composite:index "0"^^xsd:int
] .