MonkeyChap

Added function ep-dpr-spin-lib:buildDailyProductionActivityURI

# Saved by TopBraid on Wed Oct 12 14:16:37 BST 2011
# Saved by TopBraid on Wed Oct 12 16:06:08 BST 2011
# baseURI: http://www.reportinghub.no/ep/dpr/spin/1.1/lib
# imports: http://www.reportinghub.no/ep/schema/1.0/geography
# imports: http://www.reportinghub.no/ep/schema/1.0/well
......@@ -51,13 +51,40 @@ ep-dpr-spin-lib:buildCountryURI
])
] .
ep-dpr-spin-lib:buildDailyProductionActivityURI
rdf:type spin:Function ;
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
rdfs:comment """arg1 is name of facility (this is going to change when we sort out the identity lookup)
arg2 is start date
arg3 is end date"""^^xsd:string ;
sp:resultVariables (_:b2) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/dailyProductionActivity/" ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 spin:_arg1
] ;
sp:arg2 "$" ;
sp:arg3 spin:_arg2 ;
sp:arg4 "$" ;
sp:arg5 spin:_arg3
]
] ;
sp:variable _:b2
])
] .
ep-dpr-spin-lib:buildProductFlowURI
rdf:type spin:Function ;
rdfs:label "build ProductFlow URI"^^xsd:string ;
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b2) ;
sp:resultVariables (_:b3) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildURI ;
......@@ -68,7 +95,7 @@ ep-dpr-spin-lib:buildProductFlowURI
sp:arg3 spin:_arg2
]
] ;
sp:variable _:b2
sp:variable _:b3
])
] .
......@@ -78,7 +105,7 @@ ep-dpr-spin-lib:buildProductionFacilityURI
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b3) ;
sp:resultVariables (_:b4) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildURI ;
......@@ -87,7 +114,7 @@ ep-dpr-spin-lib:buildProductionFacilityURI
sp:arg1 spin:_arg1
]
] ;
sp:variable _:b3
sp:variable _:b4
])
] .
......@@ -97,7 +124,7 @@ ep-dpr-spin-lib:buildProductionFlowURI
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b4) ;
sp:resultVariables (_:b5) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildURI ;
......@@ -106,7 +133,7 @@ ep-dpr-spin-lib:buildProductionFlowURI
sp:arg1 spin:_arg1
]
] ;
sp:variable _:b4
sp:variable _:b5
])
] .
......@@ -116,7 +143,7 @@ ep-dpr-spin-lib:buildProductionFlowsForAPeriodURI
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b5) ;
sp:resultVariables (_:b6) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildURI ;
......@@ -129,7 +156,7 @@ ep-dpr-spin-lib:buildProductionFlowsForAPeriodURI
sp:arg5 spin:_arg3
]
] ;
sp:variable _:b5
sp:variable _:b6
])
] .
......@@ -139,7 +166,7 @@ ep-dpr-spin-lib:buildStateURI
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b6) ;
sp:resultVariables (_:b7) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildURI ;
......@@ -148,7 +175,7 @@ ep-dpr-spin-lib:buildStateURI
sp:arg1 spin:_arg1
]
] ;
sp:variable _:b6
sp:variable _:b7
])
] .
......@@ -158,7 +185,7 @@ ep-dpr-spin-lib:selectProductType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b7) ;
sp:resultVariables (_:b8) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -365,7 +392,7 @@ ep-dpr-spin-lib:selectProductType
]
]
] ;
sp:variable _:b7
sp:variable _:b8
])
] .
......@@ -375,7 +402,7 @@ ep-dpr-spin-lib:selectProductionFacilityType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b8) ;
sp:resultVariables (_:b9) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -554,7 +581,7 @@ ep-dpr-spin-lib:selectProductionFacilityType
]
]
] ;
sp:variable _:b8
sp:variable _:b9
])
] .
......@@ -564,7 +591,7 @@ ep-dpr-spin-lib:selectProductionFlowDefinitionType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b9) ;
sp:resultVariables (_:b10) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -624,7 +651,7 @@ ep-dpr-spin-lib:selectProductionFlowDefinitionType
]
]
] ;
sp:variable _:b9
sp:variable _:b10
])
] .
......@@ -634,7 +661,7 @@ ep-dpr-spin-lib:selectProductionFlowDirectionInverseRelationshipType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b10) ;
sp:resultVariables (_:b11) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -652,7 +679,7 @@ ep-dpr-spin-lib:selectProductionFlowDirectionInverseRelationshipType
sp:arg3 <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf>
]
] ;
sp:variable _:b10
sp:variable _:b11
])
] .
......@@ -662,7 +689,7 @@ ep-dpr-spin-lib:selectProductionFlowDirectionRelationshipType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b11) ;
sp:resultVariables (_:b12) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -680,7 +707,7 @@ ep-dpr-spin-lib:selectProductionFlowDirectionRelationshipType
sp:arg3 <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf>
]
] ;
sp:variable _:b11
sp:variable _:b12
])
] .
......@@ -690,7 +717,7 @@ ep-dpr-spin-lib:selectProductionFlowPurposeType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b12) ;
sp:resultVariables (_:b13) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -841,7 +868,7 @@ ep-dpr-spin-lib:selectProductionFlowPurposeType
]
]
] ;
sp:variable _:b12
sp:variable _:b13
])
] .
......@@ -851,7 +878,7 @@ ep-dpr-spin-lib:selectRelationshipToMeasure
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b13) ;
sp:resultVariables (_:b14) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -925,7 +952,7 @@ ep-dpr-spin-lib:selectRelationshipToMeasure
]
]
] ;
sp:variable _:b13
sp:variable _:b14
])
] .
......@@ -934,7 +961,7 @@ ep-dpr-spin-lib:selectSafetyActivityType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b14) ;
sp:resultVariables (_:b15) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -1078,7 +1105,7 @@ ep-dpr-spin-lib:selectSafetyActivityType
]
]
] ;
sp:variable _:b14
sp:variable _:b15
])
] .
......@@ -1088,7 +1115,7 @@ ep-dpr-spin-lib:selectTemporalPartOfAFlowDurationType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b15) ;
sp:resultVariables (_:b16) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -1162,7 +1189,7 @@ ep-dpr-spin-lib:selectTemporalPartOfAFlowDurationType
]
]
] ;
sp:variable _:b15
sp:variable _:b16
])
] .
......@@ -1171,7 +1198,7 @@ ep-dpr-spin-lib:selectTemporalPartOfActivityDurationType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b16) ;
sp:resultVariables (_:b17) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -1245,7 +1272,7 @@ ep-dpr-spin-lib:selectTemporalPartOfActivityDurationType
]
]
] ;
sp:variable _:b16
sp:variable _:b17
])
] .
......@@ -1255,7 +1282,7 @@ ep-dpr-spin-lib:selectVolumeAtStandardTemperaturePressureType
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b17) ;
sp:resultVariables (_:b18) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -1280,7 +1307,7 @@ ep-dpr-spin-lib:selectVolumeAtStandardTemperaturePressureType
]
]
] ;
sp:variable _:b17
sp:variable _:b18
])
] .
......@@ -1290,7 +1317,7 @@ ep-dpr-spin-lib:selectVolumeScale
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b18) ;
sp:resultVariables (_:b19) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
......@@ -1518,39 +1545,47 @@ ep-dpr-spin-lib:selectVolumeScale
]
]
] ;
sp:variable _:b18
sp:variable _:b19
])
] .
_:b18
_:b2 sp:varName "uri"^^xsd:string .
_:b19
sp:varName "volumeScale"^^xsd:string .
_:b17
_:b18
sp:varName "volumeAtStdType"^^xsd:string .
_:b15
_:b17
sp:varName "prodActType"^^xsd:string .
_:b16
sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
_:b14
_:b15
sp:varName "safetyActivityType"^^xsd:string .
_:b13
_:b14
sp:varName "relationshipToMeasure"^^xsd:string .
_:b12
_:b13
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b12
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b11
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b10
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b9 sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b9 sp:varName "productionFacilityType"^^xsd:string .
_:b8 sp:varName "productionFacilityType"^^xsd:string .
_:b8 sp:varName "productType"^^xsd:string .
_:b7 sp:varName "productType"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
......@@ -1560,9 +1595,4 @@ _:b4 sp:varName "uri"^^xsd:string .
_:b3 sp:varName "uri"^^xsd:string .
_:b2 sp:varName "uri"^^xsd:string .
_:b1 sp:varName "uri"^^xsd:string .
_:b16
sp:varName "prodActType"^^xsd:string .
......
# Saved by TopBraid on Wed Oct 12 14:16:38 BST 2011
# Saved by TopBraid on Wed Oct 12 16:06:08 BST 2011
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
......