Sidra,

Without as complete, minimal example [1], no one can say. All "no results" means is that the query does not match on the data. Check the data; run the query outside your application, e.g. using the command line tools.

    Andy

[1] https://stackoverflow.com/help/mcve

On 03/07/17 06:12, Sidra shah wrote:
Hello

I have a Book class having Java and Semantic Web sub classes.
Java class have some instances: JSP, Java by Dietel, JDBC
Semantic Web has also some instances: SPARQL, Semantic Programming, etc.

I have a data property BookCategory for each instance which will be either
Java or Semantic Web

I have a combo box where users if select Java, all java books will be
displayed and similarly for semantic web.

The following query does not work. (Display nothing)

  String str=jComboBox1.getSelectedItem().toString();

SELECT  *  WHERE { ?s rdf:type mo:Book.?s mo:BookCategory ?book FILTER (
?book ='str' ). }

Reply via email to