Is it Java code?

Print the query string that is created.

Check the prefixes.

Make sure that you properly distinguish between literals and URIs -> is
a book category a literal or a resource? Is the value of str a URI or a
literal?


On 03.07.2017 07: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