PREFIX ns: <https://copenhagen.demo.linkeddatahub.com/ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dbo: <http://dbpedia.org/ontology/>
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 dh: <https://www.w3.org/ns/ldt/document-hierarchy#>
PREFIX sioc: <http://rdfs.org/sioc/ns#>
CONSTRUCT
{
GRAPH ?item
{
?item a dh:Item ;
sioc:has_container ?container ;
dh:slug ?id ;
dct:title ?name ;
foaf:primaryTopic ?toilet .
?toilet a ns:PublicToilet ;
geo:lat ?lat ;
geo:long ?long ;
schema:streetAddress ?address ;
schema:postalCode ?postcode ;
schema:additionalProperty ?toiletType ;
dbo:isHandicappedAccessible ?accessible ;
schema:location ?location ;
schema:comment ?comment ;
schema:openingHours ?openingHours ;
dct:identifier ?id ;
dct:title ?name .
}
}
WHERE
{
?toilet_row <#FID> ?id ;
<#title> ?name ;
<#adresse> ?address ;
<#latitude> ?lat_string ;
<#longitude> ?long_string .
OPTIONAL { ?toilet_row <#postnr> ?postcode }
OPTIONAL { ?toilet_row <#toilet_type> ?toiletType }
OPTIONAL { ?toilet_row <#handicapadgang> ?accessible }
OPTIONAL { ?toilet_row <#placering> ?location }
OPTIONAL { ?toilet_row <#aabningstid_bemrk> ?comment }
OPTIONAL { ?toilet_row <#opening_hours> ?openingHours }
BIND(uri(concat(str($base), "public-toilets/")) AS ?container)
BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item)
BIND(uri(concat(str(?item), "#this")) AS ?toilet)
BIND(xsd:float(?lat_string) AS ?lat)
BIND(xsd:float(?long_string) AS ?long)
}