Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ else
proxy="$base"
fi

admin_uri() {
local uri="$1"
echo "$uri" | sed 's|://|://admin.|'
}

admin_base=$(admin_uri "$base")
admin_proxy=$(admin_uri "$proxy")

clear-ontology.sh \
-f "$cert_pem_file" \
-p "$cert_password" \
-b "${base}admin/" \
--proxy "$proxy" \
-b "$admin_base" \
--proxy "$admin_proxy" \
--ontology "${base}ns#"
Original file line number Diff line number Diff line change
Expand Up @@ -17,92 +17,100 @@ else
proxy="$base"
fi

admin_uri() {
local uri="$1"
echo "$uri" | sed 's|://|://admin.|'
}

admin_base=$(admin_uri "$base")
admin_proxy=$(admin_uri "$proxy")

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#BicycleParking" \
--label "Bicycle parking" \
--sub-class-of "https://schema.org/CivicStructure" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#ChargingStation" \
--label "Charging station" \
--sub-class-of "https://schema.org/CivicStructure" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#Library" \
--label "Library" \
--sub-class-of "https://schema.org/Library" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#ParkingFacility" \
--label "Parking facility" \
--sub-class-of "https://schema.org/ParkingFacility" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#Place" \
--label "Place" \
--sub-class-of "https://schema.org/CivicStructure" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#Playground" \
--label "Playground" \
--sub-class-of "https://schema.org/Playground" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#School" \
--label "School" \
--sub-class-of "https://schema.org/School" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#SportsCenter" \
--label "Sports center" \
--sub-class-of "https://schema.org/CivicStructure" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"

add-class.sh \
-b "${base}admin/" \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--uri "${base}ns#PublicToilet" \
--label "Toilet" \
--sub-class-of "http://schema.org/PublicToilet" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ add-select.sh \
-p "$cert_password" \
--proxy "$proxy" \
--title "Largest parking facilities" \
--fragment "$query_id" \
--uri "#${query_id}" \
--query-file "${pwd}/queries/charts/parking-facilities-by-spaces.rq" \
"$chart_doc"

Expand All @@ -47,7 +47,7 @@ add-result-set-chart.sh \
-p "$cert_password" \
--proxy "$proxy" \
--title "Largest parking facilities" \
--fragment this \
--uri "#this" \
--query "${chart_doc}#${query_id}" \
--chart-type "https://w3id.org/atomgraph/client#BarChart" \
--category-var-name "name" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,14 @@ else
proxy="$base"
fi

parent=$(
create-container.sh \
-b "$base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--title "Copenhagen" \
--slug "copenhagen" \
--parent "$base"
)

if [ -z "$parent" ]; then
exit 1
fi

create-container.sh \
-b "$base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--title "Places" \
--slug "places" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"

create-container.sh \
Expand All @@ -49,7 +34,7 @@ create-container.sh \
--proxy "$proxy" \
--title "Bicycle parkings" \
--slug "bicycle-parkings" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"

create-container.sh \
Expand All @@ -59,7 +44,7 @@ create-container.sh \
--proxy "$proxy" \
--title "Charging stations" \
--slug "charging-stations" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"

create-container.sh \
Expand All @@ -69,7 +54,7 @@ create-container.sh \
--proxy "$proxy" \
--title "Libraries" \
--slug "libraries" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"

create-container.sh \
Expand All @@ -79,7 +64,7 @@ create-container.sh \
--proxy "$proxy" \
--title "Parking facilities" \
--slug "parking-facilities" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"

create-container.sh \
Expand All @@ -89,7 +74,7 @@ create-container.sh \
--proxy "$proxy" \
--title "Playgrounds" \
--slug "playgrounds" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"

create-container.sh \
Expand All @@ -99,7 +84,7 @@ create-container.sh \
--proxy "$proxy" \
--title "Schools" \
--slug "schools" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"

create-container.sh \
Expand All @@ -109,7 +94,7 @@ create-container.sh \
--proxy "$proxy" \
--title "Sport centers" \
--slug "sports-centers" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"

