1 year ago

#190969

test-img

L_T

SPARQL query with Apache Jena Fuseki on local database importing geonames

I want to retrieve the name of the city associated to a person in a triplestore which links a person to a geonames entry. I am using a local server (Apache Jena Fuseki) on this minimal triplestore (in turtle):

@prefix ex: <http://www.example.audio/ex> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix gn: <http://www.geonames.org/ontology#> .

ex:Cristina     rdf:type            foaf:Person ;
                foaf:firstName      "Cristina" ;
                foaf:based_near     <https://sws.geonames.org/3164527/> .

https://sws.geonames.org/3164527/ is the URI of the city of Verona

This is the query I am trying to perform:

SELECT ?person
WHERE {
?person foaf:based_near ?city .
?city gn:name "Verona" .
}

As you can see, what I wish to do is using the gn:name predicate. How can I achieve this? Obviously I am doing something wrong.

sparql

turtle-rdf

0 Answers

Your Answer

Accepted video resources