RinoDrummer icon

Creazione dei dummy data

RinoDrummer | PRO | 06/26/18 04:23:07 PM UTC | 0 ⭐ | 262 👁️ | Never ⏰ | []
SPARQL |

1.15 KB

|

None

|

0 👍

/

0 👎

# Tutte le stazioni italiane
SELECT ?staz ?stazLabel ?luogo ?Paese ?PaeseLabel ?stazione_adiacente ?stazione_adiacenteLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?staz wdt:P31 wd:Q55488.
  OPTIONAL { ?staz wdt:P625 ?luogo. }
  OPTIONAL { ?staz wdt:P17 ?Paese. }
  OPTIONAL { ?staz wdt:P197 ?stazione_adiacente. }
  FILTER ( ?Paese = wd:Q38 )
}
 
# Tutte le stazioni partendo da Napoli (limite 60)
# https://angryloki.github.io/wikidata-graph-builder/?property=P197&item=Q801237&lang=it&limit=60
PREFIX gas: <http://www.bigdata.com/rdf/gas#>
SELECT ?staz ?stazLabel ?coordinate ?stazAdiacente ?stazAdiacenteLabel {
  SERVICE wikibase:label {bd:serviceParam wikibase:language "it" }
  SERVICE gas:SERVICE {
    gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" ;
                gas:IN wd:Q801237 ;
                gas:traversalDirection "Forward" ;
                gas:out ?staz ;
                gas:out1 ?depth ;
                gas:maxVisited 60 ;
                gas:linkType wdt:P197 .
  }
  OPTIONAL { ?staz wdt:P197 ?stazAdiacente }
  OPTIONAL { ?staz wdt:P625 ?coordinate }
}

Comments