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'
}
SPARQL results
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
}
SPARQL results
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…