Closed cjhendrix closed 12 years ago
To have the title of its AgeGroupSet, use: SELECT ?ageGroupSetTitle WHERE { ?ageGroupSetUri hxl:title ?ageGroupSetTitle ; a hxl:AgeGroupSet . ?sequence ?sequenceMember http://hxl.humanitarianresponse.info/data/agegroups/unhcr/ages_0-4 . FILTER ( regex (str(?sequenceMember), "#_\d+$") ). }
Vincent figured out the query for this:
PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIX hxl: http://hxl.humanitarianresponse.info/ns/# SELECT ?ageGroupSetTitle WHERE { ?ageGroupSetUri hxl:title ?ageGroupSetTitle ; a hxl:AgeGroupSet, rdf:Seq . ?sequence ?sequenceMember http://hxl.humanitarianresponse.info/data/agegroups/unhcr/ages_0-4 . FILTER ( regex (str(?sequenceMember), "#_\d+$") ). }
Actually, this works more simply: PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIX hxl: http://hxl.humanitarianresponse.info/ns/# SELECT DISTINCT ?ageGroupSetTitle WHERE { ?ageGroupSetUri hxl:title ?ageGroupSetTitle ; a hxl:AgeGroupSet ; ?foo http://hxl.humanitarianresponse.info/data/agegroups/unhcr/ages_0-4 . }
Fixed in https://github.com/hxl-team/HXLator/commit/56005fbbee25f60778b7693ac3058106aa27b53b
I have also changed the UNHCR age groups data. They now use a ref:List and the rdfs:member property.
We had decided to re-title the hxl:AgeGroups to include the source (ie: changing "Ages 0 to 4" to "Ages 0 to 4 (UNHCR Default Age Categories)".
However, after looking at it, we already have the source in the form of the title of the hxl:AgeGroupSet. For those places where we need to distinguish between similarly named AgeGroups in different AgeGroupSets, couldn't we just query the title of the AgeGroupSet?