-
Notifications
You must be signed in to change notification settings - Fork 2
/
hypothesis_gen.rq
44 lines (39 loc) · 1.42 KB
/
hypothesis_gen.rq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#+ summary: All variables in the hub and the datasets using them
#+ tags:
#+ - overview
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX np: <http://www.nanopub.org/nschema#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX example: <http://www.example.org/rdf#>
PREFIX qb: <http://purl.org/linked-data/cube#>
SELECT DISTINCT ?source_dimension_a ?dim_lbl_a ?source_dimension_b ?dim_lbl_b ?hypo
WHERE {
{
?source_np np:hasAssertion ?source_assertion .
GRAPH ?source_assertion {
?_sourcedataset_iri qb:structure/qb:component/(qb:dimension|qb:measure) ?source_dimension_a .
?observation_a ?source_dimension_a ?dimension_value_a .
?source_dimension_a rdfs:label ?dim_lbl_a .
?_sourcedataset_iri qb:structure/qb:component/(qb:dimension|qb:measure) ?source_dimension_b .
?observation_b ?source_dimension_b ?dimension_value_b .
?source_dimension_b rdfs:label ?dim_lbl_b .
}
}
UNION
{
?source_dimension_a a qb:DimensionProperty .
?source_dimension_a rdfs:label ?dim_lbl_a .
?source_dimension_b a qb:DimensionProperty .
?source_dimension_b rdfs:label ?dim_lbl_b .
}
UNION
{
?source_dimension_a a qb:MeasureProperty .
?source_dimension_a rdfs:label ?dim_lbl_a .
?source_dimension_b a qb:MeasureProperty .
?source_dimension_b rdfs:label ?dim_lbl_b .
}
BIND(CONCAT(?dim_lbl_a, ?dim_lbl_b) AS ?hypo)
}