Mercurial > hg > svcore
comparison rdf/RDFImporter.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 | 1bfb40549003 |
comparison
equal
deleted
inserted
replaced
689:573d45e9487b | 690:1424aa29ae95 |
---|---|
217 for (int i = 0; i < (int)results.size(); ++i) { | 217 for (int i = 0; i < (int)results.size(); ++i) { |
218 | 218 |
219 QString signal = results[i]["signal"].value; | 219 QString signal = results[i]["signal"].value; |
220 QString source = results[i]["source"].value; | 220 QString source = results[i]["source"].value; |
221 | 221 |
222 DEBUG << "NOTE: Seeking signal source \"" << source << "\"..." << endl; | 222 SVDEBUG << "NOTE: Seeking signal source \"" << source << "\"..." << endl; |
223 | 223 |
224 FileSource *fs = new FileSource(source, reporter); | 224 FileSource *fs = new FileSource(source, reporter); |
225 if (fs->isAvailable()) { | 225 if (fs->isAvailable()) { |
226 DEBUG << "NOTE: Source is available: Local filename is \"" | 226 SVDEBUG << "NOTE: Source is available: Local filename is \"" |
227 << fs->getLocalFilename() << "\"..." << endl; | 227 << fs->getLocalFilename() << "\"..." << endl; |
228 } | 228 } |
229 | 229 |
230 #ifdef NO_SV_GUI | 230 #ifdef NO_SV_GUI |
231 if (!fs->isAvailable()) { | 231 if (!fs->isAvailable()) { |
233 delete fs; | 233 delete fs; |
234 continue; | 234 continue; |
235 } | 235 } |
236 #else | 236 #else |
237 if (!fs->isAvailable()) { | 237 if (!fs->isAvailable()) { |
238 DEBUG << "NOTE: Signal source \"" << source << "\" is not available, using file finder..." << endl; | 238 SVDEBUG << "NOTE: Signal source \"" << source << "\" is not available, using file finder..." << endl; |
239 FileFinder *ff = FileFinder::getInstance(); | 239 FileFinder *ff = FileFinder::getInstance(); |
240 if (ff) { | 240 if (ff) { |
241 QString path = ff->find(FileFinder::AudioFile, | 241 QString path = ff->find(FileFinder::AudioFile, |
242 fs->getLocation(), | 242 fs->getLocation(), |
243 m_uristring); | 243 m_uristring); |
423 (SimpleSPARQLQuery::QueryFromSingleSource, | 423 (SimpleSPARQLQuery::QueryFromSingleSource, |
424 titleQuery.arg(featureUri), | 424 titleQuery.arg(featureUri), |
425 "title"); | 425 "title"); |
426 | 426 |
427 if (v.value != "") { | 427 if (v.value != "") { |
428 DEBUG << "RDFImporterImpl::getDenseModelTitle: Title (from signal) \"" << v.value << "\"" << endl; | 428 SVDEBUG << "RDFImporterImpl::getDenseModelTitle: Title (from signal) \"" << v.value << "\"" << endl; |
429 m->setObjectName(v.value); | 429 m->setObjectName(v.value); |
430 return; | 430 return; |
431 } | 431 } |
432 | 432 |
433 v = SimpleSPARQLQuery::singleResultQuery | 433 v = SimpleSPARQLQuery::singleResultQuery |
434 (SimpleSPARQLQuery::QueryFromSingleSource, | 434 (SimpleSPARQLQuery::QueryFromSingleSource, |
435 titleQuery.arg(featureTypeUri), | 435 titleQuery.arg(featureTypeUri), |
436 "title"); | 436 "title"); |
437 | 437 |
438 if (v.value != "") { | 438 if (v.value != "") { |
439 DEBUG << "RDFImporterImpl::getDenseModelTitle: Title (from signal type) \"" << v.value << "\"" << endl; | 439 SVDEBUG << "RDFImporterImpl::getDenseModelTitle: Title (from signal type) \"" << v.value << "\"" << endl; |
440 m->setObjectName(v.value); | 440 m->setObjectName(v.value); |
441 return; | 441 return; |
442 } | 442 } |
443 | 443 |
444 DEBUG << "RDFImporterImpl::getDenseModelTitle: No title available for feature <" << featureUri << ">" << endl; | 444 SVDEBUG << "RDFImporterImpl::getDenseModelTitle: No title available for feature <" << featureUri << ">" << endl; |
445 } | 445 } |
446 | 446 |
447 void | 447 void |
448 RDFImporterImpl::getDenseFeatureProperties(QString featureUri, | 448 RDFImporterImpl::getDenseFeatureProperties(QString featureUri, |
449 int &sampleRate, int &windowLength, | 449 int &sampleRate, int &windowLength, |
739 haveTime = true; | 739 haveTime = true; |
740 haveDuration = true; | 740 haveDuration = true; |
741 } else { | 741 } else { |
742 QString timestring = SimpleSPARQLQuery::singleResultQuery | 742 QString timestring = SimpleSPARQLQuery::singleResultQuery |
743 (s, timeQueryString.arg(thinguri), "time").value; | 743 (s, timeQueryString.arg(thinguri), "time").value; |
744 // DEBUG << "timestring = " << timestring << endl; | 744 // SVDEBUG << "timestring = " << timestring << endl; |
745 if (timestring != "") { | 745 if (timestring != "") { |
746 time = RealTime::fromXsdDuration(timestring.toStdString()); | 746 time = RealTime::fromXsdDuration(timestring.toStdString()); |
747 haveTime = true; | 747 haveTime = true; |
748 } | 748 } |
749 } | 749 } |
768 | 768 |
769 if (modelMap[timeline][type][dimensions].find(haveDuration) == | 769 if (modelMap[timeline][type][dimensions].find(haveDuration) == |
770 modelMap[timeline][type][dimensions].end()) { | 770 modelMap[timeline][type][dimensions].end()) { |
771 | 771 |
772 /* | 772 /* |
773 DEBUG << "Creating new model: source = " << source << ", type = " << type << ", dimensions = " | 773 SVDEBUG << "Creating new model: source = " << source << ", type = " << type << ", dimensions = " |
774 << dimensions << ", haveDuration = " << haveDuration | 774 << dimensions << ", haveDuration = " << haveDuration |
775 << ", time = " << time << ", duration = " << duration | 775 << ", time = " << time << ", duration = " << duration |
776 << endl; | 776 << endl; |
777 */ | 777 */ |
778 | 778 |
872 long fduration, | 872 long fduration, |
873 bool haveDuration, | 873 bool haveDuration, |
874 std::vector<float> &values, | 874 std::vector<float> &values, |
875 QString label) | 875 QString label) |
876 { | 876 { |
877 // DEBUG << "RDFImporterImpl::fillModel: adding point at frame " << ftime << endl; | 877 // SVDEBUG << "RDFImporterImpl::fillModel: adding point at frame " << ftime << endl; |
878 | 878 |
879 SparseOneDimensionalModel *sodm = | 879 SparseOneDimensionalModel *sodm = |
880 dynamic_cast<SparseOneDimensionalModel *>(model); | 880 dynamic_cast<SparseOneDimensionalModel *>(model); |
881 if (sodm) { | 881 if (sodm) { |
882 SparseOneDimensionalModel::Point point(ftime, label); | 882 SparseOneDimensionalModel::Point point(ftime, label); |
1024 if (value.type == SimpleSPARQLQuery::URIValue) { | 1024 if (value.type == SimpleSPARQLQuery::URIValue) { |
1025 haveAudio = true; | 1025 haveAudio = true; |
1026 } | 1026 } |
1027 } | 1027 } |
1028 | 1028 |
1029 DEBUG << "NOTE: RDFImporter::identifyDocumentType: haveAudio = " | 1029 SVDEBUG << "NOTE: RDFImporter::identifyDocumentType: haveAudio = " |
1030 << haveAudio << endl; | 1030 << haveAudio << endl; |
1031 | 1031 |
1032 value = | 1032 value = |
1033 SimpleSPARQLQuery::singleResultQuery | 1033 SimpleSPARQLQuery::singleResultQuery |
1034 (SimpleSPARQLQuery::QueryFromSingleSource, | 1034 (SimpleSPARQLQuery::QueryFromSingleSource, |
1058 if (value.type == SimpleSPARQLQuery::URIValue) { | 1058 if (value.type == SimpleSPARQLQuery::URIValue) { |
1059 haveAnnotations = true; | 1059 haveAnnotations = true; |
1060 } | 1060 } |
1061 } | 1061 } |
1062 | 1062 |
1063 DEBUG << "NOTE: RDFImporter::identifyDocumentType: haveAnnotations = " | 1063 SVDEBUG << "NOTE: RDFImporter::identifyDocumentType: haveAnnotations = " |
1064 << haveAnnotations << endl; | 1064 << haveAnnotations << endl; |
1065 | 1065 |
1066 SimpleSPARQLQuery::closeSingleSource(url); | 1066 SimpleSPARQLQuery::closeSingleSource(url); |
1067 | 1067 |
1068 if (haveAudio) { | 1068 if (haveAudio) { |