diff options
author | David Robillard <d@drobilla.net> | 2006-12-12 23:30:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-12-12 23:30:38 +0000 |
commit | f63c29df622dd4f4fde6de3906ec53765117fb79 (patch) | |
tree | 7e0731aa77fb3629ec9b517757135919c7e99b9f /src/libs/client/RDFQuery.cpp | |
parent | 71f632d459471c2e75ed04b808df9671539a182c (diff) | |
download | ingen-f63c29df622dd4f4fde6de3906ec53765117fb79.tar.gz ingen-f63c29df622dd4f4fde6de3906ec53765117fb79.tar.bz2 ingen-f63c29df622dd4f4fde6de3906ec53765117fb79.zip |
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
Diffstat (limited to 'src/libs/client/RDFQuery.cpp')
-rw-r--r-- | src/libs/client/RDFQuery.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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; |