Holger Knublauch

Mapping of Licence and Company spreadsheets to NPD ontology

This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<ui:setContext
xmlns:npd="http://www.reportinghub.no/schema/npd#"
ui:queryGraph="&lt;https://www.reportinghub.no/data/npd&gt;"
let:well="{= ui:param('well', rdfs:Resource) }">
[
<ui:forEach ui:resultSet="{#
SELECT ?wellBore ?wellBoreName
WHERE {
?wellBore npd:partOfWell ?well .
?wellBore npd:name ?wellBoreName .
} ORDER By ?wellBoreName
}" ui:indexVar="i"><ui:if ui:condition="{= ?i &gt; 0 }">,</ui:if>
{
"value" : "{= ui:escapeJSON(xsd:string(?wellBore)) }",
"label" : "{= ui:escapeJSON(?wellBoreName) }"
}</ui:forEach>
]
</ui:setContext>
\ No newline at end of file
......@@ -15,17 +15,25 @@
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://spinrdf.org/arg#id>
rdf:type rdf:Property ;
rdfs:label "id"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
<http://spinrdf.org/arg#well>
rdf:type rdf:Property ;
rdfs:label "well"^^xsd:string .
rdfs:label "well"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
<http://spinrdf.org/arg#wellBoreName>
rdf:type rdf:Property ;
rdfs:label "well bore name"^^xsd:string .
rdfs:label "well bore name"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
<http://spinrdf.org/arg#wellName>
rdf:type rdf:Property ;
rdfs:label "well name"^^xsd:string .
rdfs:label "well name"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
<http://www.reportinghub.no/spin/rh>
rdf:type owl:Ontology ;
......@@ -62,6 +70,51 @@ rhspin:GetWellBoresOfWell
spl:valueType <http://www.reportinghub.no/schema/npd#Well>
] .
rhspin:companyById
rdf:type spin:Function ;
rdfs:label "company by id"^^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/Company-" ;
sp:arg2 [ sp:varName "id"^^xsd:string
]
]
]) ;
sp:where ()
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The NPD id of the company."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#id> ;
spl:valueType xsd:string
] .
rhspin:licenceById
rdf:type spin:Function ;
rdfs:label "license by id"^^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/Licence-" ;
sp:arg2 [ sp:varName "id"^^xsd:string
]
]
]) ;
sp:where ()
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The id of the license."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#id> ;
spl:valueType xsd:string
] ;
spin:returnType <http://www.reportinghub.no/schema/npd#License> .
rhspin:userName
rdf:type spin:Function ;
rdfs:comment "Gets the name of the currently logged in user."^^xsd:string ;
......
# baseURI: file:///www.reportinghub.no/transform/npd/company
# imports: http://topbraid.org/tables
@prefix company: <file:///www.reportinghub.no/transform/npd/company#> .
@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/company>
rdf:type owl:Ontology ;
owl:imports <http://topbraid.org/tables> .
company:Company
rdf:type owl:Class ;
rdfs:label "Company"^^xsd:string ;
tables:sheetIndex "0"^^xsd:int .
company:cmpGroup
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpGroup" ;
rdfs:range xsd:string ;
tables:columnIndex "2"^^xsd:int .
company:cmpLicenceLicenseeCurrent
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpLicenceLicenseeCurrent" ;
rdfs:range xsd:string ;
tables:columnIndex "7"^^xsd:int .
company:cmpLicenceLicenseeFormer
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpLicenceLicenseeFormer" ;
rdfs:range xsd:string ;
tables:columnIndex "8"^^xsd:int .
company:cmpLicenceOperCurrent
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpLicenceOperCurrent" ;
rdfs:range xsd:string ;
tables:columnIndex "5"^^xsd:int .
company:cmpLicenceOperFormer
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpLicenceOperFormer" ;
rdfs:range xsd:string ;
tables:columnIndex "6"^^xsd:int .
company:cmpLongName
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpLongName"^^xsd:string ;
rdfs:range xsd:string ;
tables:columnIndex "0"^^xsd:int .
company:cmpNpdidCompany
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpNpdidCompany" ;
rdfs:range xsd:string ;
tables:columnIndex "4"^^xsd:int .
company:cmpOrgNumberBrReg
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpOrgNumberBrReg" ;
rdfs:range xsd:string ;
tables:columnIndex "1"^^xsd:int .
company:cmpShortName
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "cmpShortName" ;
rdfs:range xsd:string ;
tables:columnIndex "3"^^xsd:int .
company:dateSyncNPD
rdf:type owl:DatatypeProperty ;
rdfs:domain company:Company ;
rdfs:label "dateSyncNPD" ;
rdfs:range xsd:string ;
tables:columnIndex "9"^^xsd:int .
# baseURI: file:///www.reportinghub.no/transform/npd/licence
# imports: http://topbraid.org/tables
@prefix licence: <file:///www.reportinghub.no/examples/transform/npd/licence-2011-07-30.csv#> .
@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#> .
licence:Licence
rdf:type owl:Class ;
rdfs:label "Licence"^^xsd:string ;
tables:sheetIndex "0"^^xsd:int .
licence:datesyncNPD
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "DatesyncNPD" ;
rdfs:range xsd:string ;
tables:columnIndex "8"^^xsd:int .
licence:prlCurrentArea
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "prlCurrentArea" ;
rdfs:range xsd:string ;
tables:columnIndex "6"^^xsd:int .
licence:prlDateGranted
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "prlDateGranted" ;
rdfs:range xsd:string ;
tables:columnIndex "3"^^xsd:int .
licence:prlDateValidTo
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "prlDateValidTo" ;
rdfs:range xsd:string ;
tables:columnIndex "4"^^xsd:int .
licence:prlLicensingActivityName
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "prlLicensingActivityName" ;
rdfs:range xsd:string ;
tables:columnIndex "1"^^xsd:int .
licence:prlName
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "ÔªøprlName" ;
rdfs:range xsd:string ;
tables:columnIndex "0"^^xsd:int .
licence:prlNpdidLicence
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "prlNpdidLicence" ;
rdfs:range xsd:string ;
tables:columnIndex "7"^^xsd:int .
licence:prlOriginalArea
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "prlOriginalArea" ;
rdfs:range xsd:string ;
tables:columnIndex "5"^^xsd:int .
licence:prlStatus
rdf:type owl:DatatypeProperty ;
rdfs:domain licence:Licence ;
rdfs:label "prlStatus" ;
rdfs:range xsd:string ;
tables:columnIndex "2"^^xsd:int .
<file:///www.reportinghub.no/transform/npd/licence>
rdf:type owl:Ontology ;
owl:imports <http://topbraid.org/tables> .