PREFIX ns: <https://copenhagen.demo.linkeddatahub.com/ns#> PREFIX dh: <https://www.w3.org/ns/ldt/document-hierarchy#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dct: <http://purl.org/dc/terms/> PREFIX schema: <https://schema.org/> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> CONSTRUCT { GRAPH ?item { ?item a dh:Item ; sioc:has_container ?container ; dct:title ?name ; dh:slug ?id ; foaf:primaryTopic ?playground . ?playground a ns:Playground ; geo:lat ?lat ; geo:long ?long ; dct:identifier ?id ; dct:title ?name ; schema:streetAddress ?address_description; foaf:based_near [ dct:title ?area ] ; rdf:type [ dct:title ?playground_type ] ; schema:typicalAgeRange ?age_group ; dct:description ?description ; foaf:page ?link . } } WHERE { ?playground_row <#FID> ?id ; <#name> ?name ; <#address_description> ?address_description ; <#lat> ?lat_string ; <#long> ?long_string . OPTIONAL { ?playground_row <#area> ?area} OPTIONAL { ?playground_row <#playground_type> ?playground_type} OPTIONAL { ?playground_row <#age_group> ?age_group} OPTIONAL { ?playground_row <#description> ?description} OPTIONAL { ?playground_row <#link> ?linkString BIND (URI(?linkString) AS ?link)} BIND(uri(concat(str($base), "playgrounds/")) AS ?container) BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item) BIND(uri(concat(str(?item), "#this")) AS ?playground) BIND(xsd:float(?lat_string) AS ?lat) . BIND(xsd:float(?long_string) AS ?long) . }