diff rdf/PluginRDFIndexer.cpp @ 718:f3fd2988fc9b

Fix incorrect query structure for output type URIs. This led to some output RDF features being written with type URIs intended for different outputs. Also revert some SVDEBUGs to cerrs -- they are intended as user-visible errors or warnings rather than debug
author Chris Cannam
date Mon, 09 Jan 2012 16:28:54 +0000
parents 1424aa29ae95
children c789deb83bd4
line wrap: on
line diff
--- a/rdf/PluginRDFIndexer.cpp	Mon Oct 17 11:57:25 2011 +0100
+++ b/rdf/PluginRDFIndexer.cpp	Mon Jan 09 16:28:54 2012 +0000
@@ -80,7 +80,7 @@
     // rdf extension.
 
     for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
-        
+
         QDir dir(i->c_str());
         if (!dir.exists()) continue;
 
@@ -89,6 +89,7 @@
 
         for (QStringList::const_iterator j = entries.begin();
              j != entries.end(); ++j) {
+
             QFileInfo fi(dir.filePath(*j));
             pullFile(fi.absoluteFilePath());
         }
@@ -98,6 +99,7 @@
 
         for (QStringList::const_iterator j = subdirs.begin();
              j != subdirs.end(); ++j) {
+
             QDir subdir(dir.filePath(*j));
             if (subdir.exists()) {
                 entries = subdir.entryList
@@ -293,7 +295,7 @@
     }
 
     if (results.empty()) {
-        SVDEBUG << "PluginRDFIndexer::reindex: NOTE: no vamp:Plugin resources found in indexed documents" << endl;
+        cerr << "PluginRDFIndexer::reindex: NOTE: no vamp:Plugin resources found in indexed documents" << endl;
         return false;
     }
 
@@ -308,13 +310,13 @@
         QString identifier = (*i)["plugin_id"].value;
 
         if (identifier == "") {
-            SVDEBUG << "PluginRDFIndexer::reindex: NOTE: No vamp:identifier for plugin <"
+            cerr << "PluginRDFIndexer::reindex: NOTE: No vamp:identifier for plugin <"
                  << pluginUri << ">"
                  << endl;
             continue;
         }
         if (soUri == "") {
-            SVDEBUG << "PluginRDFIndexer::reindex: NOTE: No implementation library for plugin <"
+            cerr << "PluginRDFIndexer::reindex: NOTE: No implementation library for plugin <"
                  << pluginUri << ">"
                  << endl;
             continue;
@@ -334,7 +336,7 @@
             SimpleSPARQLQuery::singleResultQuery(m, sonameQuery, "library_id");
         QString soname = sonameValue.value;
         if (soname == "") {
-            SVDEBUG << "PluginRDFIndexer::reindex: NOTE: No identifier for library <"
+            cerr << "PluginRDFIndexer::reindex: NOTE: No identifier for library <"
                  << soUri << ">"
                  << endl;
             continue;
@@ -355,7 +357,7 @@
 
         if (pluginUri != "") {
             if (m_uriToIdMap.find(pluginUri) != m_uriToIdMap.end()) {
-                SVDEBUG << "PluginRDFIndexer::reindex: WARNING: Found multiple plugins with the same URI:" << endl;
+                cerr << "PluginRDFIndexer::reindex: WARNING: Found multiple plugins with the same URI:" << endl;
                 cerr << "  1. Plugin id \"" << m_uriToIdMap[pluginUri] << "\"" << endl;
                 cerr << "  2. Plugin id \"" << pluginId << "\"" << endl;
                 cerr << "both claim URI <" << pluginUri << ">" << endl;
@@ -366,7 +368,7 @@
     }
 
     if (!foundSomething) {
-        SVDEBUG << "PluginRDFIndexer::reindex: NOTE: Plugins found, but none sufficiently described" << endl;
+        cerr << "PluginRDFIndexer::reindex: NOTE: Plugins found, but none sufficiently described" << endl;
     }
     
     return addedSomething;