Holger Knublauch

Adjusted constraints to new ontologies

Added normalization to wellBoreByName function
# Saved by TopBraid on Thu Sep 15 16:25:34 BST 2011
# baseURI: http://www.reportinghub.no/ep/spin/report-constraints
# imports: http://www.reportinghub.no/ep/schema/1.0/organization
# imports: http://www.reportinghub.no/ep/schema/1.0/report
# imports: http://www.reportinghub.no/ep/schema/1.0/well
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# 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/activity
# imports: http://www.reportinghub.no/ep/schema/1.0/facility
# imports: http://www.reportinghub.no/ep/schema/1.0/organization
# imports: http://www.reportinghub.no/ep/schema/1.0/report
# imports: http://www.reportinghub.no/ep/schema/1.0/well
# imports: http://www.reportinghub.no/np/schema/1.0/npd
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/spin/rh
@prefix : <http://www.reportinghub.no/ep/spin/report-constraints#> .
......@@ -35,7 +34,7 @@
<http://www.reportinghub.no/ep/spin/report-constraints>
rdf:type owl:Ontology ;
rdfs:comment "Constraints that need to be executed after ep-report:Report generation (without SXML triples)."^^xsd:string ;
owl:imports <http://www.reportinghub.no/spin/rh> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/activity> ;
owl:imports <http://spinrdf.org/spin> , <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/facility> , <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> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/spin/rh> ;
owl:versionInfo "0.1.0"^^xsd:string .
:DDRSuperclass
......@@ -64,7 +63,7 @@
sp:path [ rdf:type sp:SeqPath ;
sp:path1
[ rdf:type sp:SeqPath ;
sp:path1 <http://www.reportinghub.no/ep/schema/activity#reportOn> ;
sp:path1 <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:path2 <http://www.reportinghub.no/ep/schema/activity#onWellBore>
] ;
sp:path2 <http://www.reportinghub.no/ep/schema/core#temporalPartOf>
......
......@@ -99,15 +99,15 @@ arg:wellName
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The value to match against."^^xsd:string ;
spl:predicate sp:arg1
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The property that must be used in the result resource."^^xsd:string ;
spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ;
spl:valueType rdf:Property
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The value to match against."^^xsd:string ;
spl:predicate sp:arg1
] ;
spin:returnType rdfs:Resource .
npdata:npd
......@@ -634,15 +634,15 @@ rhspin:dtypeValue
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The predicate that points to the reified value."^^xsd:string ;
spl:predicate sp:arg2 ;
spl:valueType rdf:Property
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The subject of the value."^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The predicate that points to the reified value."^^xsd:string ;
spl:predicate sp:arg2 ;
spl:valueType rdf:Property
] .
rhspin:facilityById
......@@ -1222,8 +1222,9 @@ rhspin:npdTripleExists
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The object to match."^^xsd:string ;
spl:predicate sp:arg3
rdfs:comment "The subject to find"^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
] ;
spin:constraint
[ rdf:type spl:Argument ;
......@@ -1233,9 +1234,8 @@ rhspin:npdTripleExists
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The subject to find"^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
rdfs:comment "The object to match."^^xsd:string ;
spl:predicate sp:arg3
] ;
spin:returnType xsd:boolean .
......@@ -1341,16 +1341,30 @@ rhspin:wellBoreByName
rdfs:subClassOf spl:URIFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b32) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:resultVariables ([ sp:varName "wellBore"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:normalizeWellBoreName ;
sp:arg1 [ sp:varName "wellBoreName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "name"^^xsd:string
]
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "wellBoreName"^^xsd:string
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject _:b32
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject _:b32
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
])
......@@ -1389,89 +1403,86 @@ rhspin:wellByName
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> .
_:b1 sp:varName "subject"^^xsd:string .
_:b2 sp:varName "wellBoreName"^^xsd:string .
_:b31
sp:varName "name"^^xsd:string .
_:b3 sp:varName "wellBoreId"^^xsd:string .
_:b30
sp:varName "id"^^xsd:string .
_:b4 sp:varName "wellBore"^^xsd:string .
_:b29
sp:varName "t4"^^xsd:string .
_:b5 sp:varName "wellName"^^xsd:string .
_:b28
sp:varName "t3"^^xsd:string .
_:b6 sp:varName "well"^^xsd:string .
_:b27
sp:varName "t2"^^xsd:string .
_:b7 sp:varName "company"^^xsd:string .
_:b26
sp:varName "t1"^^xsd:string .
_:b8 sp:varName "wellBore"^^xsd:string .
_:b25
sp:varName "t0b"^^xsd:string .
_:b9 sp:varName "licence"^^xsd:string .
_:b24
sp:varName "t0a"^^xsd:string .
_:b10
sp:varName "share"^^xsd:string .
_:b23
sp:varName "s2"^^xsd:string .
_:b11
sp:varName "wellBore"^^xsd:string .
_:b22
sp:varName "s1"^^xsd:string .
_:b12
sp:varName "share"^^xsd:string .
_:b21
sp:varName "normalizedStr"^^xsd:string .
_:b13
_:b20
sp:varName "licence"^^xsd:string .
_:b14
sp:varName "company"^^xsd:string .
_:b15
sp:varName "companyName"^^xsd:string .
_:b19
sp:varName "reif"^^xsd:string .
_:b16
sp:varName "company"^^xsd:string .
_:b18
sp:varName "value"^^xsd:string .
_:b17
sp:varName "wellBore"^^xsd:string .
_:b18
sp:varName "value"^^xsd:string .
_:b16
sp:varName "company"^^xsd:string .
_:b19
sp:varName "reif"^^xsd:string .
_:b15
sp:varName "companyName"^^xsd:string .
_:b20
_:b14
sp:varName "company"^^xsd:string .
_:b13
sp:varName "licence"^^xsd:string .
_:b21
sp:varName "normalizedStr"^^xsd:string .
_:b12
sp:varName "share"^^xsd:string .
_:b22
sp:varName "s1"^^xsd:string .
_:b11
sp:varName "wellBore"^^xsd:string .
_:b23
sp:varName "s2"^^xsd:string .
_:b10
sp:varName "share"^^xsd:string .
_:b24
sp:varName "t0a"^^xsd:string .
_:b9 sp:varName "licence"^^xsd:string .
_:b25
sp:varName "t0b"^^xsd:string .
_:b8 sp:varName "wellBore"^^xsd:string .
_:b26
sp:varName "t1"^^xsd:string .
_:b7 sp:varName "company"^^xsd:string .
_:b27
sp:varName "t2"^^xsd:string .
_:b6 sp:varName "well"^^xsd:string .
_:b28
sp:varName "t3"^^xsd:string .
_:b5 sp:varName "wellName"^^xsd:string .
_:b29
sp:varName "t4"^^xsd:string .
_:b4 sp:varName "wellBore"^^xsd:string .
_:b30
sp:varName "id"^^xsd:string .
_:b3 sp:varName "wellBoreId"^^xsd:string .
_:b31
sp:varName "name"^^xsd:string .
_:b2 sp:varName "wellBoreName"^^xsd:string .
_:b32
sp:varName "wellBore"^^xsd:string .
_:b1 sp:varName "subject"^^xsd:string .
......