summaryrefslogtreecommitdiffstats
path: root/src/RDFModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-05-01 05:11:21 +0000
committerDavid Robillard <d@drobilla.net>2007-05-01 05:11:21 +0000
commitbbf6621f4f9adedcd1af81fe1371460fa54d5e36 (patch)
treee40656e752d4e81661234f557dea2c81eac71d58 /src/RDFModel.cpp
parentc5eb1148b99cf88555c0a516e1218bdb74ab0080 (diff)
downloadraul-bbf6621f4f9adedcd1af81fe1371460fa54d5e36.tar.gz
raul-bbf6621f4f9adedcd1af81fe1371460fa54d5e36.tar.bz2
raul-bbf6621f4f9adedcd1af81fe1371460fa54d5e36.zip
Fixed remote patch loading.
git-svn-id: http://svn.drobilla.net/lad/raul@487 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/RDFModel.cpp')
-rw-r--r--src/RDFModel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/RDFModel.cpp b/src/RDFModel.cpp
index d05864f..080eb24 100644
--- a/src/RDFModel.cpp
+++ b/src/RDFModel.cpp
@@ -46,7 +46,7 @@ Model::Model(RDF::World& world)
/** Load a model from a URI (local file or remote).
*/
-Model::Model(World& world, const Glib::ustring& data_uri)
+Model::Model(World& world, const Glib::ustring& data_uri, Glib::ustring base_uri_str)
: _world(world)
, _serializer(NULL)
{
@@ -54,8 +54,12 @@ Model::Model(World& world, const Glib::ustring& data_uri)
_model = librdf_new_model(_world.world(), _storage, NULL);
librdf_uri* uri = librdf_new_uri(world.world(), (const unsigned char*)data_uri.c_str());
+ librdf_uri* base_uri = NULL;
+ if (base_uri_str != "")
+ base_uri = librdf_new_uri(world.world(), (const unsigned char*)base_uri_str.c_str());
librdf_parser* parser = librdf_new_parser(world.world(), "guess", NULL, NULL);
- librdf_parser_parse_into_model(parser, uri, NULL, _model);
+ librdf_parser_parse_into_model(parser, uri, base_uri, _model);
+ librdf_free_uri(base_uri);
librdf_free_uri(uri);
librdf_free_parser(parser);