Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Running SPARQL query using Java code and AllegroGraph store

James Howison james at howison.name
Wed Mar 18 09:23:27 PDT 2009


On 18 Mar 2009, at 5:48 AM, Luthra, Nidhi wrote:

> Hi all
> I wrote the following query in Java and tried executing it for the  
> RDF store I had in AllegroGraph Server.
>
> String query ="PREFIX owl1: <http://www.owl-ontologies.com/Ontology1236061076.owl# 
> >" +
> 		"SELECT  ?subject ?q "+
> 		"WHERE { ?subject owl1:belongsToDB ?p." +
> 		"?p owl1:DB_name \"ny\" }";
> 			
>
> But this shows no results. Whereas when I run the same query in  
> Protégé application using SPARQL query panel, it gives good results.
> I think I am mistaking at specifying the literal "ny" in the query.
>
> Could anyone please correct my mistake and oblige :)

Try \"ny\"^^xsd:string ?  Perhaps the string also has a language  
element?  (You'd need to define xsd)

If you can print out the Turtle version of the data, that will help.   
Perhaps pick a known relevant object and use DESCRIBE?

--J




More information about the protege-owl mailing list