David Price

Merge branch 'master' into feb7

This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
1 +# baseURI: http://www.reportinghub.no/np/schema/1.0/NPD-FactPages
2 +
3 +@prefix npd-facts: <http://www.reportinghub.no/np/schema/NPD-FactPages#> .
4 +@prefix owl: <http://www.w3.org/2002/07/owl#> .
5 +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
6 +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
7 +@prefix tables: <http://topbraid.org/tables#> .
8 +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9 +
10 +<http://www.reportinghub.no/np/schema/1.0/NPD-FactPages>
11 + rdf:type owl:Ontology ;
12 + owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
13 +
14 +npd-facts:BusinessAreaArrangement
15 + rdf:type owl:Class ;
16 + rdfs:subClassOf npd-facts:LicenseOrBusinessAreaArrangement .
17 +
18 +npd-facts:Company
19 + rdf:type owl:Class ;
20 + rdfs:subClassOf owl:Thing .
21 +
22 +npd-facts:Field
23 + rdf:type owl:Class ;
24 + rdfs:subClassOf owl:Thing .
25 +
26 +npd-facts:Licence
27 + rdf:type owl:Class ;
28 + rdfs:subClassOf npd-facts:LicenseOrBusinessAreaArrangement .
29 +
30 +npd-facts:LicenseOrBusinessAreaArrangement
31 + rdf:type owl:Class ;
32 + rdfs:subClassOf owl:Thing .
33 +
34 +npd-facts:Wellbore
35 + rdf:type owl:Class ;
36 + rdfs:subClassOf owl:Thing .
37 +
38 +npd-facts:cmpNpdidCompany
39 + rdf:type owl:ObjectProperty ;
40 + rdfs:domain npd-facts:Field ;
41 + rdfs:label "Operator"^^xsd:string ;
42 + rdfs:range npd-facts:Company .
43 +
44 +npd-facts:fldCurrentActivitySatus
45 + rdf:type owl:DatatypeProperty ;
46 + rdfs:domain npd-facts:Field ;
47 + rdfs:label "Status"^^xsd:string ;
48 + rdfs:range xsd:string .
49 +
50 +npd-facts:fldFactMapUrl
51 + rdf:type owl:DatatypeProperty ;
52 + rdfs:domain npd-facts:Field ;
53 + rdfs:label "Fact Map URL"^^xsd:string ;
54 + rdfs:range xsd:anyURI .
55 +
56 +npd-facts:fldFactPageUrl
57 + rdf:type owl:DatatypeProperty ;
58 + rdfs:domain npd-facts:Field ;
59 + rdfs:label "Fact Page URL"^^xsd:string ;
60 + rdfs:range xsd:anyURI .
61 +
62 +npd-facts:fldName
63 + rdf:type owl:DatatypeProperty ;
64 + rdfs:domain npd-facts:Field ;
65 + rdfs:label "NPD Name"^^xsd:string ;
66 + rdfs:range xsd:string .
67 +
68 +npd-facts:fldNpdidField
69 + rdf:type owl:DatatypeProperty ;
70 + rdfs:domain npd-facts:Field ;
71 + rdfs:label "NPD ID"^^xsd:string ;
72 + rdfs:range xsd:string .
73 +
74 +npd-facts:fldNpdidOwner
75 + rdf:type owl:ObjectProperty ;
76 + rdfs:domain npd-facts:Field ;
77 + rdfs:label "Owner"^^xsd:string ;
78 + rdfs:range npd-facts:LicenseOrBusinessAreaArrangement .
79 +
80 +npd-facts:wlbNpdidWellbore
81 + rdf:type owl:ObjectProperty ;
82 + rdfs:domain npd-facts:Field ;
83 + rdfs:label "Wellbore"^^xsd:string ;
84 + rdfs:range npd-facts:Wellbore .
1 -# Saved by TopBraid on Tue Sep 20 18:13:07 BST 2011
2 -# baseURI: http://www.reportinghub.no/test/ddr/TEST_ddr-report-header
3 -# imports: http://www.reportinghub.no/ep/transform/1.1/ddr/collector
4 -
5 -@prefix : <http://www.reportinghub.no/test/ddr/TEST_ddr-report-header#> .
6 -@prefix collector: <http://www.reportinghub.no/ep/transform/1.1/ddr/collector#> .
7 -@prefix owl: <http://www.w3.org/2002/07/owl#> .
8 -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
9 -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
10 -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
11 -
12 -<http://www.reportinghub.no/test/ddr/TEST_ddr-report-header>
13 - rdf:type owl:Ontology ;
14 - owl:imports <http://www.reportinghub.no/ep/transform/1.1/ddr/collector> ;
15 - owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
1 -# Saved by TopBraid on Tue Sep 20 18:13:07 BST 2011
2 -# baseURI: null
3 -
4 -@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
5 -@prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> .
6 -@prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> .
7 -@prefix owl: <http://www.w3.org/2002/07/owl#> .
8 -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
9 -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
10 -@prefix visual: <http://topbraid.org/visual#> .
11 -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
12 -
13 -[] rdf:type inference:Configuration ;
14 - composite:child
15 - [ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
16 - <http://spinrdf.org/spin#topSPINOptions>
17 - "singlePass" ;
18 - composite:index "0"^^xsd:int
19 - ] .
1 +# baseURI: http://www.reportinghub.no/test/dpr/testcase/dpr-to-dpr2-runxslt
2 +# imports: http://topbraid.org/sparqlmotionfunctions
3 +# imports: http://topbraid.org/sparqlmotionlib-tbc
4 +
5 +@prefix : <http://www.reportinghub.no/test/dpr/testcase/dpr-to-dpr2-runxslt#> .
6 +@prefix owl: <http://www.w3.org/2002/07/owl#> .
7 +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
8 +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
9 +@prefix sm: <http://topbraid.org/sparqlmotion#> .
10 +@prefix sml: <http://topbraid.org/sparqlmotionlib#> .
11 +@prefix sp: <http://spinrdf.org/sp#> .
12 +@prefix spin: <http://spinrdf.org/spin#> .
13 +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
14 +
15 +<http://www.reportinghub.no/test/dpr/testcase/dpr-to-dpr2-runxslt>
16 + rdf:type owl:Ontology ;
17 + owl:imports <http://topbraid.org/sparqlmotionfunctions> , <http://topbraid.org/sparqlmotionlib-tbc> ;
18 + owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
19 +
20 +:ConvertXMLByXSLT_1
21 + rdf:type sml:ConvertXMLByXSLT ;
22 + rdfs:label "Convert XMLBy XSLT 1"^^xsd:string ;
23 + sm:next :SaveTransformResult ;
24 + sm:nodeX 352 ;
25 + sm:nodeY 82 ;
26 + sm:outputVariable "xmlContent"^^xsd:string ;
27 + sml:template
28 + [ sp:varName "stylesheet"^^xsd:string
29 + ] ;
30 + sml:xml [ sp:varName "input"^^xsd:string
31 + ] .
32 +
33 +:ReadStylesheet
34 + rdf:type sml:ImportTextFile ;
35 + rdfs:label "Read stylesheet"^^xsd:string ;
36 + sm:next :ConvertXMLByXSLT_1 ;
37 + sm:nodeX 72 ;
38 + sm:nodeY 19 ;
39 + sm:outputVariable "stylesheet"^^xsd:string ;
40 + sml:sourceFilePath "/www.reportinghub.no/xslt/TRANSFORM_dpr-to-mpr-v1.0.xsl"^^xsd:string .
41 +
42 +:ReadXMLInput
43 + rdf:type sml:ImportTextFile ;
44 + rdfs:label "Read XMLInput"^^xsd:string ;
45 + sm:next :ConvertXMLByXSLT_1 ;
46 + sm:nodeX 623 ;
47 + sm:nodeY 9 ;
48 + sm:outputVariable "input"^^xsd:string ;
49 + sml:sourceFilePath "/www.reportinghub.no/test/dpr/testcase/Field Vega - BAA Vega/tqedits/Daily Production Vega Unit 2012-10-14-ONE-FLOW.xml"^^xsd:string .
50 +
51 +:SaveTransformResult
52 + rdf:type sml:ExportToTextFile ;
53 + rdfs:label "Save transform result"^^xsd:string ;
54 + sm:nodeX 354 ;
55 + sm:nodeY 316 ;
56 + sml:replace "true"^^xsd:boolean ;
57 + sml:targetFilePath "RESULT-generated-dpr2.xml"^^xsd:string ;
58 + sml:text "{?xmlContent}"^^xsd:string .
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<WITSMLComposite xmlns="http://www.witsml.org/schemas/131/addendum/combo" version="1.3.1.0">
3 +<documentInfo>
4 +<DocumentName namingSystem="EC">Daily Production Vega Unit</DocumentName>
5 +<DocumentAlias namingSystem="EC">Daily Production and Operation Report</DocumentAlias>
6 +<DocumentDate>2012-10-14T00:00:00</DocumentDate>
7 +<documentClass namingSystem="EC">DPOR</documentClass>
8 +<documentClass namingSystem="EC">DPR</documentClass>
9 +<documentClass namingSystem="ERH">dpr2</documentClass>
10 +<Owner>VEGA</Owner>
11 +</documentInfo>
12 +<productVolumeSet>
13 +<productVolume uid="83CB36697A4C0A20E040618F80123BA7">
14 +<name>VEGA</name>
15 +<installation>VEGA</installation>
16 +<contextFacility kind="field" namingSystem="NPD" uidRef="4467595">VEGA</contextFacility>
17 +<kind>DDR</kind>
18 +<periodKind>day</periodKind>
19 +<dateStart>2012-10-14</dateStart>
20 +<dateEnd>2012-10-15</dateEnd>
21 +<operator>
22 +<name>Statoil ASA</name>
23 +<role>operator</role>
24 +</operator>
25 +<title namingSystem="EC">Daily Production Vega Unit</title>
26 +<facility uid="83CB36697A4C0A20E040618F80123BA7">
27 +<name kind="platform" namingSystem="NPD" uidRef="83CB36697A4C0A20E040618F80123BA7">VEGA NORD</name>
28 +<facilityParent1 kind="field" namingSystem="NPD" uidRef="4467595">VEGA</facilityParent1>
29 +<contextFacility kind="field" namingSystem="NPD" uidRef="4467595">VEGA</contextFacility>
30 +<flow uid="90D8148938DD01F5E040618F801225D4">
31 +<name>Liquid Partially Processed Vega Unit</name>
32 +<kind>production</kind>
33 +<direction>outlet</direction>
34 +<qualifier>measured</qualifier>
35 +<product>
36 +<kind>oil</kind>
37 +<name>Liquid Partially Processed Vega Unit</name>
38 +<period>
39 +<kind>day</kind>
40 +<dTimStart>2012-10-14T00:00:00</dTimStart>
41 +<dTimEnd>2012-10-15T00:00:00</dTimEnd>
42 +<volume uom="bbl">123.45</volume>
43 +<volumeStd uom="m3">678.436</volumeStd>
44 +</period>
45 +</product>
46 +<product>
47 +<kind>oil - net</kind>
48 +<name>Liquid Partially Processed Vega Unit</name>
49 +<period>
50 +<kind>day</kind>
51 +<dTimStart>2012-10-14T00:00:00</dTimStart>
52 +<dTimEnd>2012-10-15T00:00:00</dTimEnd>
53 +<volume uom="bbl">444.90145</volume>
54 +<volumeStd uom="m3">777.28209</volumeStd>
55 +<mass uom="tonUK">88.81853453</mass>
56 +</period>
57 +</product>
58 +</flow>
59 +</facility>
60 +</productVolume>
61 +</productVolumeSet>
62 +</WITSMLComposite>
...\ No newline at end of file ...\ No newline at end of file
1 +<xsl:stylesheet version="1.0"
2 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 + xmlns:dpr="http://www.witsml.org/schemas/131/addendum/combo"
4 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 + xmlns="http://www.epim.no/schemas/mprml/1">
6 +
7 + <xsl:strip-space elements="*"/>
8 + <xsl:output indent="yes"/>
9 +
10 +<!-- WITSMLComposite -> objects -->
11 +
12 + <xsl:template match="dpr:WITSMLComposite">
13 +
14 + <objects xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15 + xmlns="http://www.epim.no/schemas/mprml/1" version="1.0(MPRML)">
16 +
17 + <xsl:apply-templates select="*|node()"/>
18 +
19 + </objects>
20 +
21 + </xsl:template>
22 +
23 +<!-- documentInfo -> documentInfo and add context element -->
24 +
25 + <xsl:template match="dpr:documentInfo">
26 +
27 + <xsl:element name="documentInfo">
28 + <xsl:apply-templates select="@*|node()"/>
29 + </xsl:element>
30 +
31 + <xsl:element name="context">
32 + <xsl:attribute name="xsi:type">obj_report</xsl:attribute>
33 + <title>Vega DPRM</title>
34 + <date>2012-10-14</date>
35 + <reportStatus>final</reportStatus>
36 + <installation kind="field" namingSystem="NPD" uidRef="4467595">VEGA</installation>
37 + </xsl:element>
38 +
39 + </xsl:template>
40 +
41 +<!-- productVolumeSet -> only children -->
42 +
43 + <xsl:template match="dpr:productVolumeSet">
44 + <xsl:apply-templates select="@*|node()"/>
45 + </xsl:template>
46 +
47 + <!-- productVolumeSet @uid -> remove uid -->
48 +
49 + <xsl:template match="dpr:productVolumeSet/@uid">
50 + <xsl:apply-templates select="@*|node()"/>
51 + </xsl:template>
52 +
53 + <!-- productVolume -> object xsd:type=obj_productVolume -->
54 +
55 + <xsl:template match="dpr:productVolume">
56 + <xsl:element name="object">
57 + <xsl:attribute name="xsi:type">obj_productVolume</xsl:attribute>
58 + <xsl:apply-templates select="@*|node()"/>
59 + </xsl:element>
60 + </xsl:template>
61 +
62 + <xsl:template match="dpr:installation">
63 + <xsl:element name="installation">
64 + <xsl:attribute name="kind">field</xsl:attribute>
65 + <xsl:attribute name="namingSystem">NPD</xsl:attribute>
66 + <xsl:apply-templates select="@*|node()"/>
67 + </xsl:element>
68 + </xsl:template>
69 +
70 +
71 +<!-- For any elements not covered above, copy them over but with the new namespace -->
72 + <xsl:template match="dpr:*">
73 + <xsl:element name="{local-name()}">
74 + <xsl:apply-templates select="@*|node()"/>
75 + </xsl:element>
76 + </xsl:template>
77 +
78 + <!-- Convert anything else as-is -->
79 + <xsl:template match="@*|node()">
80 + <xsl:copy>
81 + <xsl:apply-templates select="@*|node()"/>
82 + </xsl:copy>
83 + </xsl:template>
84 +
85 +
86 +</xsl:stylesheet>