From f63c29df622dd4f4fde6de3906ec53765117fb79 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 12 Dec 2006 23:30:38 +0000 Subject: Loading subpatches (ie not just into root). Initial patch metadata. Subpatch browsing (via double clicking modules). git-svn-id: http://svn.drobilla.net/lad/ingen@218 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/RDFQuery.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/libs/client/RDFQuery.cpp') diff --git a/src/libs/client/RDFQuery.cpp b/src/libs/client/RDFQuery.cpp index 3993de20..196868b8 100644 --- a/src/libs/client/RDFQuery.cpp +++ b/src/libs/client/RDFQuery.cpp @@ -27,7 +27,7 @@ namespace Client { RDFQuery::Results -RDFQuery::run(const Glib::ustring filename) const +RDFQuery::run(const Glib::ustring base_uri_str) const { Results result; @@ -35,7 +35,11 @@ RDFQuery::run(const Glib::ustring filename) const rasqal_query *rq = rasqal_new_query("sparql", NULL); - rasqal_query_prepare(rq, (unsigned char*)_query.c_str(), NULL); + raptor_uri* base_uri = NULL; + if (base_uri_str != "") + base_uri = raptor_new_uri((const unsigned char*)base_uri_str.c_str()); + rasqal_query_prepare(rq, (unsigned char*)_query.c_str(), base_uri); + rasqal_query_results* results = rasqal_query_execute(rq); assert(results); @@ -62,6 +66,10 @@ RDFQuery::run(const Glib::ustring filename) const rasqal_free_query_results(results); rasqal_free_query(rq); + + if (base_uri) + raptor_free_uri(base_uri); + rasqal_finish(); return result; -- cgit v1.2.1