src/p4l/settings.py
changeset 90 33a7b2a4af87
parent 86 4effe076e087
child 95 594f79a5706b
equal deleted inserted replaced
88:1753fcef095a 90:33a7b2a4af87
   198 "root" : """
   198 "root" : """
   199 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   199 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   200 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   200 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   201 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   201 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   202 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
   202 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
   203 SELECT DISTINCT ?uri ?label
   203 SELECT DISTINCT ?uri ?label ?type
   204 WHERE {
   204 WHERE {
   205     ?uri a skos:Collection ;
   205     ?uri a skos:Collection ;
   206     skos:inScheme <http://skos.um.es/unescothes/CS000> ;    
   206     skos:inScheme <http://skos.um.es/unescothes/CS000> ;
   207     skos:prefLabel|rdfs:label ?label .
   207     skos:prefLabel|rdfs:label ?label ;
       
   208     rdf:type ?type ;
   208     FILTER (lang(?label) = %s). 
   209     FILTER (lang(?label) = %s). 
   209     FILTER NOT EXISTS { [skos:member ?uri] }
   210     FILTER NOT EXISTS { [skos:member ?uri] }.
   210 }
   211 }
   211 ORDER BY ?label
   212 ORDER BY ?label
   212 """,
   213 """,
   213 "childs" : """
   214 "childs" : """
   214 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   215 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   215 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   216 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   216 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   217 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   217 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
   218 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
   218 SELECT DISTINCT ?uri ?label
   219 SELECT DISTINCT ?uri ?label ?type
   219 WHERE {
   220 WHERE {
   220   ?uri skos:inScheme <http://skos.um.es/unescothes/CS000> .
   221   ?uri skos:inScheme <http://skos.um.es/unescothes/CS000> .
   221   { ?uri a ?type
   222   { ?uri a ?type
   222     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   223     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   223   ?root skos:narrower|skos:member ?uri.
   224   ?root skos:narrower|skos:member ?uri.
   261 'root' : """
   262 'root' : """
   262 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   263 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   263 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   264 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   264 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   265 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   265 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
   266 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
   266 SELECT DISTINCT ?uri ?label
   267 SELECT DISTINCT ?uri ?label ?type
   267 WHERE {
   268 WHERE {
   268     ?uri a skos:Collection ;
   269     ?uri a skos:Collection ;
   269     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> ;    
   270     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> ;    
   270     skos:prefLabel|rdfs:label ?label .
   271     skos:prefLabel|rdfs:label ?label ;
       
   272     rdf:type ?type ;
   271     FILTER (lang(?label) = %s). 
   273     FILTER (lang(?label) = %s). 
   272     FILTER NOT EXISTS { [skos:member ?uri] }
   274     FILTER NOT EXISTS { [skos:member ?uri] }
   273 }
   275 }
   274 ORDER BY ?label
   276 ORDER BY ?label
   275 """,
   277 """,
   276 'childs' : """
   278 'childs' : """
   277 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   279 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   278 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   280 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   279 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   281 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   280 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
   282 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
   281 SELECT DISTINCT ?uri ?label
   283 SELECT DISTINCT ?uri ?label ?type
   282 WHERE {
   284 WHERE {
   283   ?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> .
   285   ?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> .
   284   { ?uri a ?type
   286   { ?uri a ?type
   285     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   287     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   286   ?root skos:narrower|skos:member ?uri.
   288   ?root skos:narrower|skos:member ?uri.