TRANSFORM_ddr-normalization-v1.1.1.ttl 3.54 KB
# Saved by TopBraid on Wed Aug 10 14:09:07 BST 2011
# baseURI: http://www.reportinghub.no/ep/transform/1.1/normalization
# imports: http://www.reportinghub.no/ep/transform/1.1/ddr/activity
# imports: http://www.reportinghub.no/ep/transform/1.1/wellAndWellBoreAlias
# imports: http://www.reportinghub.no/ep/transform/1.1/wellboreInfo
# imports: http://www.reportinghub.no/ep/transform/1.1/ddr/drillReport
# imports: http://www.reportinghub.no/ep/transform/1.1/ddr/statusInfo

@prefix :        <http://www.reportinghub.no/ep/transform/1.1/normalization#> .
@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 smf:     <http://topbraid.org/sparqlmotionfunctions#> .
@prefix sp:      <http://spinrdf.org/sp#> .
@prefix spin:    <http://spinrdf.org/spin#> .
@prefix spl:     <http://spinrdf.org/spl#> .
@prefix wellAndWellBoreAlias:  <http://www.reportinghub.no/ep/transform/1.1/wellAndWellBoreAlias#> .
@prefix wellboreInfo:  <http://www.reportinghub.no/ep/transform/1.1/wellboreInfo#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

<http://www.reportinghub.no/ep/transform/1.1/normalization>
      rdf:type owl:Ontology ;
      owl:imports <http://www.reportinghub.no/ep/transform/1.1/wellboreInfo> , <http://www.reportinghub.no/ep/transform/1.1/ddr/statusInfo> , <http://www.reportinghub.no/ep/transform/1.1/ddr/activity> , <http://www.reportinghub.no/ep/transform/1.1/ddr/drillReport> , <http://www.reportinghub.no/ep/transform/1.1/wellAndWellBoreAlias> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .

owl:Thing
      spin:update
              [ rdf:type sp:Modify ;
                sp:deletePattern ([ sp:object _:b1 ;
                            sp:predicate rdfs:label ;
                            sp:subject _:b2
                          ]) ;
                sp:insertPattern ([ sp:object _:b3 ;
                            sp:predicate rdfs:label ;
                            sp:subject _:b2
                          ]) ;
                sp:where ([ sp:object _:b2 ;
                            sp:predicate owl:onProperty ;
                            sp:subject
                                    [ sp:varName "r"^^xsd:string
                                    ]
                          ] [ sp:object _:b1 ;
                            sp:predicate rdfs:label ;
                            sp:subject _:b2
                          ] [ rdf:type sp:Filter ;
                            sp:expression
                                    [ rdf:type fn:starts-with ;
                                      sp:arg1 _:b1 ;
                                      sp:arg2 "has"
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type smf:trim ;
                                      sp:arg1 [ rdf:type smf:regex ;
                                                sp:arg1 _:b1 ;
                                                sp:arg2 "has(.*)" ;
                                                sp:arg3 "$1"
                                              ]
                                    ] ;
                            sp:variable _:b3
                          ])
              ] .

_:b1  sp:varName "oldLabel"^^xsd:string .

_:b2  sp:varName "p"^^xsd:string .

_:b3  sp:varName "newLabel"^^xsd:string .