summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-16 21:48:28 +0000
committerDavid Robillard <d@drobilla.net>2007-04-16 21:48:28 +0000
commitdecff9a96b928b19c4b5a55b532cfbfaa4486e42 (patch)
tree52c807388fb5a77cd4b1141b68a99e896e369872 /src/libs/client
parentaa309115304f1cae1938787bd487822687d499a4 (diff)
downloadingen-decff9a96b928b19c4b5a55b532cfbfaa4486e42.tar.gz
ingen-decff9a96b928b19c4b5a55b532cfbfaa4486e42.tar.bz2
ingen-decff9a96b928b19c4b5a55b532cfbfaa4486e42.zip
Updated Jack version checked by configure.
Patch uploading. git-svn-id: http://svn.drobilla.net/lad/ingen@447 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-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);
- }
- }
}