David Price

Merge branch 'rdwork'

......@@ -3,7 +3,6 @@
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/well
# imports: http://www.w3.org/2004/02/skos/core
@prefix ep-actpurp: <http://www.reportinghub.no/ep/schema/activity-purpose#> .
@prefix ep-core: <http://www.reportinghub.no/ep/schema/core#> .
......@@ -17,7 +16,7 @@
<http://www.reportinghub.no/ep/schema/1.0/activity-purpose>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.w3.org/2004/02/skos/core> ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/well> ;
owl:versionInfo "0.1.0"^^xsd:string .
ep-actpurp:Completion--bopwellheadequipment
......
# baseURI: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://www.linkedmodel.org/1.1/schema/ordered
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/facility
......@@ -18,7 +17,7 @@
<http://www.reportinghub.no/ep/schema/1.0/activity>
rdf:type owl:Ontology ;
owl:imports <http://www.linkedmodel.org/1.1/schema/ordered> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/material> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/well> ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/material> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/well> ;
owl:versionInfo "0.1.0"^^xsd:string .
ep-activity:Activity
......@@ -35,26 +34,6 @@ ep-activity:Activity
[ rdf:type owl:Restriction ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-activity:startedAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#after>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#before>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#during>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#overlaps>
] .
ep-activity:ActivitySuccessType
......@@ -77,21 +56,6 @@ ep-activity:DailyDrillingActivity
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty ep-core:hasPart
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#first>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:DrillingActivity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#first>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:DrillingActivity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#last>
] .
ep-activity:DailyDrillingActivityToStatus
......@@ -108,21 +72,6 @@ ep-activity:DailyDrillingActivityToStatus
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty ep-core:hasPart
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#first>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:DrillingActivity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#first>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:DrillingActivity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#last>
] .
ep-activity:DailyProductionActivity
......
......@@ -16,7 +16,7 @@
ep-org:CateringCrew
rdf:type ep-org:CrewType , owl:Class ;
rdfs:comment "A count that is the number of persons from the catering contractor spending the night at the installation."^^xsd:string ;
rdfs:comment "the persons from the catering contractor spending the night at the installation"^^xsd:string ;
rdfs:label "catering crew"^^xsd:string ;
rdfs:subClassOf ep-org:Crew .
......@@ -35,7 +35,6 @@ ep-org:Company
ep-org:ContractorCrew
rdf:type ep-org:CrewType , owl:Class ;
rdfs:comment "A count that is the number of persons from other than operator spending the night at the installation."^^xsd:string ;
rdfs:label "contractor crew"^^xsd:string ;
rdfs:subClassOf ep-org:Crew ;
ep-core:seeReferenceData
......@@ -50,19 +49,18 @@ ep-org:Crew
ep-org:CrewType
rdf:type rdfs:Class ;
rdfs:comment "The type of personnel grouping."^^xsd:string ;
rdfs:comment "the type of personnel grouping"^^xsd:string ;
rdfs:label "crew type"^^xsd:string ;
rdfs:subClassOf owl:Class .
ep-org:DayVisitorCrew
rdf:type ep-org:CrewType , owl:Class ;
rdfs:comment "A count that is the number of persons visiting the installation but not spending the night at the installation."^^xsd:string ;
rdfs:comment "the persons visiting the installation but not spending the night at the installation"^^xsd:string ;
rdfs:label "day visitor crew"^^xsd:string ;
rdfs:subClassOf ep-org:Crew .
ep-org:DrillingContractCrew
rdf:type ep-org:CrewType , owl:Class ;
rdfs:comment "A count that is the number of persons from the drilling contractor spending the night at the installation."^^xsd:string ;
rdfs:label "drilling contract crew"^^xsd:string ;
rdfs:subClassOf ep-org:Crew ;
ep-core:seeReferenceData
......@@ -70,25 +68,24 @@ ep-org:DrillingContractCrew
ep-org:NonOperatorOvernightVisitorCrew
rdf:type ep-org:CrewType , owl:Class ;
rdfs:comment "A count that is the number of persons from an unknown source normally not working on the installation, but spending the night there."^^xsd:string ;
rdfs:comment "the persons from an unknown source normally not working on the installation, but spending the night there"^^xsd:string ;
rdfs:label "non-operator overnight visitor crew"^^xsd:string ;
rdfs:subClassOf ep-org:Crew .
ep-org:OperatorNormalCrew
rdf:type ep-org:CrewType , owl:Class ;
rdfs:comment "A count that is the number of persons from the operator normally working on the installation and spending the night there."^^xsd:string ;
rdfs:comment "the persons from the operator normally working on the installation and spending the night there"^^xsd:string ;
rdfs:label "operator normal crew"^^xsd:string ;
rdfs:subClassOf ep-org:Crew .
ep-org:OperatorOvernightVisitorCrew
rdf:type ep-org:CrewType , owl:Class ;
rdfs:comment "A count that is the number of persons from the operator normally not working on the installation, but spending the night there."^^xsd:string ;
rdfs:comment "the persons from the operator normally not working on the installation, but spending the night there"^^xsd:string ;
rdfs:label "operator overnight visitor crew"^^xsd:string ;
rdfs:subClassOf ep-org:Crew .
ep-org:Organization
rdf:type owl:Class ;
rdfs:comment "physical object that is an organization"^^xsd:string ;
rdfs:label "organization"^^xsd:string ;
rdfs:subClassOf ep-core:PhysicalObject , ep-org:PersonOrOrganization ;
ep-core:seeReferenceData
......@@ -128,7 +125,7 @@ ep-org:PersonRoleType
ep-org:TotalCrew
rdf:type ep-org:CrewType , owl:Class ;
rdfs:comment "A count of the total personnel on board."^^xsd:string ;
rdfs:comment "all personnel on board"^^xsd:string ;
rdfs:label "total crew"^^xsd:string ;
rdfs:subClassOf ep-org:Crew .
......
......@@ -380,8 +380,7 @@ npd:companyShortName
rdfs:comment "the NPD company short name"^^xsd:string ;
rdfs:domain <http://www.reportinghub.no/ep/schema/organization#Company> ;
rdfs:label "company short name"@en ;
rdfs:range xsd:string ;
rdfs:subPropertyOf rdfs:label .
rdfs:range xsd:string .
npd:currentActivityStatus
rdf:type owl:DatatypeProperty ;
......@@ -570,8 +569,7 @@ npd:name
rdfs:comment "the NPD name"^^xsd:string ;
rdfs:domain npd:Individual ;
rdfs:label "NPD name"@en ;
rdfs:range xsd:string ;
rdfs:subPropertyOf rdfs:label .
rdfs:range xsd:string .
npd:organisationNumber
rdf:type owl:DatatypeProperty ;
......
......@@ -26,32 +26,18 @@ pca-rdl:ERH00001
pca-rdl:hasIdPCA "ERH00001"^^xsd:string .
pca-rdl:ERH00002
rdf:type p2:Thing , owl:Class ;
rdf:type p2:ClassOfClass , owl:Class ;
rdfs:subClassOf owl:Thing ;
pca-rdl:hasDesignation
"EPIM REPORTINGHUB NPD FACT REFERENCE DATA THING"^^xsd:string ;
"EPIM REPORTINGHUB NPD REFERENCE DATA CLASS"^^xsd:string ;
pca-rdl:hasIdPCA "ERH00002"^^xsd:string .
pca-rdl:ERH00003
rdf:type p2:ClassOfClass , owl:Class ;
rdfs:subClassOf owl:Thing ;
pca-rdl:hasDesignation
"EPIM REPORTINGHUB NPD FACT REFERENCE DATA CLASS"^^xsd:string ;
pca-rdl:hasIdPCA "ERH00003"^^xsd:string .
pca-rdl:ERH00004
rdf:type p2:ClassOfClass , owl:Class ;
rdfs:subClassOf owl:Thing ;
pca-rdl:hasDesignation
"EPIM REPORTINGHUB DRILLING REFERENCE DATA THING"^^xsd:string ;
pca-rdl:hasIdPCA "ERH00004"^^xsd:string .
pca-rdl:ERH00005
rdf:type p2:ClassOfClass , owl:Class ;
rdfs:subClassOf owl:Thing ;
pca-rdl:hasDesignation
"EPIM REPORTINGHUB DRILLING REFERENCE DATA CLASS"^^xsd:string ;
pca-rdl:hasIdPCA "ERH00005"^^xsd:string .
pca-rdl:hasIdPCA "ERH00003"^^xsd:string .
<http://www.reportinghub.no/refdata/RDL_ERHFoundationRD>
rdf:type owl:Ontology ;
......
# baseURI: http://www.reportinghub.no/refdata/npdfacts
# imports: http://posccaesar.org/rdl
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/np/schema/1.0/npd
# imports: http://www.reportinghub.no/refdata/RDL_ERHFoundationRD
# imports: http://www.reportinghub.no/refdata/transform/class2rd
@prefix RDL_ERHFoundationRD: <http://www.reportinghub.no/refdata/RDL_ERHFoundationRD#> .
@prefix class2rd: <http://www.reportinghub.no/refdata/transform/class2rd#> .
@prefix datprop2rd: <http://www.reportinghub.no/refdata/transform/datprop2rd#> .
@prefix npdfacts: <http://www.reportinghub.no/refdata/npdfacts#> .
@prefix objprop2rd: <http://www.reportinghub.no/refdata/transform/objprop2rd#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix p2: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> .
@prefix pca-rdl: <http://posccaesar.org/rdl/> .
@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#> .
......@@ -18,5 +20,4 @@
<http://www.reportinghub.no/refdata/npdfacts>
rdf:type owl:Ontology ;
owl:imports <http://posccaesar.org/rdl> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/refdata/RDL_ERHFoundationRD> , <http://www.reportinghub.no/refdata/transform/class2rd> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/refdata/RDL_ERHFoundationRD> .
......
SELECT DISTINCT ?RDLDesignation ?RDLDefinition ?EntityType ?CoPossessor ?ERHLocalname ?ERHOntology
WHERE {
?s pca-rdl:hasDesignation ?RDLDesignation .
?s ISO-15926-2_2003:hasClassOfPossessor ?CoPossessor .
?s p2:hasClassOfPossessor ?CoPossessor .
?s pca-rdl:hasDefinition ?RDLDefinition .
?s rdf:type ?p2 .
BIND (afn:localname(?p2) AS ?EntityType )
OPTIONAL {
?spec ISO-15926-2_2003:hasSubclass ?s .
?spec ISO-15926-2_2003:hasSuperclass ?sup .
?spec p2:hasSubclass ?s .
?spec p2:hasSuperclass ?sup .
?sup pca-rdl:hasDesignation ?RDLSuperclass .
?sup pca-rdl:hasIdPCA ?RDLSuperclassId .
}
......
......@@ -2,7 +2,6 @@
# imports: http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003
# imports: http://rds.posccaesar.org/2008/06/OWL/RDL-annotations
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/drilling
# imports: http://www.reportinghub.no/refdata/RDL_ERHFoundationRD
@prefix : <http://www.reportinghub.no/refdata/transform/class2rd#> .
......@@ -23,7 +22,7 @@
<http://www.reportinghub.no/refdata/transform/class2rd>
rdf:type owl:Ontology ;
owl:imports <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003> , <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/drilling> , <http://www.reportinghub.no/refdata/RDL_ERHFoundationRD> ;
owl:imports <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003> , <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/refdata/RDL_ERHFoundationRD> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
rdfs:Class
......@@ -282,27 +281,10 @@ owl:Class
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#Classification> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00001> ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassifier> ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassified> ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
[ sp:varName "thisrduri"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:NotExists ;
......@@ -357,7 +339,9 @@ owl:Class
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:upper-case ;
sp:arg1 [ sp:varName "label"^^xsd:string
sp:arg1 [ rdf:type xsd:string ;
sp:arg1 [ sp:varName "label"^^xsd:string
]
]
] ;
sp:variable
......@@ -411,14 +395,6 @@ owl:Class
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:eq ;
sp:arg1 [ rdf:type afn:namespace ;
sp:arg1 spin:_this
] ;
sp:arg2 "http://www.reportinghub.no/np/schema/npd#"
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:buildURI ;
......@@ -518,6 +494,11 @@ owl:Class
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ rdf:type sp:TriplePath ;
sp:object <http://www.reportinghub.no/ep/schema/activity#Activity> ;
......@@ -714,4 +695,70 @@ owl:Class
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0300 Handle classification of RD classes as NPD"^^xsd:string ;
sp:templates ([ sp:object <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#Classification> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassified> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00002> ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassifier> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:eq ;
sp:arg1 [ rdf:type afn:namespace ;
sp:arg1 spin:_this
] ;
sp:arg2 "http://www.reportinghub.no/np/schema/npd#"
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:generateUUID
] ;
sp:variable
[ sp:varName "uuid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "ERH" ;
sp:arg2 [ sp:varName "uuid"^^xsd:string
]
] ;
sp:variable
[ sp:varName "pcaid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "clsnuri"^^xsd:string
]
])
] .
......