| author | ymh <ymh.work@gmail.com> |
| Tue, 01 Oct 2013 02:14:08 +0200 | |
| changeset 126 | a345f1a67bf1 |
| parent 36 | 08cffedf6e60 |
| permissions | -rw-r--r-- |
| 126 | 1 |
# -*- coding: utf-8 -*- |
2 |
# |
|
3 |
# Copyright IRI (2013) |
|
4 |
# |
|
5 |
# contact@iri.centrepompidou.fr |
|
6 |
# |
|
7 |
# This software is governed by the CeCILL-B license under French law and |
|
8 |
# abiding by the rules of distribution of free software. You can use, |
|
9 |
# modify and/ or redistribute the software under the terms of the CeCILL-B |
|
10 |
# license as circulated by CEA, CNRS and INRIA at the following URL |
|
11 |
# "http://www.cecill.info". |
|
12 |
# |
|
13 |
# As a counterpart to the access to the source code and rights to copy, |
|
14 |
# modify and redistribute granted by the license, users are provided only |
|
15 |
# with a limited warranty and the software's author, the holder of the |
|
16 |
# economic rights, and the successive licensors have only limited |
|
17 |
# liability. |
|
18 |
# |
|
19 |
# In this respect, the user's attention is drawn to the risks associated |
|
20 |
# with loading, using, modifying and/or developing or reproducing the |
|
21 |
# software by the user in light of its specific status of free software, |
|
22 |
# that may mean that it is complicated to manipulate, and that also |
|
23 |
# therefore means that it is reserved for developers and experienced |
|
24 |
# professionals having in-depth computer knowledge. Users are therefore |
|
25 |
# encouraged to load and test the software's suitability as regards their |
|
26 |
# requirements in conditions enabling the security of their systems and/or |
|
27 |
# data to be ensured and, more generally, to use and operate it in the |
|
28 |
# same conditions as regards security. |
|
29 |
# |
|
30 |
# The fact that you are presently reading this means that you have had |
|
31 |
# knowledge of the CeCILL-B license and that you accept its terms. |
|
32 |
# |
|
33 |
||
|
36
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
34 |
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
|
35 |
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
|
36 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
37 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
38 |
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
|
39 |
# __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
|
40 |
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
|
41 |
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
|
42 |
'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
|
43 |
'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
|
44 |
'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
|
45 |
'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
|
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 |
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
|
48 |
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
|
49 |
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
|
50 |
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
|
51 |
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
|
52 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
53 |
?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
|
54 |
?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
|
55 |
?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
|
56 |
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
|
57 |
?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
|
58 |
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
|
59 |
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
|
60 |
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
|
61 |
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
|
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 |
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
|
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 |
'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
|
66 |
""" |
|
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 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
|
68 |
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
|
69 |
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
|
70 |
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
|
71 |
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
|
72 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
73 |
?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
|
74 |
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
|
75 |
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
|
76 |
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
|
77 |
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
|
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 |
'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
|
81 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
82 |
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
|
83 |
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
|
84 |
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
|
85 |
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
|
86 |
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
|
87 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
88 |
?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
|
89 |
{ ?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
|
90 |
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
|
91 |
?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
|
92 |
?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
|
93 |
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
|
94 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
95 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
96 |
'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
|
97 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
98 |
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
|
99 |
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
|
100 |
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
|
101 |
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
|
102 |
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
|
103 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
104 |
?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
|
105 |
?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
|
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 |
""" |
|
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 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
110 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
111 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
112 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
113 |
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
|
114 |
# __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
|
115 |
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
|
116 |
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
|
117 |
'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
|
118 |
'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
|
119 |
'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
|
120 |
'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
|
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 |
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
|
123 |
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
|
124 |
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
|
125 |
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
|
126 |
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
|
127 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
128 |
?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
|
129 |
?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
|
130 |
?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
|
131 |
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
|
132 |
?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
|
133 |
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
|
134 |
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
|
135 |
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
|
136 |
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
|
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 |
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
|
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 |
'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
|
141 |
""" |
|
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 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
|
143 |
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
|
144 |
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
|
145 |
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
|
146 |
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
|
147 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
148 |
?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
|
149 |
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
|
150 |
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
|
151 |
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
|
152 |
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
|
153 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
154 |
""", |
|
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-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
|
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 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
|
164 |
{ ?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
|
165 |
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
|
166 |
?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
|
167 |
?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
|
168 |
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
|
169 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
170 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
171 |
'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
|
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 |
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
|
174 |
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
|
175 |
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
|
176 |
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
|
177 |
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
|
178 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
179 |
?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
|
180 |
?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
|
181 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
182 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
183 |
})) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
184 |
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
|
185 |
'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
|
186 |
'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
|
187 |
'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
|
188 |
'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
|
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 |
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
|
191 |
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
|
192 |
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
|
193 |
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
|
194 |
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
|
195 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
196 |
?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
|
197 |
?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
|
198 |
?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
|
199 |
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
|
200 |
?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
|
201 |
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
|
202 |
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
|
203 |
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
|
204 |
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
|
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 |
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
|
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 |
'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
|
209 |
""" |
|
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 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
|
211 |
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
|
212 |
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
|
213 |
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
|
214 |
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
|
215 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
216 |
?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
|
217 |
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
|
218 |
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
|
219 |
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
|
220 |
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
|
221 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
222 |
""", |
|
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-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
|
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 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
|
232 |
{ ?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
|
233 |
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
|
234 |
?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
|
235 |
?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
|
236 |
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
|
237 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
238 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
239 |
'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
|
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 |
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
|
242 |
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
|
243 |
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
|
244 |
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
|
245 |
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
|
246 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
247 |
?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
|
248 |
?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
|
249 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
250 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
251 |
})) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
252 |
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
|
253 |
'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
|
254 |
'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
|
255 |
'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
|
256 |
'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
|
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 |
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
|
259 |
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
|
260 |
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
|
261 |
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
|
262 |
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
|
263 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
264 |
?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
|
265 |
?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
|
266 |
?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
|
267 |
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
|
268 |
?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
|
269 |
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
|
270 |
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
|
271 |
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
|
272 |
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
|
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 |
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
|
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 |
'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
|
277 |
""" |
|
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 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
|
279 |
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
|
280 |
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
|
281 |
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
|
282 |
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
|
283 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
284 |
?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
|
285 |
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
|
286 |
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
|
287 |
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
|
288 |
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
|
289 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
290 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
291 |
'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
|
292 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
293 |
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
|
294 |
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
|
295 |
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
|
296 |
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
|
297 |
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
|
298 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
299 |
?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
|
300 |
{ ?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
|
301 |
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
|
302 |
?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
|
303 |
?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
|
304 |
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
|
305 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
306 |
""", |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
307 |
'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
|
308 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
309 |
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
|
310 |
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
|
311 |
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
|
312 |
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
|
313 |
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
|
314 |
WHERE { |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
315 |
?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
|
316 |
?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
|
317 |
} |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
318 |
""" |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
319 |
})) |
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
320 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
321 |
|
|
08cffedf6e60
first step of semantic tree, just to save. it will not be used as this in this project.
cavaliet
parents:
diff
changeset
|
322 |