src/p4l/settings.py
changeset 86 4effe076e087
parent 84 caafe38298d7
child 90 33a7b2a4af87
equal deleted inserted replaced
84:caafe38298d7 86:4effe076e087
   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     FILTER (lang(?label) = %s). 
   208     FILTER (lang(?label) = %s). 
   209     FILTER NOT EXISTS { [skos:member ?uri] }
   209     FILTER NOT EXISTS { [skos:member ?uri] }
   210 }
   210 }
       
   211 ORDER BY ?label
   211 """,
   212 """,
   212 "childs" : """
   213 "childs" : """
   213 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   214 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   214 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   215 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   215 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   216 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   221     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   222     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   222   ?root skos:narrower|skos:member ?uri.
   223   ?root skos:narrower|skos:member ?uri.
   223   ?uri skos:prefLabel|rdfs:label ?label.
   224   ?uri skos:prefLabel|rdfs:label ?label.
   224   FILTER (lang(?label) = %s).
   225   FILTER (lang(?label) = %s).
   225 }
   226 }
       
   227 ORDER BY ?label
   226 """,
   228 """,
   227 "child-count" : """
   229 "child-count" : """
   228 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   230 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   229 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   231 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   230 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   232 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   267     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> ;    
   269     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Themes> ;    
   268     skos:prefLabel|rdfs:label ?label .
   270     skos:prefLabel|rdfs:label ?label .
   269     FILTER (lang(?label) = %s). 
   271     FILTER (lang(?label) = %s). 
   270     FILTER NOT EXISTS { [skos:member ?uri] }
   272     FILTER NOT EXISTS { [skos:member ?uri] }
   271 }
   273 }
       
   274 ORDER BY ?label
   272 """,
   275 """,
   273 'childs' : """
   276 'childs' : """
   274 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   277 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   275 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   278 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   276 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   279 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   282     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   285     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   283   ?root skos:narrower|skos:member ?uri.
   286   ?root skos:narrower|skos:member ?uri.
   284   ?uri skos:prefLabel|rdfs:label ?label.
   287   ?uri skos:prefLabel|rdfs:label ?label.
   285   FILTER (lang(?label) = %s).
   288   FILTER (lang(?label) = %s).
   286 }
   289 }
       
   290 ORDER BY ?label
   287 """,
   291 """,
   288 'child-count' : """
   292 'child-count' : """
   289 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   293 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   290 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   294 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   291 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   295 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   328     skos:inScheme <http://skos.um.es/unescothes/CS000/Countries> ;    
   332     skos:inScheme <http://skos.um.es/unescothes/CS000/Countries> ;    
   329     skos:prefLabel ?label .
   333     skos:prefLabel ?label .
   330     FILTER (lang(?label) = %s). 
   334     FILTER (lang(?label) = %s). 
   331     FILTER NOT EXISTS { [skos:narrower ?uri] }
   335     FILTER NOT EXISTS { [skos:narrower ?uri] }
   332 }
   336 }
       
   337 ORDER BY ?label
   333 """,
   338 """,
   334 'childs' : """
   339 'childs' : """
   335 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   340 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   336 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   341 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   337 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   342 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   343     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   348     FILTER (?type = skos:Collection || ?type = skos:Concept) }.
   344   ?root skos:narrower|skos:member ?uri.
   349   ?root skos:narrower|skos:member ?uri.
   345   ?uri skos:prefLabel|rdfs:label ?label.
   350   ?uri skos:prefLabel|rdfs:label ?label.
   346   FILTER (lang(?label) = %s).
   351   FILTER (lang(?label) = %s).
   347 }
   352 }
       
   353 ORDER BY ?label
   348 """,
   354 """,
   349 'child-count' : """
   355 'child-count' : """
   350 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   356 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   351 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   357 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   352 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   358 PREFIX owl:<http://www.w3.org/2002/07/owl#>
   389     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Languages> ;    
   395     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Languages> ;    
   390     skos:prefLabel ?label .
   396     skos:prefLabel ?label .
   391     FILTER (lang(?label) = %s). 
   397     FILTER (lang(?label) = %s). 
   392     FILTER NOT EXISTS { [skos:narrower ?uri] }
   398     FILTER NOT EXISTS { [skos:narrower ?uri] }
   393 }
   399 }
       
   400 ORDER BY ?label
   394 """
   401 """
   395 }
   402 }
   396 SPARQL_PROJECT_QUERIES = {
   403 SPARQL_PROJECT_QUERIES = {
   397 'filter' : """
   404 'filter' : """
   398 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   405 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   420 WHERE {
   427 WHERE {
   421     ?uri a skos:Concept ;
   428     ?uri a skos:Concept ;
   422     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Projects> ;    
   429     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Projects> ;    
   423     skos:prefLabel ?label .
   430     skos:prefLabel ?label .
   424 }
   431 }
       
   432 ORDER BY ?label
   425 """
   433 """
   426 }
   434 }
   427 SPARQL_ORGANIZATION_QUERIES = {
   435 SPARQL_ORGANIZATION_QUERIES = {
   428 'filter' : """
   436 'filter' : """
   429 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   437 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   451 WHERE {
   459 WHERE {
   452     ?uri a skos:Concept ;
   460     ?uri a skos:Concept ;
   453     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Organizations> ;    
   461     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Organizations> ;    
   454     skos:prefLabel ?label .
   462     skos:prefLabel ?label .
   455 }
   463 }
       
   464 ORDER BY ?label
   456 """
   465 """
   457 }
   466 }
   458 SPARQL_TYPE_QUERIES = {
   467 SPARQL_TYPE_QUERIES = {
   459 'filter' : """
   468 'filter' : """
   460 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   469 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   486     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/DocumentType> ;    
   495     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/DocumentType> ;    
   487     skos:prefLabel ?label .
   496     skos:prefLabel ?label .
   488     FILTER (lang(?label) = %s). 
   497     FILTER (lang(?label) = %s). 
   489     FILTER NOT EXISTS { [skos:narrower ?uri] }
   498     FILTER NOT EXISTS { [skos:narrower ?uri] }
   490 }
   499 }
       
   500 ORDER BY ?label
   491 """
   501 """
   492 }
   502 }
   493 
   503 
   494 
   504 
   495 REST_FRAMEWORK = {
   505 REST_FRAMEWORK = {