I am trying to get the resource describing country Romania by the country name with this query:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX : <http://dbpedia.org/resource/>
SELECT DISTINCT ?x WHERE {
?x foaf:name 'Romania'
}
However, it does not retrieve anything. How can I get the resource http://dbpedia.org/resource/Romania
(:Romania
) by the string 'Romania'
.
If I want to retrieve the name of the country by the country resource I use the following query which works fine:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX : <http://dbpedia.org/resource/>
SELECT DISTINCT ?x WHERE {
:Romania foaf:name ?x
}