src/p4l/settings.py
changeset 95 594f79a5706b
parent 90 33a7b2a4af87
child 99 0d54489e8b26
--- a/src/p4l/settings.py	Mon Sep 16 18:00:04 2013 +0200
+++ b/src/p4l/settings.py	Tue Sep 17 16:11:13 2013 +0200
@@ -408,12 +408,13 @@
 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX owl:<http://www.w3.org/2002/07/owl#>
 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
-SELECT DISTINCT ?uri ?label
+SELECT DISTINCT ?uri ?label ?acro
 WHERE {
     ?uri a skos:Concept.
     ?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Projects> .
     ?uri skos:prefLabel ?label.
     ?uri skos:prefLabel ?lab.
+    OPTIONAL { ?uri skos:altLabel ?acro }.
     FILTER regex (str(?lab), ?reg, 'i').
     BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place).
     BIND (STRLEN(STR(?lab)) AS ?len)
@@ -425,11 +426,12 @@
 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX owl:<http://www.w3.org/2002/07/owl#>
 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
-SELECT DISTINCT ?uri ?label
+SELECT DISTINCT ?uri ?label ?acro
 WHERE {
     ?uri a skos:Concept ;
     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Projects> ;    
     skos:prefLabel ?label .
+    OPTIONAL { ?uri skos:altLabel ?acro }
 }
 ORDER BY ?label
 """
@@ -440,12 +442,13 @@
 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX owl:<http://www.w3.org/2002/07/owl#>
 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
-SELECT DISTINCT ?uri ?label
+SELECT DISTINCT ?uri ?label ?acro
 WHERE {
     ?uri a skos:Concept.
     ?uri skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Organizations> .
     ?uri skos:prefLabel ?label.
     ?uri skos:prefLabel ?lab.
+    OPTIONAL { ?uri skos:altLabel ?acro }.
     FILTER regex (str(?lab), ?reg, 'i').
     BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place).
     BIND (STRLEN(STR(?lab)) AS ?len)
@@ -457,11 +460,12 @@
 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX owl:<http://www.w3.org/2002/07/owl#>
 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
-SELECT DISTINCT ?uri ?label
+SELECT DISTINCT ?uri ?label ?acro
 WHERE {
     ?uri a skos:Concept ;
     skos:inScheme <http://www.iiep.unesco.org/plan4learning/scheme/Organizations> ;    
     skos:prefLabel ?label .
+    OPTIONAL { ?uri skos:altLabel ?acro }
 }
 ORDER BY ?label
 """