summaryrefslogtreecommitdiffstats
path: root/src/libs/client/Serializer.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-12-08 22:32:34 +0000
committerDavid Robillard <d@drobilla.net>2006-12-08 22:32:34 +0000
commitd2d755b0db3b4779d581c7a70841609257250c12 (patch)
tree826098242c947ac3f5994b1a591a7853275972fc /src/libs/client/Serializer.cpp
parent26d0171f9bbc4af8036c704d3a4cb69a5d9fe942 (diff)
downloadingen-d2d755b0db3b4779d581c7a70841609257250c12.tar.gz
ingen-d2d755b0db3b4779d581c7a70841609257250c12.tar.bz2
ingen-d2d755b0db3b4779d581c7a70841609257250c12.zip
Fixed plugin type issues
git-svn-id: http://svn.drobilla.net/lad/ingen@211 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/Serializer.cpp')
-rw-r--r--src/libs/client/Serializer.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp
index f40d8d67..3984a49a 100644
--- a/src/libs/client/Serializer.cpp
+++ b/src/libs/client/Serializer.cpp
@@ -198,9 +198,12 @@ Serializer::serialize_patch(SharedPtr<PatchModel> patch, unsigned depth)
{
assert(_serializer);
- const RdfId patch_id = (depth == 0)
- ? RdfId(RdfId::RESOURCE, string("#") + patch->path().substr(1))
- : path_to_node_id(patch->path()); // anonymous
+ RdfId patch_id = path_to_node_id(patch->path()); // anonymous
+
+ if (patch->path().length() < 2)
+ patch_id = RdfId(RdfId::RESOURCE, string(""));
+ else if (depth == 0)
+ patch_id = RdfId(RdfId::RESOURCE, string("#") + patch->path().substr(1));
_writer.write(
patch_id,
@@ -313,11 +316,11 @@ Serializer::serialize_connection(SharedPtr<ConnectionModel> connection) throw (s
path_to_node_id(connection->src_port_path()).to_string()
+ "-" + path_to_node_id(connection->dst_port_path()).to_string());
- /*
- const string src_port_rel_path = connection->src_port_path().substr(connection->patch_path().length());
- const string dst_port_rel_path = connection->dst_port_path().substr(connection->patch_path().length());
-*/
- _writer.write(connection_id, NS_RDF("type"), NS_INGEN("Connection"));
+ _writer.write(path_to_node_id(connection->dst_port_path()),
+ NS_INGEN("connectedTo"),
+ path_to_node_id(connection->src_port_path()));
+
+ /*_writer.write(connection_id, NS_RDF("type"), NS_INGEN("Connection"));
_writer.write(connection_id,
NS_INGEN("source"),
@@ -326,6 +329,7 @@ Serializer::serialize_connection(SharedPtr<ConnectionModel> connection) throw (s
_writer.write(connection_id,
NS_INGEN("destination"),
path_to_node_id(connection->dst_port_path()));
+ */
}