Hi Ted
Thanks for your reply. I have tried it on and it still doesnt work giving
me the following error:
Exception in thread "main" com.hp.hpl.jena.query.QueryParseException:
Lexical error at line 1, column 7. Encountered: " " (32), after : "SPARQL"
cheers
Dhaval
On 8 Sep 2009 14:42, Ted Thibodeau Jr <tthibod...@openlinksw.com> wrote:
Hi, Dhaval --
On Sep 7, 2009, at 01:11 PM, Dhaval Thakker wrote:
Query sparql = QueryFactory.create("define
input:inference 'http://inference.org' select ?s where {?s
http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
http://Entity.owl#Person>}");
On a quick glance, I think you just need to add the SPARQL keyword to
your query, when running it through the JDBC API -- which is a SQL
interface to the Virtuoso engine.
To run any SPARQL query through any SQL interface, you must preface
it with the SPARQL keyword, to tell the Virtuoso engine it is SPASQL,
ie, SPARQL-in-SQL.
So --
Query sparql = QueryFactory.create("SPARQL
DEFINE input:inference 'http://inference.org'
SELECT ?s
WHERE { ?s
http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
http://Entity.owl#Person>
}");
Please let us know if that gets you further.
Regards,
Ted
--
A: Yes. http://www.guckes.net/faq/attribution.html
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?
Ted Thibodeau, Jr. // voice +1-781-273-0900 x32
Evangelism & Support // mailto:tthibod...@openlinksw.com
OpenLink Software, Inc. // http://www.openlinksw.com/
http://www.openlinksw.com/weblogs/uda/
OpenLink Blogs http://www.openlinksw.com/weblogs/virtuoso/
http://www.openlinksw.com/blog/~kidehen/
Universal Data Access and Virtual Database Technology Providers