David Price

Added test case and repaired MPRG submitted from

......@@ -4,14 +4,16 @@ let:activity="{# SELECT ?activity WHERE {?activity a ep-fac:TemporalPartOfAProdu
let:activityEnd="{# SELECT ?activityEnd WHERE {?activity a ep-fac:TemporalPartOfAProductionFacility . ?report ep-report:reportOn ?activity . ?activity ep-activity:finishedAt ?activityEnd}}"
let:reportedFieldName="{# SELECT ?reportedFieldName
WHERE {
?report a ep-report:ProductionReport .
?productVolumeReport ep-core:partOf ?report .
?productVolumeReport a ep-report:ProductVolumeReport .
?productVolumeReport ep-report:reportOn ?productionFlowsInReportingPeriod .
?productionFlowsInReportingPeriod a ep-flow:ProductionFlowNetwork .
?stateOfField ep-flow:facilityContainsFlow ?productionFlowsInReportingPeriod .
?stateOfField ep-core:temporalPartOf ?reportedField .
?reportedField npd:name ?reportedFieldName .
?report rdf:type ep-report:ProductionReport .
?productvolumereport ep-core:partOf ?report .
?productvolumereport rdf:type ep-report:ProductVolumeReport .
?productvolumereport ep-report:reportOn ?productioninventorycollection .
?temporalpartofaproductionfacility ep-core:hasSpatialPart ?productioninventorycollection .
?temporalpartofaproductionfacility ep-core:temporalPartOf ?productionfacility .
?productionfacility rdf:type ep-fac:Field .
?productvolumereport ep-core:name ?reportedFieldName .
}}"
>
......@@ -22,7 +24,8 @@ WHERE {
{
?report a ep-report:ProductionReport .
?report ep-report:reportSubmittedFrom ?submittingFieldState .
?reportIssueActivity ep-report:issuedReport ?report .
?reportIssueActivity ep-activity:issuedFrom ?submittingFieldState .
?submittingFieldState ep-core:temporalPartOf ?submittingField .
?submittingField npd:name ?submittingFieldName .
......
<?xml version="1.0" encoding="UTF-8"?>
<objects xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.epim.no/schemas/mprml/1" version="1.0(MPRML)">
<documentInfo>
<DocumentName namingSystem="EC">ÅSGARD March 2012</DocumentName>
<DocumentAlias namingSystem="EC">ÅSGARD Copex Report</DocumentAlias>
<DocumentDate>2012-04-05T00:00:00.0Z</DocumentDate>
<documentClass namingSystem="EC">STATOIL</documentClass>
<documentClass namingSystem="EC">Copex</documentClass>
<documentClass namingSystem="ERH">mprg</documentClass>
<FileCreationInformation>
<FileCreationDate>2012-04-15T00:00:00.0Z</FileCreationDate>
<SoftwareName>Energy Components</SoftwareName>
<FileCreator>STATOIL</FileCreator>
<Comment>NA</Comment>
</FileCreationInformation>
<Owner>STATOIL</Owner>
</documentInfo>
<context xsi:type="obj_report">
<kind>Copex</kind>
<title>ÅSGARD stock</title>
<date>2012-03-01</date>
<dateEnd>2012-03-31</dateEnd>
<month>2012-03</month>
<year>2012</year>
<reportVersion>1.2</reportVersion>
<reportStatus>final</reportStatus>
<installation kind="field" namingSystem="NPD" uidRef="43765">ÅSGARD</installation>
<operator>
<name>STATOIL</name>
<role>Operating company</role>
</operator>
</context><object xsi:type="obj_productVolume">
<name>MORVIN</name>
<installation kind="field" namingSystem="NPD" uidRef="4966234">MORVIN</installation>
<facility>
<name kind="field" namingSystem="NPD" uidRef="4966234">MORVIN</name>
<flow>
<name>MORVIN allocated inventory</name>
<kind>inventory</kind>
<qualifier>allocated</qualifier>
<product>
<kind>oil - net</kind>
<period>
<kind>month</kind>
<dateStart>2012-03-01</dateStart>
<dateEnd>2012-03-31</dateEnd>
<volumeValue>
<volume uom="m3">108812.9</volume>
<temp uom="degC">15</temp>
<pres uom="atm">1</pres>
</volumeValue>
<mass uom="kg">86053342.33</mass>
<densityValue>
<density uom="kg/m3">778.06</density>
<temp uom="degC">15</temp>
<pres uom="atm">1</pres>
</densityValue>
<balanceSet>
<kind>closing balance</kind>
<balanceDetail>
<owner>TOTAL</owner>
<volumeValue>
<volume uom="m3">66354.10642</volume>
<temp uom="degC">15</temp>
<pres uom="atm">1</pres>
</volumeValue>
<mass uom="kg">52475328.1528</mass>
</balanceDetail><balanceDetail>
<owner>STATOIL</owner>
<volumeValue>
<volume uom="m3">9303.50295</volume>
<temp uom="degC">15</temp>
<pres uom="atm">1</pres>
</volumeValue>
<mass uom="kg">7357560.76922</mass>
</balanceDetail><balanceDetail>
<owner>ENI NORGE</owner>
<volumeValue>
<volume uom="m3">33155.29063</volume>
<temp uom="degC">15</temp>
<pres uom="atm">1</pres>
</volumeValue>
<mass uom="kg">26220453.408</mass>
</balanceDetail>
</balanceSet>
</period>
</product>
</flow>
</facility>
</object>
</objects>
\ No newline at end of file