I am beginner in SPARQL, and I want to make query on DBpedia to use the result then in Java-Programm as a JSON file . I use this simple SPARQL query on http://dbpedia.org/snorql or https://dbpedia.org/sparql
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX : <http://dbpedia.org/resource/>
SELECT ?a
WHERE {
:Berlin owl:sameAs ?a .
}
And I get this result, but I want to extract these words, which are highlighted in yellow, and exclude everything else. Is it doable, or should I continue this part in Java?