On 28/04/16 12:55, mehmet mehmet wrote:
Yes I used Dbpedia endpoint and if I do not give call to toString(), it
gives me error.

The something else is wrong. In java, String.toString() is defined to be "return this;"

Please provide a minimal, complete example of your code.

minimal -> just enough to illustrate the question
complete -> something someone can run without change.

        Andy



<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Apr 28, 2016 at 11:42 AM, Lorenz B. <
buehm...@informatik.uni-leipzig.de> wrote:

Debugging a query is more efficient if you print the query to the command
line first, and put it in the Virtuoso web interface - I suppose that you
use the offical DBpedia endpoint.
By the way, it's not clear why you call toString() on "x" .

I think you need to provide more information, before anyone can answer
your questions.

What is the actual endpoint or dataset you are executing on? What is
the code executing the query?

On Wed, Apr 27, 2016 at 5:12 PM, mehmet mehmet <mehmettw...@gmail.com>
wrote:

String queryString ="PREFIX dbr: <http://dbpedia.org/resource/> " +
"PREFIX
dbprop:<http://dbpedia.org/property/>" +

"SELECT * " + "WHERE {" +  " dbr:Germany dbprop:capital ?x"+ "}" ;

at the end I display it

System.out.println(soln.getResource("x".toString()));


*But it displays nothing (no error message but no output)*

*What is the problem in the code.*


--
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center




Reply via email to