comparison rdf/RDFFeatureWriter.cpp @ 686:b4a8d8221eaf debug-output

Remove most toStdString calls (no longer needed, with debug header)
author Chris Cannam
date Thu, 12 May 2011 17:31:24 +0100
parents 521438145bd7
children 06f13a3b9e9e
comparison
equal deleted inserted replaced
685:99222d4bfc78 686:b4a8d8221eaf
110 110
111 void 111 void
112 RDFFeatureWriter::setTrackMetadata(QString trackId, 112 RDFFeatureWriter::setTrackMetadata(QString trackId,
113 TrackMetadata metadata) 113 TrackMetadata metadata)
114 { 114 {
115 // cerr << "setTrackMetadata: title = " << metadata.title.toStdString() << ", maker = " << metadata.maker.toStdString() << endl; 115 // cerr << "setTrackMetadata: title = " << metadata.title << ", maker = " << metadata.maker << endl;
116 m_metadata[trackId] = metadata; 116 m_metadata[trackId] = metadata;
117 } 117 }
118 118
119 void 119 void
120 RDFFeatureWriter::setFixedEventTypeURI(QString uri) 120 RDFFeatureWriter::setFixedEventTypeURI(QString uri)
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 cerr << "NOTE: Have RDF description for plugin ID \"" 144 cerr << "NOTE: Have RDF description for plugin ID \""
145 << pluginId.toStdString() << "\"" << endl; 145 << pluginId << "\"" << endl;
146 } else { 146 } else {
147 cerr << "NOTE: No RDF description for plugin ID \"" 147 cerr << "NOTE: No RDF description for plugin ID \""
148 << pluginId.toStdString() << "\"" << 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 }
153 } 153 }
260 // Appending to an RDF file is tricky, because we need to ensure 260 // Appending to an RDF file is tricky, because we need to ensure
261 // that our URIs differ from any already in the file. This is a 261 // that our URIs differ from any already in the file. This is a
262 // dirty grubby low-rent way of doing that. This function is 262 // dirty grubby low-rent way of doing that. This function is
263 // called by FileFeatureWriter::getOutputFile when in append mode. 263 // called by FileFeatureWriter::getOutputFile when in append mode.
264 264
265 // std::cerr << "reviewFileForAppending(" << filename.toStdString() << ")" << std::endl; 265 // std::cerr << "reviewFileForAppending(" << filename << ")" << std::endl;
266 266
267 QFile file(filename); 267 QFile file(filename);
268 268
269 // just return, don't report failure -- function that called us will do that 269 // just return, don't report failure -- function that called us will do that
270 if (!file.open(QIODevice::ReadOnly)) return; 270 if (!file.open(QIODevice::ReadOnly)) return;
346 bool wantTrack = (userSpecifiedTrack || 346 bool wantTrack = (userSpecifiedTrack ||
347 (m_userMakerUri != "") || 347 (m_userMakerUri != "") ||
348 (m_metadata.find(trackId) != m_metadata.end())); 348 (m_metadata.find(trackId) != m_metadata.end()));
349 349
350 // cerr << "wantTrack = " << wantTrack << " (userSpecifiedTrack = " 350 // cerr << "wantTrack = " << wantTrack << " (userSpecifiedTrack = "
351 // << userSpecifiedTrack << ", m_userMakerUri = " << m_userMakerUri.toStdString() << ", have metadata = " << (m_metadata.find(trackId) != m_metadata.end()) << ")" << endl; 351 // << userSpecifiedTrack << ", m_userMakerUri = " << m_userMakerUri << ", have metadata = " << (m_metadata.find(trackId) != m_metadata.end()) << ")" << endl;
352 352
353 if (wantTrack) { 353 if (wantTrack) {
354 // We only write a Track at all if we have some title/artist 354 // We only write a Track at all if we have some title/artist
355 // metadata to put in it, or if the user has requested a 355 // metadata to put in it, or if the user has requested a
356 // specific track URI. Otherwise we can't be sure that what 356 // specific track URI. Otherwise we can't be sure that what