aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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");
}