summaryrefslogtreecommitdiffstats
path: root/src/libs/serialisation
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-08 00:50:13 +0000
committerDavid Robillard <d@drobilla.net>2007-10-08 00:50:13 +0000
commita421a44310ee472fbee15f150d32b826a8371dbf (patch)
treed160bb1704a26524dee8746e3f7dd69494460cd6 /src/libs/serialisation
parent19a9eb15d1c918b10fe169db1b8f4fd0c6ffe8fa (diff)
downloadingen-a421a44310ee472fbee15f150d32b826a8371dbf.tar.gz
ingen-a421a44310ee472fbee15f150d32b826a8371dbf.tar.bz2
ingen-a421a44310ee472fbee15f150d32b826a8371dbf.zip
Fix serialization/connection bugs resulting from refactoring.
git-svn-id: http://svn.drobilla.net/lad/ingen@842 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/serialisation')
-rw-r--r--src/libs/serialisation/Loader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libs/serialisation/Loader.cpp b/src/libs/serialisation/Loader.cpp
index 45d66740..30958198 100644
--- a/src/libs/serialisation/Loader.cpp
+++ b/src/libs/serialisation/Loader.cpp
@@ -215,8 +215,9 @@ Loader::load(SharedPtr<EngineInterface> engine,
"SELECT DISTINCT ?port ?type ?name ?datatype ?floatkey ?floatval ?portval WHERE {\n") +
patch_uri + " ingen:port ?port .\n"
"?port a ?type ;\n"
- " ingen:name ?name ;\n"
- " ingen:dataType ?datatype .\n"
+ " a ?datatype ;\n"
+ " ingen:name ?name .\n"
+ " FILTER (?type != ?datatype && ((?type = ingen:InputPort) || (?type = ingen:OutputPort)))\n"
"OPTIONAL { ?port ?floatkey ?floatval . \n"
" FILTER ( datatype(?floatval) = xsd:decimal ) }\n"
"OPTIONAL { ?port ingen:value ?portval . \n"
@@ -228,12 +229,11 @@ Loader::load(SharedPtr<EngineInterface> engine,
for (RDF::Query::Results::iterator i = results.begin(); i != results.end(); ++i) {
const string name = (*i)["name"].to_string();
const string type = rdf_world->qualify((*i)["type"].to_string());
- const string datatype = (*i)["datatype"].to_string();
+ const string datatype = rdf_world->qualify((*i)["datatype"].to_string());
const Path port_path = patch_path.base() + (string)name;
-
+
if (created.find(port_path) == created.end()) {
- //cerr << "TYPE: " << type << endl;
bool is_output = (type == "ingen:OutputPort"); // FIXME: check validity
engine->create_port(port_path, datatype, is_output);
created.insert(port_path);