Toggle navigation
Toggle navigation
This project
Loading...
Sign in
data.posccaesar.org
/
npd
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Authored by
Holger Knublauch
2011-07-29 13:09:14 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
232f33a74ceaa5887a6de47c76cc29556acf9aca
232f33a7
1 parent
a9b532ba
New template call backs
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
238 additions
and
12 deletions
www.reportinghub.no/download-ddr.swp
www.reportinghub.no/examples/npd.ttl
www.reportinghub.no/getWellBores.json.swp
www.reportinghub.no/spin/rh.spin.ttl
www.reportinghub.no/spin/rh.spin.ttl.tbc
www.reportinghub.no/swp/rh.www/js/rh.js
www.reportinghub.no/download-ddr.swp
View file @
232f33a
...
...
@@ -6,18 +6,14 @@
<script
type=
"text/javascript"
src=
"lib/rh/jquery/jquery.js"
></script>
<script
type=
"text/javascript"
src=
"lib/rh/jquery/jquery-ui.js"
></script>
<script
type=
"text/javascript"
src=
"lib/rh/js/rh.js"
></script>
<script>
function
updateWellBores
()
{
// Updates the content of the well bores list based on selected well
$
(
"#wellSelect option:selected"
).
each
(
function
()
{
$
.
getJSON
(
"getWellBores.json.swp"
,{
well
:
$
(
this
).
val
(),
ajax
:
'true'
},
function
(
j
)
{
var
options
=
''
;
for
(
var
i
=
0
;
i
&
lt
;
j
.
length
;
i
++
)
{
options
+=
'<option value="'
+
j
[
i
].
value
+
'">'
+
j
[
i
].
label
+
'</option>'
;
}
$
(
"#wellBoreSelect"
).
html
(
options
);
});
updateSelect
(
'#wellBoreSelect'
,
'{= rhspin:GetWellBoresOfWell }'
,
{
well
:
$
(
this
).
val
()
});
});
}
...
...
www.reportinghub.no/examples/npd.ttl
0 → 100644
View file @
232f33a
# Saved by TopBraid on Thu Jul 28 15:55:54 BST 2011
# baseURI: http://www.reportinghub.no/1.1/schema/npd
# imports: http://topbraid.org/spin/spinmapl
# imports: http://spinrdf.org/spin
@prefix
npd:
<http://www.reportinghub.no/schema/npd#>
.
@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
sp:
<http://spinrdf.org/sp#>
.
@prefix
spin:
<http://spinrdf.org/spin#>
.
@prefix
spl:
<http://spinrdf.org/spl#>
.
@prefix
xsd:
<http://www.w3.org/2001/XMLSchema#>
.
<http://www.reportinghub.no/1.1/schema/npd>
rdf:
type
owl:
Ontology
;
owl:
imports
<http://spinrdf.org/spin>
,
<http://topbraid.org/spin/spinmapl>
;
owl:
versionInfo
"Created with TopBraid Composer"
^^
xsd:
string
.
npd:
Company
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
npdIndividual
.
npd:
CompanyLicense
rdf:
type
owl:
Class
;
rdfs:
comment
"A class that relates a Company to a License it has been granted."
^^
xsd:
string
;
rdfs:
subClassOf
npd:
Individual
.
npd:
Facility
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
npdIndividual
.
npd:
Field
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
npdIndividual
.
npd:
FixedFacility
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
Facility
.
npd:
Individual
rdf:
type
owl:
Class
;
rdfs:
subClassOf
owl:
Thing
.
npd:
License
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
npdIndividual
.
npd:
MoveableFacility
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
Facility
.
npd:
OperatingCompany
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
Company
.
npd:
ParentCompany
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
Company
.
npd:
SubSurfaceFixedFacility
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
FixedFacility
.
npd:
SurfaceFixedFacility
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
FixedFacility
.
npd:
Well
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
Individual
.
npd:
WellBore
rdf:
type
owl:
Class
;
rdfs:
subClassOf
npd:
npdIndividual
.
npd:
awardedTo
rdf:
type
owl:
ObjectProperty
;
rdfs:
domain
npd:
CompanyLicense
;
rdfs:
range
npd:
Company
.
npd:
belongsTo
rdf:
type
owl:
ObjectProperty
;
rdfs:
domain
npd:
Facility
;
rdfs:
range
npd:
Field
.
npd:
currentActivityStatus
rdf:
type
owl:
DatatypeProperty
;
rdfs:
domain
npd:
Field
;
rdfs:
range
xsd:
string
.
npd:
currentOperator
rdf:
type
owl:
ObjectProperty
;
rdfs:
comment
"Corresponds to Current Operator field in fixed facility tables"
^^
xsd:
string
;
rdfs:
domain
npd:
FixedFacility
;
rdfs:
range
npd:
Company
.
npd:
currentlyResponsibleCompany
rdf:
type
owl:
ObjectProperty
;
rdfs:
comment
"Corresponds to Currently Reponsible Company field in moveable facility tables"
^^
xsd:
string
;
rdfs:
domain
npd:
MoveableFacility
;
rdfs:
range
npd:
Company
.
npd:
discoverWellBore
rdf:
type
owl:
ObjectProperty
;
rdfs:
domain
npd:
Field
;
rdfs:
range
npd:
WellBore
.
npd:
endDate
rdf:
type
owl:
DatatypeProperty
;
rdfs:
domain
npd:
Individual
;
rdfs:
range
xsd:
date
.
npd:
facilityKind
rdf:
type
owl:
DatatypeProperty
;
rdfs:
comment
"corresponds to Kind field in both the fixed and moveable facility tables"
^^
xsd:
string
;
rdfs:
domain
npd:
Facility
;
rdfs:
range
xsd:
string
.
npd:
fieldOperator
rdf:
type
owl:
ObjectProperty
;
rdfs:
domain
npd:
Field
;
rdfs:
range
npd:
Company
.
npd:
fixedFacilityPhase
rdf:
type
owl:
DatatypeProperty
;
rdfs:
comment
"corresponds to Phase field in fixed facility tables"
^^
xsd:
string
;
rdfs:
domain
npd:
FixedFacility
;
rdfs:
range
xsd:
string
.
npd:
id
rdf:
type
owl:
DatatypeProperty
;
rdfs:
domain
npd:
npdIndividual
;
rdfs:
range
xsd:
string
.
npd:
licenseAwarded
rdf:
type
owl:
ObjectProperty
;
rdfs:
domain
npd:
CompanyLicense
;
rdfs:
range
npd:
Company
.
npd:
name
rdf:
type
owl:
DatatypeProperty
;
rdfs:
domain
npd:
Individual
;
rdfs:
range
xsd:
string
.
npd:
npdIndividual
rdf:
type
owl:
Class
;
rdfs:
comment
"An npd:Individual that has an npd:id"
^^
xsd:
string
;
rdfs:
subClassOf
npd:
Individual
.
npd:
parentCo
rdf:
type
owl:
ObjectProperty
;
rdfs:
domain
npd:
OperatingCompany
;
rdfs:
range
npd:
ParentCompany
.
npd:
partOfWell
rdf:
type
owl:
ObjectProperty
;
rdfs:
domain
npd:
WellBore
;
rdfs:
range
npd:
Well
.
npd:
percentageInterest
rdf:
type
owl:
DatatypeProperty
;
rdfs:
domain
npd:
CompanyLicense
;
rdfs:
range
xsd:
float
.
npd:
startDate
rdf:
type
owl:
DatatypeProperty
;
rdfs:
domain
npd:
Individual
;
rdfs:
range
xsd:
date
.
www.reportinghub.no/getWellBores.json.swp
View file @
232f33a
...
...
@@ -11,8 +11,8 @@
} ORDER By ?wellBoreName
}" ui:indexVar="i"><ui:if ui:condition="{= ?i > 0 }">,</ui:if>
{
"value" : "{= ui:
json(?wellBore
) }",
"label" : "{=
?wellBoreName
}"
"value" : "{= ui:
escapeJSON(xsd:string(?wellBore)
) }",
"label" : "{=
ui:escapeJSON(?wellBoreName)
}"
}</ui:forEach>
]
</ui:setContext>
\ No newline at end of file
...
...
www.reportinghub.no/spin/rh.spin.ttl
View file @
232f33a
# Saved by TopBraid on Tue Jul 26 13:13:38 EST 2011
# baseURI: http://www.reportinghub.no/spin/rh
# imports: http://www.reportinghub.no/1.1,1/schema/ddr
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/1.1/schema/npd
@prefix
owl:
<http://www.w3.org/2002/07/owl#>
.
@prefix
rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
.
...
...
@@ -12,15 +12,52 @@
@prefix
spl:
<http://spinrdf.org/spl#>
.
@prefix
xsd:
<http://www.w3.org/2001/XMLSchema#>
.
<http://spinrdf.org/arg#well>
rdf:
type
rdf:
Property
;
rdfs:
label
"well"
^^
xsd:
string
.
<http://www.reportinghub.no/spin/rh>
rdf:
type
owl:
Ontology
;
rdfs:
comment
"A collection of SPIN functions and templates to support working with the ReportingHub schemas."
^^
xsd:
string
;
owl:
imports
<http://
spinrdf.org/spin>
,
<http://www.reportinghub.no/1.1,1/schema/ddr
>
;
owl:
imports
<http://
www.reportinghub.no/1.1/schema/npd>
,
<http://www.reportinghub.no/1.1,1/schema/ddr>
,
<http://spinrdf.org/spin
>
;
owl:
versionInfo
"0.1.0"
^^
xsd:
string
.
rhspin:
GetWellBoresOfWell
rdf:
type
spin:
SelectTemplate
;
rdfs:
comment
"Gets an ordered list of well bores that belong to a given Well. Result variables are ?wellBore and ?wellBoreName."
^^
xsd:
string
;
rdfs:
label
"Get well bores of well"
^^
xsd:
string
;
rdfs:
subClassOf
spin:
SelectTemplates
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
orderBy
(
_:
b1
)
;
sp:
resultVariables
(
_:
b2
_:
b1
)
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
[
sp:
varName
"well"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/schema/npd#partOfWell>
;
sp:
subject
_:
b2
]
[
sp:
object
_:
b1
;
sp:
predicate
<http://www.reportinghub.no/schema/npd#name>
;
sp:
subject
_:
b2
])
;
sp:
graphNameNode
<https://www.reportinghub.no/data/npd>
])
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The Well to get the bores of."
^^
xsd:
string
;
spl:
predicate
<http://spinrdf.org/arg#well>
;
spl:
valueType
<http://www.reportinghub.no/schema/npd#Well>
]
.
rhspin:
userName
rdf:
type
spin:
Function
;
rdfs:
comment
"Gets the name of the currently logged in user."
^^
xsd:
string
;
rdfs:
label
"user name"
^^
xsd:
string
;
rdfs:
subClassOf
spin:
Functions
;
spin:
returnType
xsd:
string
.
_:
b2
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b1
sp:
varName
"wellBoreName"
^^
xsd:
string
.
...
...
www.reportinghub.no/spin/rh.spin.ttl.tbc
View file @
232f33a
# Saved by TopBraid on Tue Jul 26 13:13:38 EST 2011
# baseURI: null
@prefix
composite:
<http://www.topbraid.org/2007/05/composite.owl#>
.
...
...
www.reportinghub.no/swp/rh.www/js/rh.js
0 → 100644
View file @
232f33a
/**
* Updates the options inside of a given HTML select tag from a SPARQL
* result set delivered by a SPIN template call.
* The template call must return the value as first column, and the
* display label as second column.
* @param id the ID of the select element, e.g. "#mySelect")
* @param template the URI of the template to call
* @param args an object with the argument to the template call
*/
function
updateSelect
(
id
,
template
,
args
)
{
args
[
'_template'
]
=
template
;
args
[
'ajax'
]
=
true
;
$
.
getJSON
(
"template"
,
args
,
function
(
j
)
{
var
vars
=
j
[
'head'
].
vars
;
var
valueVar
=
vars
[
0
];
var
labelVar
=
vars
[
1
];
var
bindings
=
j
[
'results'
].
bindings
;
var
options
=
''
;
for
(
var
i
=
0
;
i
<
bindings
.
length
;
i
++
)
{
var
binding
=
bindings
[
i
];
options
+=
'<option value="'
+
binding
[
valueVar
].
value
+
'">'
+
binding
[
labelVar
].
value
+
'</option>'
;
}
$
(
id
).
html
(
options
);
});
}
Please
register
or
login
to post a comment