summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/client/Loader.cpp1
-rw-r--r--src/libs/client/ObjectModel.h6
-rw-r--r--src/libs/client/Serializer.cpp19
3 files changed, 13 insertions, 13 deletions
diff --git a/src/libs/client/Loader.cpp b/src/libs/client/Loader.cpp
index ed8d4497..789b0b57 100644
--- a/src/libs/client/Loader.cpp
+++ b/src/libs/client/Loader.cpp
@@ -39,6 +39,7 @@ Loader::Loader(SharedPtr<ModelEngineInterface> engine, SharedPtr<Namespaces> nam
(*_namespaces)["ingen"] = "http://drobilla.net/ns/ingen#";
(*_namespaces)["ingenuity"] = "http://drobilla.net/ns/ingenuity#";
(*_namespaces)["lv2"] = "http://lv2plug.in/ontology#";
+ (*_namespaces)["doap"] = "http://usefulinc.com/ns/doap#";
}
diff --git a/src/libs/client/ObjectModel.h b/src/libs/client/ObjectModel.h
index 1b2897d0..882ff911 100644
--- a/src/libs/client/ObjectModel.h
+++ b/src/libs/client/ObjectModel.h
@@ -58,6 +58,8 @@ public:
virtual ~ObjectModel();
const Atom& get_metadata(const string& key) const;
+ void set_metadata(const string& key, const Atom& value)
+ { _metadata[key] = value; metadata_update_sig.emit(key, value); }
const MetadataMap& metadata() const { return _metadata; }
inline const Path& path() const { return _path; }
@@ -80,10 +82,6 @@ protected:
void add_metadata(const MetadataMap& data);
void set(SharedPtr<ObjectModel> model);
-
- void set_metadata(const string& key, const Atom& value)
- { _metadata[key] = value; metadata_update_sig.emit(key, value); }
-
Path _path;
SharedPtr<ObjectModel> _parent;
diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp
index 1b274635..762cd061 100644
--- a/src/libs/client/Serializer.cpp
+++ b/src/libs/client/Serializer.cpp
@@ -54,6 +54,7 @@ Serializer::Serializer()
_writer.add_prefix("ingen", "http://drobilla.net/ns/ingen#");
_writer.add_prefix("ingenuity", "http://drobilla.net/ns/ingenuity#");
_writer.add_prefix("lv2", "http://lv2plug.in/ontology#");
+ _writer.add_prefix("doap", "http://usefulinc.com/ns/doap#");
}
@@ -221,6 +222,15 @@ Serializer::serialize_patch(SharedPtr<PatchModel> patch, const RdfId& patch_id)
patch_id,
NS_INGEN("polyphony"),
Atom((int)patch->poly()));
+
+ for (MetadataMap::const_iterator m = patch->metadata().begin(); m != patch->metadata().end(); ++m) {
+ if (_writer.expand_uri(m->first) != "") {
+ _writer.write(
+ patch_id,
+ RdfId(RdfId::RESOURCE, _writer.expand_uri(m->first.c_str()).c_str()),
+ m->second);
+ }
+ }
for (NodeModelMap::const_iterator n = patch->nodes().begin(); n != patch->nodes().end(); ++n) {
SharedPtr<PatchModel> patch = PtrCast<PatchModel>(n->second);
@@ -245,15 +255,6 @@ Serializer::serialize_patch(SharedPtr<PatchModel> patch, const RdfId& patch_id)
for (ConnectionList::const_iterator c = patch->connections().begin(); c != patch->connections().end(); ++c) {
serialize_connection(*c);
}
-
- for (MetadataMap::const_iterator m = patch->metadata().begin(); m != patch->metadata().end(); ++m) {
- if (_writer.expand_uri(m->first) != "") {
- _writer.write(
- patch_id,
- RdfId(RdfId::RESOURCE, _writer.expand_uri(m->first.c_str()).c_str()),
- m->second);
- }
- }
}