summaryrefslogtreecommitdiffstats
path: root/src/Serialiser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Serialiser.cpp')
-rw-r--r--src/Serialiser.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp
index 3b8ccfbe..d3d43e8c 100644
--- a/src/Serialiser.cpp
+++ b/src/Serialiser.cpp
@@ -89,6 +89,8 @@ struct Serialiser::Impl {
Sord::Node rdf_node(SPtr<const Node> node) const;
+ Raul::Symbol get_symbol(SPtr<const Node> node) const;
+
void write_manifest(const std::string& bundle_path,
SPtr<const Node> graph);
@@ -305,6 +307,12 @@ Serialiser::Impl::rdf_node(const SPtr<const Node> node) const
return path_rdf_node(node->path());
}
+Raul::Symbol
+Serialiser::Impl::get_symbol(const SPtr<const Node> node) const
+{
+ return node->symbol();
+}
+
void
Serialiser::serialise(SPtr<const Node> object) throw (std::logic_error)
{
@@ -424,7 +432,7 @@ Serialiser::Impl::serialise_graph(SPtr<const Node> graph,
if (p->properties().find(uris.lv2_name) == p->properties().end())
_model->add_statement(port_id,
Sord::URI(world, uris.lv2_name),
- Sord::Literal(world, p->symbol()));
+ Sord::Literal(world, get_symbol(p)));
_model->add_statement(graph_id,
Sord::URI(world, LV2_CORE__port),
@@ -466,7 +474,7 @@ Serialiser::Impl::serialise_block(SPtr<const Node> block,
if (_base_uri.substr(0, 5) == "file:") {
const std::string base = Glib::filename_from_uri(_base_uri);
const std::string graph_dir = Glib::path_get_dirname(base);
- const std::string state_dir = Glib::build_filename(graph_dir, block->symbol());
+ const std::string state_dir = Glib::build_filename(graph_dir, get_symbol(block));
const std::string state_file = Glib::build_filename(state_dir, "state.ttl");
if (block->save_state(state_dir)) {
_model->add_statement(block_id,
@@ -507,7 +515,7 @@ Serialiser::Impl::serialise_port(SPtr<const Node> port,
// Always write lv2:symbol for Graph ports (required for lv2:Plugin)
_model->add_statement(port_id,
Sord::URI(world, uris.lv2_symbol),
- Sord::Literal(world, port->path().symbol()));
+ Sord::Literal(world, get_symbol(port)));
} else if (context == Resource::Graph::EXTERNAL) {
// Never write lv2:index for plugin instances (not persistent/stable)
props.erase(uris.lv2_index);