summaryrefslogtreecommitdiffstats
path: root/src/serialisation
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-18 03:25:00 +0000
committerDavid Robillard <d@drobilla.net>2011-05-18 03:25:00 +0000
commita9a8c78b96da29e72dea004af679a726655a1b36 (patch)
tree07f427c44b44a480e65c4df94a8ad8f8fa321f51 /src/serialisation
parentf195e03df4775ca3e560edddba18c91377917651 (diff)
downloadingen-a9a8c78b96da29e72dea004af679a726655a1b36.tar.gz
ingen-a9a8c78b96da29e72dea004af679a726655a1b36.tar.bz2
ingen-a9a8c78b96da29e72dea004af679a726655a1b36.zip
Update for new Serd and Sord APIs.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3277 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r--src/serialisation/Parser.cpp16
-rw-r--r--src/serialisation/Serialiser.cpp4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp
index d2a37947..88b12d6c 100644
--- a/src/serialisation/Parser.cpp
+++ b/src/serialisation/Parser.cpp
@@ -115,8 +115,8 @@ Parser::find_patches(Ingen::Shared::World* world,
const Sord::URI rdfs_seeAlso(*world->rdf_world(), NS_RDFS "seeAlso");
Sord::Model model(*world->rdf_world(), manifest_uri);
- SerdEnv* env = serd_env_new();
- model.load_file(env, manifest_uri);
+ SerdEnv* env = serd_env_new(NULL);
+ model.load_file(env, SERD_TURTLE, manifest_uri);
serd_env_free(env);
std::list<PatchRecord> records;
@@ -169,8 +169,8 @@ Parser::parse_file(Ingen::Shared::World* world,
// Load patch file into model
Sord::Model model(*world->rdf_world(), file_uri);
- SerdEnv* env = serd_env_new();
- model.load_file(env, file_uri);
+ SerdEnv* env = serd_env_new(NULL);
+ model.load_file(env, SERD_TURTLE, file_uri);
serd_env_free(env);
LOG(info) << "Parsing " << file_uri << endl;
@@ -203,8 +203,8 @@ Parser::parse_string(Ingen::Shared::World* world,
{
// Load string into model
Sord::Model model(*world->rdf_world(), base_uri);
- SerdEnv* env = serd_env_new();
- model.load_string(env, str.c_str(), str.length(), base_uri);
+ SerdEnv* env = serd_env_new(NULL);
+ model.load_string(env, SERD_TURTLE, str.c_str(), str.length(), base_uri);
serd_env_free(env);
LOG(info) << "Parsing string";
@@ -512,8 +512,8 @@ Parser::parse_node(Ingen::Shared::World* world,
string((const char*)sub_uri.buf) + "/" + basename + ".ttl";
Sord::Model sub_model(*world->rdf_world(), sub_file);
- SerdEnv* env = serd_env_new();
- sub_model.load_file(env, sub_file);
+ SerdEnv* env = serd_env_new(NULL);
+ sub_model.load_file(env, SERD_TURTLE, sub_file);
serd_env_free(env);
Sord::URI sub_node(*world->rdf_world(), sub_file);
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp
index 8a1e90b5..7707129c 100644
--- a/src/serialisation/Serialiser.cpp
+++ b/src/serialisation/Serialiser.cpp
@@ -251,9 +251,9 @@ Serialiser::finish()
{
string ret = "";
if (_mode == TO_FILE) {
- _model->write_to_file(_base_uri, "turtle");
+ _model->write_to_file(_base_uri, SERD_TURTLE);
} else {
- ret = _model->write_to_string("turtle");
+ ret = _model->write_to_string(SERD_TURTLE);
}
delete _model;