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
12 changes: 10 additions & 2 deletions demo/city-graph/admin/clear-ontologies.sh
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#"
62 changes: 35 additions & 27 deletions demo/city-graph/admin/model/add-classes.sh
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/"
4 changes: 2 additions & 2 deletions demo/city-graph/create-charts.sh
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
12 changes: 10 additions & 2 deletions demo/northwind-traders/admin/clear-ontologies.sh
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#"
12 changes: 10 additions & 2 deletions demo/northwind-traders/admin/model/add-imports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ if [ "$#" -ne 3 ] && [ "$#" -ne 4 ]; then
exit 1
fi

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

base="$1"
cert_pem_file=$(realpath "$2")
cert_password="$3"
Expand All @@ -17,9 +22,12 @@ else
proxy="$base"
fi

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

add-ontology-import.sh \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--import "https://schema.org/" \
"${base}admin/ontologies/namespace/"
"${admin_base}ontologies/namespace/"
26 changes: 12 additions & 14 deletions demo/northwind-traders/admin/model/import-ontologies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ if [ "$#" -ne 3 ] && [ "$#" -ne 4 ]; then
exit 1
fi

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

base="$1"
cert_pem_file=$(realpath "$2")
cert_password="$3"
Expand All @@ -17,25 +22,18 @@ else
proxy="$base"
fi

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

pwd=$(realpath "$PWD")

printf "\n### Creating ontology item\n\n"

ont_doc=$(create-item.sh \
-b "${base}admin/" \
create-item.sh \
-b "$admin_base" \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
--proxy "$admin_proxy" \
--title "Northwind Traders" \
--slug "northwind-traders" \
--container "${base}admin/ontologies/"
)

printf "\n### Appending ontology document\n\n"

cat "$pwd"/northwind-traders.ttl | turtle --base="$ont_doc" | post.sh \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
-t "application/n-triples" \
"$ont_doc"
--container "${admin_base}ontologies/"
78 changes: 0 additions & 78 deletions demo/northwind-traders/admin/model/northwind-traders.ttl

This file was deleted.

Loading