| author | ymh <ymh.work@gmail.com> |
| Sat, 28 Sep 2013 02:55:26 +0200 | |
| changeset 120 | 6ec0300b626e |
| parent 36 | 08cffedf6e60 |
| child 126 | a345f1a67bf1 |
| permissions | -rw-r--r-- |
|
36
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
1 |
from django import forms |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
2 |
from .widgets import SemanticTreeWidget, SemanticTagItWidget |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
3 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
4 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
5 |
class SubjectForm(forms.Form): |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
6 |
# __reg__ is updated with the real regexp by the js |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
7 |
subject = forms.CharField(required=True, label="Subjects", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
8 |
widget=SemanticTreeWidget(attrs={ |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
9 |
'size': 25, |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
10 |
'class': "form-control", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
11 |
'data-url': "http://localhost:8080/openrdf-sesame/repositories/plan4learning", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
12 |
'data-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
13 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
14 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
15 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
16 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
17 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
18 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
19 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
20 |
?uri a skos:Concept. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
21 |
?uri skos:inScheme <http://skos.um.es/unescothes/CS000> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
22 |
?uri skos:prefLabel ?label. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
23 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
24 |
?uri skos:prefLabel ?lab. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
25 |
FILTER regex (str(?lab), ?reg, 'i'). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
26 |
FILTER (lang (?lab) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
27 |
BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
28 |
BIND (STRLEN(STR(?lab)) AS ?len) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
29 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
30 |
ORDER BY ?place ?len ?lab |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
31 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
32 |
'data-root-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
33 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
34 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
35 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
36 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
37 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
38 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
39 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
40 |
?uri a skos:Collection ; |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
41 |
skos:inScheme <http://skos.um.es/unescothes/CS000> ; |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
42 |
rdfs:label ?label . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
43 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
44 |
FILTER NOT EXISTS { [skos:member ?uri] } |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
45 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
46 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
47 |
'data-childs-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
48 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
49 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
50 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
51 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
52 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
53 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
54 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
55 |
?uri skos:inScheme <http://skos.um.es/unescothes/CS000> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
56 |
{ ?uri a ?type |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
57 |
FILTER (?type = skos:Collection || ?type = skos:Concept) }. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
58 |
?root skos:narrower|skos:member ?uri. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
59 |
?uri skos:prefLabel|rdfs:label ?label. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
60 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
61 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
62 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
63 |
'data-child-count-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
64 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
65 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
66 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
67 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
68 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
69 |
SELECT (COUNT(?uri) as ?nb) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
70 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
71 |
?uri skos:inScheme <http://skos.um.es/unescothes/CS000> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
72 |
?root skos:narrower|skos:member ?uri. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
73 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
74 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
75 |
})) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
76 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
77 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
78 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
79 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
80 |
class SemForm(forms.Form): |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
81 |
# __reg__ is updated with the real regexp by the js |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
82 |
sem = forms.CharField(required=True, label="Dude, sem", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
83 |
widget=SemanticTreeWidget(attrs={ |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
84 |
'size': 25, |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
85 |
'class': "dude", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
86 |
'data-url': "http://localhost:8080/openrdf-sesame/repositories/plan4learning", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
87 |
'data-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
88 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
89 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
90 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
91 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
92 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
93 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
94 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
95 |
?uri a skos:Concept. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
96 |
?uri skos:inScheme <http://skos.um.es/unescothes/CS000> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
97 |
?uri skos:prefLabel ?label. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
98 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
99 |
?uri skos:prefLabel ?lab. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
100 |
FILTER regex (str(?lab), ?reg, 'i'). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
101 |
FILTER (lang (?lab) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
102 |
BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
103 |
BIND (STRLEN(STR(?lab)) AS ?len) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
104 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
105 |
ORDER BY ?place ?len ?lab |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
106 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
107 |
'data-root-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
108 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
109 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
110 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
111 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
112 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
113 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
114 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
115 |
?uri a skos:Collection ; |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
116 |
skos:inScheme <http://skos.um.es/unescothes/CS000> ; |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
117 |
rdfs:label ?label . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
118 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
119 |
FILTER NOT EXISTS { [skos:member ?uri] } |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
120 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
121 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
122 |
'data-childs-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
123 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
124 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
125 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
126 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
127 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
128 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
129 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
130 |
?uri skos:inScheme <http://skos.um.es/unescothes/CS000> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
131 |
{ ?uri a ?type |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
132 |
FILTER (?type = skos:Collection || ?type = skos:Concept) }. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
133 |
?root skos:narrower|skos:member ?uri. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
134 |
?uri skos:prefLabel|rdfs:label ?label. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
135 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
136 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
137 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
138 |
'data-child-count-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
139 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
140 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
141 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
142 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
143 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
144 |
SELECT (COUNT(?uri) as ?nb) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
145 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
146 |
?uri skos:inScheme <http://skos.um.es/unescothes/CS000> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
147 |
?root skos:narrower|skos:member ?uri. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
148 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
149 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
150 |
})) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
151 |
iam = forms.CharField(required=True, label="Dude, iam", widget=SemanticTreeWidget(attrs={ |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
152 |
'size': 25, |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
153 |
'class': "dude", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
154 |
'data-url': "http://localhost:8080/openrdf-sesame/repositories/plan4learning", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
155 |
'data-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
156 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
157 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
158 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
159 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
160 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
161 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
162 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
163 |
?uri a skos:Concept. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
164 |
?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
165 |
?uri skos:prefLabel ?label. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
166 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
167 |
?uri skos:prefLabel ?lab. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
168 |
FILTER regex (str(?lab), ?reg, 'i'). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
169 |
FILTER (lang (?lab) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
170 |
BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
171 |
BIND (STRLEN(STR(?lab)) AS ?len) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
172 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
173 |
ORDER BY ?place ?len ?lab |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
174 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
175 |
'data-root-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
176 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
177 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
178 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
179 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
180 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
181 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
182 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
183 |
?uri a skos:Concept ; |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
184 |
skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> ; |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
185 |
skos:prefLabel ?label . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
186 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
187 |
FILTER NOT EXISTS { [skos:narrower ?uri] } |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
188 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
189 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
190 |
'data-childs-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
191 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
192 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
193 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
194 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
195 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
196 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
197 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
198 |
?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
199 |
{ ?uri a ?type |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
200 |
FILTER (?type = skos:Collection || ?type = skos:Concept) }. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
201 |
?root skos:narrower|skos:member ?uri. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
202 |
?uri skos:prefLabel|rdfs:label ?label. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
203 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
204 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
205 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
206 |
'data-child-count-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
207 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
208 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
209 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
210 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
211 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
212 |
SELECT (COUNT(?uri) as ?nb) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
213 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
214 |
?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
215 |
?root skos:narrower|skos:member ?uri. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
216 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
217 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
218 |
})) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
219 |
ntm = forms.CharField(required=True, label="Dude, ntm", widget=SemanticTagItWidget(attrs={ |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
220 |
'size': 25, |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
221 |
'class': "dude", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
222 |
'data-url': "http://localhost:8080/openrdf-sesame/repositories/plan4learning", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
223 |
'data-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
224 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
225 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
226 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
227 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
228 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
229 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
230 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
231 |
?uri a skos:Concept. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
232 |
?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
233 |
?uri skos:prefLabel ?label. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
234 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
235 |
?uri skos:prefLabel ?lab. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
236 |
FILTER regex (str(?lab), ?reg, 'i'). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
237 |
FILTER (lang (?lab) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
238 |
BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
239 |
BIND (STRLEN(STR(?lab)) AS ?len) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
240 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
241 |
ORDER BY ?place ?len ?lab |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
242 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
243 |
'data-root-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
244 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
245 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
246 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
247 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
248 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
249 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
250 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
251 |
?uri a skos:Concept ; |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
252 |
skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> ; |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
253 |
skos:prefLabel ?label . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
254 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
255 |
FILTER NOT EXISTS { [skos:narrower ?uri] } |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
256 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
257 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
258 |
'data-childs-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
259 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
260 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
261 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
262 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
263 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
264 |
SELECT DISTINCT ?uri ?label |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
265 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
266 |
?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
267 |
{ ?uri a ?type |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
268 |
FILTER (?type = skos:Collection || ?type = skos:Concept) }. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
269 |
?root skos:narrower|skos:member ?uri. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
270 |
?uri skos:prefLabel|rdfs:label ?label. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
271 |
FILTER (lang(?label) = ?language). |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
272 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
273 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
274 |
'data-child-count-query': |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
275 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
276 |
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
277 |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
278 |
PREFIX owl:<http://www.w3.org/2002/07/owl#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
279 |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
280 |
SELECT (COUNT(?uri) as ?nb) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
281 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
282 |
?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> . |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
283 |
?root skos:narrower|skos:member ?uri. |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
284 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
285 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
286 |
})) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
287 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
288 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
289 |