Project:SPARQL/examples: Difference between revisions

m
Line 287: Line 287:
     # more about the position
     # more about the position
     ?s ( bnps:P17|bnps:P48|bnps:P105 ) ?position .   
     ?s ( bnps:P17|bnps:P48|bnps:P105 ) ?position .   
     # employer / organised by / of (incl free text). TODO: check whether these are mutually exclusive; could make this a union if so.
     # employer / organised by / of (incl free text). TODO: check whether these are mutually exclusive; could make this a union.
     OPTIONAL { ?s bnpq:P18 ?employer .}   
     OPTIONAL { ?s bnpq:P18 ?employer .}   
     OPTIONAL { ?s bnpq:P109 ?organised .}
     OPTIONAL { ?s bnpq:P109 ?organised .}
Line 293: Line 293:
   
   
   # optional { ?s bnpq:P2 ?location . } # sometimes there is location and no employer/org/of  
   # optional { ?s bnpq:P2 ?location . } # sometimes there is location and no employer/org/of  
 
# noted other properties in use for work activities
# facilitated by; seems to be individuals connections rather than orgs.  instance of; doesn't seem very useful
      
      
   # dates
   # dates
Line 303: Line 300:
       ?qual_prop wikibase:qualifier ?pq;       
       ?qual_prop wikibase:qualifier ?pq;       
               #wikibase:propertyType ?date_prop_type; # can check date property types if needed
               #wikibase:propertyType ?date_prop_type; # can check date property types if needed
               wikibase:propertyType wikibase:Time ; # nb that this *does not* include edtf dates but AFAICT there are none in qualifiers.
               wikibase:propertyType wikibase:Time ; # nb *does not* include edtf dates but AFAICT there are none in qualifiers.
               rdfs:label ?date_label . filter(lang(?date_label)="en-gb") . # what kind of date is it.
               rdfs:label ?date_label . filter(lang(?date_label)="en-gb") . # what kind of date is it.
       } # /dates
       } # /dates
579

edits