src/p4l/management/commands/get_subject_label.py
changeset 11 a88010423961
parent 9 3bc55f57b2b1
child 12 57efd01f1715
--- a/src/p4l/management/commands/get_subject_label.py	Fri Aug 30 13:08:29 2013 +0200
+++ b/src/p4l/management/commands/get_subject_label.py	Fri Aug 30 15:59:45 2013 +0200
@@ -18,9 +18,10 @@
 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
 SELECT ?uri ?label 
 WHERE {
-    ?uri skos:inScheme <http://skos.um.es/unescothes/CS000> .
     ?uri skos:prefLabel|skos:label ?label .
-    FILTER (?uri = $root)
+    ?uri skos:inScheme ?sch .
+    FILTER (?uri = $root) .
+    FILTER (?sch = <http://skos.um.es/unescothes/CS000> || ?sch = <http://skos.um.es/unescothes/CS000/Countries>) .
 }
 """