aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-15 23:00:35 +0000
committerDavid Robillard <d@drobilla.net>2011-02-15 23:00:35 +0000
commitf4c1022dd9738b28fdef77eda131f73618bb3bc1 (patch)
tree654b6bde8404dc4398a2d0b969f671a0d623e5c3
parentbb7e9e97c5b89bcd646ac7bae6c7bf69ace9fc8a (diff)
downloadmachina-f4c1022dd9738b28fdef77eda131f73618bb3bc1.tar.gz
machina-f4c1022dd9738b28fdef77eda131f73618bb3bc1.tar.bz2
machina-f4c1022dd9738b28fdef77eda131f73618bb3bc1.zip
Trim more redlandmm API.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@2952 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/engine/Edge.cpp3
-rw-r--r--src/engine/Loader.cpp3
-rw-r--r--src/gui/MachinaGUI.cpp6
3 files changed, 5 insertions, 7 deletions
diff --git a/src/engine/Edge.cpp b/src/engine/Edge.cpp
index 8acdca3..5389e69 100644
--- a/src/engine/Edge.cpp
+++ b/src/engine/Edge.cpp
@@ -50,7 +50,8 @@ Edge::write_state(Redland::Model& model)
if (!tail || !head)
return;
- assert(tail->rdf_id(model.world()) && head->rdf_id(model.world()));
+ assert(tail->rdf_id(model.world()).is_valid()
+ && head->rdf_id(model.world()).is_valid());
model.add_statement(rdf_id,
"machina:tail",
diff --git a/src/engine/Loader.cpp b/src/engine/Loader.cpp
index 070615a..3b889f5 100644
--- a/src/engine/Loader.cpp
+++ b/src/engine/Loader.cpp
@@ -21,8 +21,6 @@
#include <glibmm/ustring.h>
-#include "redlandmm/Query.hpp"
-
#include "machina/Loader.hpp"
#include "machina/Machine.hpp"
@@ -87,6 +85,7 @@ Loader::load(const Glib::ustring& uri)
Created created;
Redland::Model model(_rdf_world, document_uri);
+ model.load_file(document_uri);
Redland::Node nil;
diff --git a/src/gui/MachinaGUI.cpp b/src/gui/MachinaGUI.cpp
index 83ae23b..437d5e1 100644
--- a/src/gui/MachinaGUI.cpp
+++ b/src/gui/MachinaGUI.cpp
@@ -451,8 +451,7 @@ MachinaGUI::menu_file_save()
if (!raptor_uri_uri_string_is_file_uri((const unsigned char*)_save_uri.c_str()))
menu_file_save_as();
- Redland::Model model(_engine->rdf_world());
- model.set_base_uri(_save_uri);
+ Redland::Model model(_engine->rdf_world(), _save_uri);
_engine->machine()->write_state(model);
model.serialise_to_file(_save_uri, "turtle");
}
@@ -503,9 +502,8 @@ MachinaGUI::menu_file_save_as()
fin.close();
if (confirm) {
- Redland::Model model(_engine->rdf_world());
_save_uri = uri;
- model.set_base_uri(_save_uri);
+ Redland::Model model(_engine->rdf_world(), _save_uri);
_engine->machine()->write_state(model);
model.serialise_to_file(_save_uri, "turtle");
}