summaryrefslogtreecommitdiffstats
path: root/src/serialisation
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-28 22:50:35 +0000
committerDavid Robillard <d@drobilla.net>2008-11-28 22:50:35 +0000
commitb8490799a71c0c914a87a4a86f7160fbcd0bacbe (patch)
treec87777b8c9a306027fa7136d29afa662b6d2548f /src/serialisation
parent0ecd2b8f0ebc5a384759435c81bb3314f6d12e79 (diff)
downloadingen-b8490799a71c0c914a87a4a86f7160fbcd0bacbe.tar.gz
ingen-b8490799a71c0c914a87a4a86f7160fbcd0bacbe.tar.bz2
ingen-b8490799a71c0c914a87a4a86f7160fbcd0bacbe.zip
Store module locations on drop (fix ticket #281).
Use existing rdf:instanceOf instead of ingen:plugin. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1816 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r--src/serialisation/Parser.cpp14
-rw-r--r--src/serialisation/Serialiser.cpp2
2 files changed, 7 insertions, 9 deletions
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp
index 4e886e43..9b165e03 100644
--- a/src/serialisation/Parser.cpp
+++ b/src/serialisation/Parser.cpp
@@ -293,10 +293,8 @@ Parser::parse(
root_path = ret;
} else if (is_plugin) {
- if (path_str.length() > 0) {
- const string uri = path_str.substr(1);
- target->set_property(uri, "rdf:type", Atom(Atom::URI, rdf_class.to_c_string()));
- }
+ if (path_str.length() > 0)
+ target->set_property(path_str, "rdf:type", Atom(Atom::URI, rdf_class.to_c_string()));
}
}
@@ -381,7 +379,7 @@ Parser::parse_patch(
"SELECT DISTINCT ?name ?plugin ?varkey ?varval ?poly WHERE {\n") +
subject + " ingen:node ?node .\n"
"?node lv2:symbol ?name ;\n"
- " ingen:plugin ?plugin ;\n"
+ " rdf:instanceOf ?plugin ;\n"
" ingen:polyphonic ?poly .\n"
"OPTIONAL { ?node lv2var:variable ?variable .\n"
" ?variable rdf:predicate ?varkey ;\n"
@@ -568,18 +566,18 @@ Parser::parse_node(
{
/* Get plugin */
Redland::Query query(*world->rdf_world, Glib::ustring(
- "SELECT DISTINCT ?plug WHERE { ") + subject + " ingen:plugin ?plug }");
+ "SELECT DISTINCT ?plug WHERE { ") + subject + " rdf:instanceOf ?plug }");
Redland::Query::Results results = query.run(*world->rdf_world, model, base_uri);
if (results.size() == 0) {
- cerr << "[Parser] ERROR: Node missing mandatory ingen:plugin property" << endl;
+ cerr << "[Parser] ERROR: Node missing mandatory rdf:instanceOf property" << endl;
return boost::optional<Path>();
}
const Redland::Node& plugin_node = (*results.begin())["plug"];
if (plugin_node.type() != Redland::Node::RESOURCE) {
- cerr << "[Parser] ERROR: node's ingen:plugin property is not a resource" << endl;
+ cerr << "[Parser] ERROR: node's rdf:instanceOf property is not a resource" << endl;
return boost::optional<Path>();
}
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp
index 0704247e..b9eff1f2 100644
--- a/src/serialisation/Serialiser.cpp
+++ b/src/serialisation/Serialiser.cpp
@@ -403,7 +403,7 @@ Serialiser::serialise_node(SharedPtr<Shared::Node> node, const Redland::Node& no
_model->add_statement(
node_id,
- "ingen:plugin",
+ "rdf:instanceOf",
plugin_id);
_model->add_statement(