Created
May 27, 2014 15:02
-
-
Save digitalheir/2306b006be44d35ee8d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX ah: <http://purl.org/artsholland/1.0/> | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
PREFIX dc: <http://purl.org/dc/terms/> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | |
PREFIX time: <http://www.w3.org/2006/time#> | |
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> | |
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> | |
PREFIX osgeo: <http://rdf.opensahara.com/type/geo/> | |
PREFIX bd: <http://www.bigdata.com/rdf/search#> | |
PREFIX search: <http://rdf.opensahara.com/search#> | |
PREFIX fn: <http://www.w3.org/2005/xpath-functions#> | |
PREFIX gr: <http://purl.org/goodrelations/v1#> | |
PREFIX gn: <http://www.geonames.org/ontology#> | |
SELECT DISTINCT ?event ?eventTitle ?productionTitle ?venue ?lat ?long ?address ?homepage ?eventImageUrl ?venueImageUrl { | |
# Only select events that take place while we are about | |
?event time:hasBeginning ?start. | |
?event time:hasEnd ?end. #TODO end is actually optional, but *if* it exists, make sure that it's afer endDate | |
# Note that for some reason, events in the artsholland API are in UTC. I don't know if this is an error, and the timezone should be ECT or this is on purpose. I have sent an e-mail | |
FILTER(?start < "2014-05-27T16:55:45+02:00"^^xsd:dateTime && | |
?end > "2014-05-28T00:55:45+02:00"^^xsd:dateTime). | |
?event ah:production ?production; # An event is always an instance of a production | |
ah:venue ?venue. # An event must take place at a venue | |
# For now only select venues with coordinates | |
?venue geo:lat ?lat; | |
geo:long ?long. | |
# Resolve title: | |
OPTIONAL { | |
?event dc:title ?eventTitle. # Not all events have a title... | |
} | |
OPTIONAL { | |
?production dc:title ?productionTitle # ...So sometimes we get the title from the production | |
} | |
OPTIONAL { | |
?production foaf:homepage ?homepage . | |
} | |
OPTIONAL { | |
?event ah:attachment ?eventAfbeelding. | |
?eventAfbeelding ah:attachmentType ah:AttachmentTypeAfbeelding. | |
?eventAfbeelding ah:url ?eventImageUrl. | |
} | |
OPTIONAL { | |
?venue ah:attachment ?venueAfbeelding. | |
?venueAfbeelding ah:attachmentType ah:AttachmentTypeAfbeelding. | |
?venueAfbeelding ah:url ?venueImageUrl. | |
} | |
} LIMIT 50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment