comparison rdf/RDFFeatureWriter.cpp @ 690:1424aa29ae95

Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author Chris Cannam
date Tue, 14 Jun 2011 15:26:52 +0100
parents 06f13a3b9e9e
children eb741b4e8d21 f3fd2988fc9b
comparison
equal deleted inserted replaced
689:573d45e9487b 690:1424aa29ae95
139 } 139 }
140 140
141 m_rdfDescriptions[pluginId] = PluginRDFDescription(pluginId); 141 m_rdfDescriptions[pluginId] = PluginRDFDescription(pluginId);
142 142
143 if (m_rdfDescriptions[pluginId].haveDescription()) { 143 if (m_rdfDescriptions[pluginId].haveDescription()) {
144 DEBUG << "NOTE: Have RDF description for plugin ID \"" 144 SVDEBUG << "NOTE: Have RDF description for plugin ID \""
145 << pluginId << "\"" << endl; 145 << pluginId << "\"" << endl;
146 } else { 146 } else {
147 DEBUG << "NOTE: No RDF description for plugin ID \"" 147 SVDEBUG << "NOTE: No RDF description for plugin ID \""
148 << pluginId << "\"" << endl; 148 << pluginId << "\"" << endl;
149 if (!m_network) { 149 if (!m_network) {
150 cerr << " Consider using the --rdf-network option to retrieve plugin descriptions" << endl; 150 cerr << " Consider using the --rdf-network option to retrieve plugin descriptions" << endl;
151 cerr << " from the network where possible." << endl; 151 cerr << " from the network where possible." << endl;
152 } 152 }
290 290
291 void 291 void
292 RDFFeatureWriter::writeSignalDescription(QTextStream *sptr, 292 RDFFeatureWriter::writeSignalDescription(QTextStream *sptr,
293 QString trackId) 293 QString trackId)
294 { 294 {
295 // DEBUG << "RDFFeatureWriter::writeSignalDescription" << endl; 295 // SVDEBUG << "RDFFeatureWriter::writeSignalDescription" << endl;
296 296
297 QTextStream &stream = *sptr; 297 QTextStream &stream = *sptr;
298 298
299 /* 299 /*
300 * Describe signal we're analysing (AudioFile, Signal, TimeLine, etc.) 300 * Describe signal we're analysing (AudioFile, Signal, TimeLine, etc.)
518 const Plugin::OutputDescriptor& od, 518 const Plugin::OutputDescriptor& od,
519 const Plugin::FeatureList& featureList, 519 const Plugin::FeatureList& featureList,
520 PluginRDFDescription &desc, 520 PluginRDFDescription &desc,
521 QString timelineURI) 521 QString timelineURI)
522 { 522 {
523 // DEBUG << "RDFFeatureWriter::writeSparseRDF: have " << featureList.size() << " features" << endl; 523 // SVDEBUG << "RDFFeatureWriter::writeSparseRDF: have " << featureList.size() << " features" << endl;
524 524
525 if (featureList.empty()) return; 525 if (featureList.empty()) return;
526 QTextStream &stream = *sptr; 526 QTextStream &stream = *sptr;
527 527
528 bool plain = (m_plain || !desc.haveDescription()); 528 bool plain = (m_plain || !desc.haveDescription());
619 619
620 QString outputId = od.identifier.c_str(); 620 QString outputId = od.identifier.c_str();
621 QString featureUri = desc.getOutputFeatureAttributeURI(outputId); 621 QString featureUri = desc.getOutputFeatureAttributeURI(outputId);
622 622
623 if (featureUri == "") { 623 if (featureUri == "") {
624 DEBUG << "RDFFeatureWriter::writeTrackLevelRDF: ERROR: No feature URI available -- this function should not have been called!" << endl; 624 SVDEBUG << "RDFFeatureWriter::writeTrackLevelRDF: ERROR: No feature URI available -- this function should not have been called!" << endl;
625 return; 625 return;
626 } 626 }
627 627
628 for (int i = 0; i < featureList.size(); ++i) { 628 for (int i = 0; i < featureList.size(); ++i) {
629 629
763 } 763 }
764 } 764 }
765 765
766 void RDFFeatureWriter::finish() 766 void RDFFeatureWriter::finish()
767 { 767 {
768 // DEBUG << "RDFFeatureWriter::finish()" << endl; 768 // SVDEBUG << "RDFFeatureWriter::finish()" << endl;
769 769
770 // close any open dense feature literals 770 // close any open dense feature literals
771 771
772 for (map<StringTransformPair, StreamBuffer>::iterator i = 772 for (map<StringTransformPair, StreamBuffer>::iterator i =
773 m_openDenseFeatures.begin(); 773 m_openDenseFeatures.begin();
774 i != m_openDenseFeatures.end(); ++i) { 774 i != m_openDenseFeatures.end(); ++i) {
775 // DEBUG << "closing a stream" << endl; 775 // SVDEBUG << "closing a stream" << endl;
776 StreamBuffer &b = i->second; 776 StreamBuffer &b = i->second;
777 *(b.first) << b.second << "\" ." << endl; 777 *(b.first) << b.second << "\" ." << endl;
778 } 778 }
779 779
780 m_openDenseFeatures.clear(); 780 m_openDenseFeatures.clear();