diff rdf/RDFImporter.cpp @ 492:23945cdd7161

* Update RDF query stuff again so as to set up a temporary datastore each time we want to query over an rdf file, instead of using rasqal against the file. Seems the only way to avoid threading and storage management issues when trying to load from a single-source file and perform queries against our main datastore at the same time. Maybe.
author Chris Cannam
date Mon, 24 Nov 2008 16:26:11 +0000
parents c3fb8258e34d
children 3931711b5671
line wrap: on
line diff
--- a/rdf/RDFImporter.cpp	Mon Nov 24 12:26:21 2008 +0000
+++ b/rdf/RDFImporter.cpp	Mon Nov 24 16:26:11 2008 +0000
@@ -125,7 +125,7 @@
          (" PREFIX mo: <http://purl.org/ontology/mo/> "
           " SELECT ?url FROM <%1> "
           " WHERE { ?signal a mo:Signal ; mo:available_as ?url } "
-             ).arg(uri),
+             ).arg(m_uristring),
          "url");
 
     if (value.type == SimpleSPARQLQuery::URIValue) {
@@ -135,6 +135,7 @@
 
 RDFImporterImpl::~RDFImporterImpl()
 {
+    SimpleSPARQLQuery::closeSingleSource(m_uristring);
 }
 
 bool
@@ -664,6 +665,8 @@
                            std::vector<float> &values,
                            QString label)
 {
+    std::cerr << "RDFImporterImpl::fillModel: adding point at frame " << ftime << std::endl;
+
     SparseOneDimensionalModel *sodm =
         dynamic_cast<SparseOneDimensionalModel *>(model);
     if (sodm) {
@@ -802,6 +805,8 @@
             return OtherDocument;
         }
     }
+
+    SimpleSPARQLQuery::closeSingleSource(url);
 }