create-container.sh \
Expand All @@ -119,5 +104,5 @@ create-container.sh \
--proxy "$proxy" \
--title "Public toilets" \
--slug "public-toilets" \
--parent "$parent" \
--parent "$base" \
--mode "https://w3id.org/atomgraph/client#MapMode"
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ WHERE
OPTIONAL
{ ?bicyleParking_row <#antal_pladser> ?spaces }

BIND(uri(concat(str($base), "copenhagen/bicycle-parkings/")) AS ?container)
BIND(uri(concat(str($base), "bicycle-parkings/")) AS ?container)
BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item)
BIND(uri(concat(str(?item), "#this")) AS ?bicyleParking)
BIND(xsd:float(?lat_string) AS ?lat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ WHERE
OPTIONAL
{ ?charger_row <#bem> ?information }

BIND(uri(concat(str($base), "copenhagen/charging-stations/")) AS ?container)
BIND(uri(concat(str($base), "charging-stations/")) AS ?container)
BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item)
BIND(uri(concat(str(?item), "#this")) AS ?charger)
BIND(xsd:float(?lat_string) AS ?lat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ WHERE
BIND (URI(?linkString) AS ?link)
}

BIND(uri(concat(str($base), "copenhagen/libraries/")) AS ?container)
BIND(uri(concat(str($base), "libraries/")) AS ?container)
BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item)
BIND(uri(concat(str(?item), "#this")) AS ?library)
BIND(xsd:float(?lat_string) AS ?lat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ WHERE
BIND (<http://www.wikidata.org/entity/Q504125> AS ?owner) # Copenhagen Municipality
}

BIND(uri(concat(str($base), "copenhagen/parking-facilities/")) AS ?container)
BIND(uri(concat(str($base), "parking-facilities/")) AS ?container)
BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item)
BIND(uri(concat(str(?item), "#this")) AS ?parking)
BIND(xsd:float(?lat_string) AS ?lat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ WHERE
OPTIONAL
{ ?place_row <#category> ?category_name }

BIND(uri(concat(str($base), "copenhagen/places/")) AS ?container)
BIND(uri(concat(str($base), "places/")) AS ?container)
BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item)
BIND(uri(concat(str(?item), "#this")) AS ?place)
BIND(xsd:float(?lat_string) AS ?lat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ WHERE
{ ?playground_row <#link> ?linkString
BIND (URI(?linkString) AS ?link)}

BIND(uri(concat(str($base), "copenhagen/playgrounds/")) AS ?container)
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) .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ WHERE
OPTIONAL { ?toilet_row <#aabningstid_bemrk> ?comment }
OPTIONAL { ?toilet_row <#opening_hours> ?openingHours }

BIND(uri(concat(str($base), "copenhagen/public-toilets/")) AS ?container)
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ WHERE
BIND (URI(?linkString) AS ?link)
}

BIND (uri(concat(str($base), "copenhagen/schools/")) AS ?container)
BIND (uri(concat(str($base), "schools/")) AS ?container)
BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item)
BIND(uri(concat(str(?item), "#this")) AS ?school)
BIND(xsd:float(?lat_string) AS ?lat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ WHERE
BIND (URI(?linkString) AS ?link)
}

BIND(uri(concat(str($base), "copenhagen/sports-centers/")) AS ?container)
BIND(uri(concat(str($base), "sports-centers/")) AS ?container)
BIND(uri(concat(str(?container), encode_for_uri(?id), "/")) AS ?item)
BIND(uri(concat(str(?item), "#this")) AS ?sportCenter)
BIND(xsd:float(?lat_string) AS ?lat)
Expand Down
6 changes: 3 additions & 3 deletions demo/city-graph/root.ttl → demo/copenhagen/root.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@prefix sioc: <http://rdfs.org/sioc/ns#> .

<> a def:Root ;
dct:title "City Graph" ;
dct:title "Copenhagen" ;
dct:description "Geospatial and other open data about cities, imported by transforming CSV files to RDF" ;
rdf:_1 <#page-header> ;
rdf:_2 <#main-library> ;
Expand All @@ -20,7 +20,7 @@
<#page-header> a ldh:XHTML ;
rdf:value """<div xmlns="http://www.w3.org/1999/xhtml">
<div class="page-header">
<h2>City Graph</h2>
<h2>Copenhagen</h2>
<p class="lead">Geospatial and other open data about the city of Copenhagen</p>
</div>
<p>Features include CSV data <a href="imports/" target="_blank">imports</a>, SPARQL-based <a href="charts/" target="_blank">charts</a>, faceted search and related results (parallax navigation) as well as
Expand All @@ -31,7 +31,7 @@
</div>"""^^rdf:XMLLiteral .

<#main-library> a ldh:Object ;
rdf:value <copenhagen/places/stednavn_punkt.fid-361ad8c1_150a94a2aab_-83b/#this> ;
rdf:value <places/stednavn_punkt.fid-361ad8c1_150a94a2aab_-83b/#this> ;
ac:mode ac:MapMode .

<#charts> a ldh:XHTML ;
Expand Down
File renamed without changes
Loading