Skip to content

Commit e321738

Browse files
committed
Add prcoess for 1058 bike racks
1 parent 0661eed commit e321738

File tree

6 files changed

+592
-562
lines changed

6 files changed

+592
-562
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
PREFIX todo: <http://todo/>
2+
PREFIX fn: <http://jsa.aksw.org/fn/gml/>
3+
4+
CONSTRUCT {
5+
?bikerack
6+
a todo:BikeRack ;
7+
todo:Street ?street ;
8+
todo:Area ?area ;
9+
todo:Type ?type ;
10+
todo:Capacity ?capacity ;
11+
todo:Label ?hint ;
12+
todo:Description ?description ;
13+
.
14+
}
15+
WHERE {
16+
# Load the content of the relative URL (interpreted as a reference to a file) as a string into ?src
17+
<rastrelliere.gml> url:text ?src .
18+
19+
# Parse the string as XML
20+
BIND(STRDT(?src, xsd:xml) AS ?xml) .
21+
22+
# Run an XPath expression which yields a list of nodes. Every node becomes a binding to ?o.
23+
# test local name
24+
?xml xml:unnest ("//*[local-name()='rastrelliere']" ?node)
25+
26+
# Read out attributes from each (xml) node
27+
BIND(xml:path(?node, "@fid") AS ?id)
28+
BIND("http://qrowd-project.eu/resource/" AS ?ns)
29+
BIND(URI(CONCAT(?ns, ?id)) AS ?bikerack)
30+
BIND(xml:path(?node, "via") AS ?street)
31+
BIND(xml:path(?node, "zona") AS ?area)
32+
BIND(xml:path(?node, "tipologia") AS ?type)
33+
BIND(xml:path(?node, "n_posti") AS ?capacity)
34+
BIND(xml:path(?node, "fumetto") AS ?label)
35+
BIND(xml:path(?node, "descrizione") AS ?description)
36+
}

0 commit comments

Comments
 (0)