tags:

views:

101

answers:

1

Hi Everyone

Just a small thing tonight; I was wondering how I could modify this query to show only bands with the name "kinks", I tried tagging = #kinks after dc:Band but got no results.

 Query SPARQL_QUERY = QueryFactory.create("" +
           "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;" +           
           "PREFIX dc: <http://ontologyloc.com/Bands.owl#&gt;" +
           "SELECT DISTINCT ?BandName WHERE { ?BandName rdf:type dc:Band }" 
           );

Thanks!

+1  A: 

I don't know your ontology but it could be something like

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;        
PREFIX dc: <http://ontologyloc.com/Bands.owl#&gt;

SELECT DISTINCT ?BandName WHERE {
?BandName rdf:type dc:Band .
?BandName dc:title "kinks" .
}
Pierre
I'm getting malformed query errors when I attempt to use a . in the middle. Could this be due to using rdf:type in the WHERE section of my query?
Laurence Dawson
edited. Does it work now ?
Pierre