diff options
author | David Robillard <d@drobilla.net> | 2011-05-11 23:31:28 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-11 23:31:28 +0000 |
commit | 2a6d7a49024125870b54039c39ac009266b824d9 (patch) | |
tree | 417a6d92a9bb057f8f03ec2309f250d0922e7d73 /src/serialisation | |
parent | 65c1d0b1517ecdfd67a04fee378a87c7fade4697 (diff) | |
download | ingen-2a6d7a49024125870b54039c39ac009266b824d9.tar.gz ingen-2a6d7a49024125870b54039c39ac009266b824d9.tar.bz2 ingen-2a6d7a49024125870b54039c39ac009266b824d9.zip |
Pass environment to sord write methods for CURIE abbreviation.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3255 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r-- | src/serialisation/Parser.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index d1ff41f9..d2a37947 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -112,10 +112,12 @@ Parser::find_patches(Ingen::Shared::World* world, { const Sord::URI ingen_Patch (*world->rdf_world(), NS_INGEN "Patch"); const Sord::URI rdf_type (*world->rdf_world(), NS_RDF "type"); - const Sord::URI rdfs_seeAlso(*world->rdf_world(), NS_RDFS "seeAlso"); + const Sord::URI rdfs_seeAlso(*world->rdf_world(), NS_RDFS "seeAlso"); Sord::Model model(*world->rdf_world(), manifest_uri); - model.load_file(manifest_uri); + SerdEnv* env = serd_env_new(); + model.load_file(env, manifest_uri); + serd_env_free(env); std::list<PatchRecord> records; for (Sord::Iter i = model.find(nil, rdf_type, ingen_Patch); !i.end(); ++i) { @@ -167,7 +169,9 @@ Parser::parse_file(Ingen::Shared::World* world, // Load patch file into model Sord::Model model(*world->rdf_world(), file_uri); - model.load_file(file_uri); + SerdEnv* env = serd_env_new(); + model.load_file(env, file_uri); + serd_env_free(env); LOG(info) << "Parsing " << file_uri << endl; if (parent) @@ -199,7 +203,9 @@ Parser::parse_string(Ingen::Shared::World* world, { // Load string into model Sord::Model model(*world->rdf_world(), base_uri); - model.load_string(str.c_str(), str.length(), base_uri); + SerdEnv* env = serd_env_new(); + model.load_string(env, str.c_str(), str.length(), base_uri); + serd_env_free(env); LOG(info) << "Parsing string"; if (!base_uri.empty()) @@ -506,7 +512,9 @@ Parser::parse_node(Ingen::Shared::World* world, string((const char*)sub_uri.buf) + "/" + basename + ".ttl"; Sord::Model sub_model(*world->rdf_world(), sub_file); - sub_model.load_file(sub_file); + SerdEnv* env = serd_env_new(); + sub_model.load_file(env, sub_file); + serd_env_free(env); Sord::URI sub_node(*world->rdf_world(), sub_file); parse_patch(world, target, sub_model, sub_node, |