comparison rdf/RDFTransformFactory.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 18488253a3f4
children 06f13a3b9e9e
comparison
equal deleted inserted replaced
685:99222d4bfc78 686:b4a8d8221eaf
166 } 166 }
167 167
168 m_isRDF = true; 168 m_isRDF = true;
169 169
170 if (transformResults.empty()) { 170 if (transformResults.empty()) {
171 cerr << "RDFTransformFactory: NOTE: No RDF/TTL transform descriptions found in document at <" << m_urlString.toStdString() << ">" << endl; 171 cerr << "RDFTransformFactory: NOTE: No RDF/TTL transform descriptions found in document at <" << m_urlString << ">" << endl;
172 return transforms; 172 return transforms;
173 } 173 }
174 174
175 // There are various queries we need to make that might include 175 // There are various queries we need to make that might include
176 // data from either the transform RDF or the model accumulated 176 // data from either the transform RDF or the model accumulated
193 QString pluginUri = result["plugin"].value; 193 QString pluginUri = result["plugin"].value;
194 194
195 QString pluginId = indexer->getIdForPluginURI(pluginUri); 195 QString pluginId = indexer->getIdForPluginURI(pluginUri);
196 if (pluginId == "") { 196 if (pluginId == "") {
197 cerr << "RDFTransformFactory: WARNING: Unknown plugin <" 197 cerr << "RDFTransformFactory: WARNING: Unknown plugin <"
198 << pluginUri.toStdString() << "> for transform <" 198 << pluginUri << "> for transform <"
199 << transformUri.toStdString() << ">, skipping this transform" 199 << transformUri << ">, skipping this transform"
200 << endl; 200 << endl;
201 continue; 201 continue;
202 } 202 }
203 203
204 Transform transform; 204 Transform transform;
271 transform.setStepSize(v.value.toUInt()); 271 transform.setStepSize(v.value.toUInt());
272 } else if (optional == "block_size") { 272 } else if (optional == "block_size") {
273 transform.setBlockSize(v.value.toUInt()); 273 transform.setBlockSize(v.value.toUInt());
274 } else if (optional == "window_type") { 274 } else if (optional == "window_type") {
275 cerr << "NOTE: can't handle window type yet (value is \"" 275 cerr << "NOTE: can't handle window type yet (value is \""
276 << v.value.toStdString() << "\")" << endl; 276 << v.value << "\")" << endl;
277 } else if (optional == "sample_rate") { 277 } else if (optional == "sample_rate") {
278 transform.setSampleRate(v.value.toFloat()); 278 transform.setSampleRate(v.value.toFloat());
279 } else if (optional == "start") { 279 } else if (optional == "start") {
280 transform.setStartTime 280 transform.setStartTime
281 (RealTime::fromXsdDuration(v.value.toStdString())); 281 (RealTime::fromXsdDuration(v.value.toStdString()));
282 } else if (optional == "duration") { 282 } else if (optional == "duration") {
283 transform.setDuration 283 transform.setDuration
284 (RealTime::fromXsdDuration(v.value.toStdString())); 284 (RealTime::fromXsdDuration(v.value.toStdString()));
285 } else { 285 } else {
286 cerr << "RDFTransformFactory: ERROR: Inconsistent optionals lists (unexpected optional \"" << optional.toStdString() << "\"" << endl; 286 cerr << "RDFTransformFactory: ERROR: Inconsistent optionals lists (unexpected optional \"" << optional << "\"" << endl;
287 } 287 }
288 } 288 }
289 } 289 }
290 } 290 }
291 291
292 cerr << "RDFTransformFactory: NOTE: Transform is: " << endl; 292 cerr << "RDFTransformFactory: NOTE: Transform is: " << endl;
293 cerr << transform.toXmlString().toStdString() << endl; 293 cerr << transform.toXmlString() << endl;
294 294
295 transforms.push_back(transform); 295 transforms.push_back(transform);
296 } 296 }
297 297
298 return transforms; 298 return transforms;
396 396
397 if (pluginUri != "") { 397 if (pluginUri != "") {
398 s << uri << " a vamp:Transform ;" << endl; 398 s << uri << " a vamp:Transform ;" << endl;
399 s << " vamp:plugin <" << QUrl(pluginUri).toEncoded().data() << "> ;" << endl; 399 s << " vamp:plugin <" << QUrl(pluginUri).toEncoded().data() << "> ;" << endl;
400 } else { 400 } else {
401 std::cerr << "WARNING: RDFTransformFactory::writeTransformToRDF: No plugin URI available for plugin id \"" << pluginId.toStdString() << "\", writing synthetic plugin and library resources" << std::endl; 401 std::cerr << "WARNING: RDFTransformFactory::writeTransformToRDF: No plugin URI available for plugin id \"" << pluginId << "\", writing synthetic plugin and library resources" << std::endl;
402 QString type, soname, label; 402 QString type, soname, label;
403 PluginIdentifier::parseIdentifier(pluginId, type, soname, label); 403 PluginIdentifier::parseIdentifier(pluginId, type, soname, label);
404 s << uri << "_plugin a vamp:Plugin ;" << endl; 404 s << uri << "_plugin a vamp:Plugin ;" << endl;
405 s << " vamp:identifier \"" << label << "\" .\n" << endl; 405 s << " vamp:identifier \"" << label << "\" .\n" << endl;
406 s << uri << "_library a vamp:PluginLibrary ;" << endl; 406 s << uri << "_library a vamp:PluginLibrary ;" << endl;
413 PluginRDFDescription description(pluginId); 413 PluginRDFDescription description(pluginId);
414 QString outputId = transform.getOutput(); 414 QString outputId = transform.getOutput();
415 QString outputUri = description.getOutputUri(outputId); 415 QString outputUri = description.getOutputUri(outputId);
416 416
417 if (transform.getOutput() != "" && outputUri == "") { 417 if (transform.getOutput() != "" && outputUri == "") {
418 std::cerr << "WARNING: RDFTransformFactory::writeTransformToRDF: No output URI available for transform output id \"" << transform.getOutput().toStdString() << "\", writing a synthetic output resource" << std::endl; 418 std::cerr << "WARNING: RDFTransformFactory::writeTransformToRDF: No output URI available for transform output id \"" << transform.getOutput() << "\", writing a synthetic output resource" << std::endl;
419 } 419 }
420 420
421 if (transform.getStepSize() != 0) { 421 if (transform.getStepSize() != 0) {
422 s << " vamp:step_size \"" << transform.getStepSize() << "\"^^xsd:int ; " << endl; 422 s << " vamp:step_size \"" << transform.getStepSize() << "\"^^xsd:int ; " << endl;
423 } 423 }