src/p4l/management/commands/get_subject_label.py
changeset 11 a88010423961
parent 9 3bc55f57b2b1
child 12 57efd01f1715
equal deleted inserted replaced
10:c4e7d66b7dc2 11:a88010423961
    16 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    16 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    17 PREFIX owl:<http://www.w3.org/2002/07/owl#>
    17 PREFIX owl:<http://www.w3.org/2002/07/owl#>
    18 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
    18 PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
    19 SELECT ?uri ?label 
    19 SELECT ?uri ?label 
    20 WHERE {
    20 WHERE {
    21     ?uri skos:inScheme <http://skos.um.es/unescothes/CS000> .
       
    22     ?uri skos:prefLabel|skos:label ?label .
    21     ?uri skos:prefLabel|skos:label ?label .
    23     FILTER (?uri = $root)
    22     ?uri skos:inScheme ?sch .
       
    23     FILTER (?uri = $root) .
       
    24     FILTER (?sch = <http://skos.um.es/unescothes/CS000> || ?sch = <http://skos.um.es/unescothes/CS000/Countries>) .
    24 }
    25 }
    25 """
    26 """
    26     
    27     
    27     def fill_label(self):
    28     def fill_label(self):
    28         # Loads Subjects label from sparkl query
    29         # Loads Subjects label from sparkl query