comparison rdf/RDFFeatureWriter.cpp @ 500:83eae5239db6

* Permit viewing (though not editing) colour 3d plot layer data in the spreadsheet data viewer dialog * Add somewhat simplistic RDF export for layers * Fix display of peak frequencies in spectrum layer * Fix (I hope) sizing of plugin parameter dialog
author Chris Cannam
date Tue, 02 Dec 2008 17:17:25 +0000
parents fdf5930b7ccc
children 3376dc26dece
comparison
equal deleted inserted replaced
499:b71116d3c180 500:83eae5239db6
219 if (m_trackTimelineURIs.find(trackId) == m_trackTimelineURIs.end()) { 219 if (m_trackTimelineURIs.find(trackId) == m_trackTimelineURIs.end()) {
220 m_trackTimelineURIs[trackId] = QString(":signal_timeline_%1").arg(signalCount); 220 m_trackTimelineURIs[trackId] = QString(":signal_timeline_%1").arg(signalCount);
221 } 221 }
222 QString timelineURI = m_trackTimelineURIs[trackId]; 222 QString timelineURI = m_trackTimelineURIs[trackId];
223 223
224 stream << "\n<" << url.toEncoded().data() << "> a mo:AudioFile .\n\n" 224 if (trackId != "") {
225 << signalURI << " a mo:Signal ;\n" 225 stream << "\n<" << url.toEncoded().data() << "> a mo:AudioFile .\n\n";
226 << " mo:available_as <" << url.toEncoded().data() 226 }
227 << "> ;\n" 227
228 << " mo:time [\n" 228 stream << signalURI << " a mo:Signal ;\n";
229
230 if (trackId != "") {
231 stream << " mo:available_as <" << url.toEncoded().data()
232 << "> ;\n";
233 }
234
235 stream << " mo:time [\n"
229 << " a tl:Interval ;\n" 236 << " a tl:Interval ;\n"
230 << " tl:onTimeLine " 237 << " tl:onTimeLine "
231 << timelineURI << "\n ] .\n\n"; 238 << timelineURI << "\n ] .\n\n";
232 } 239 }
233 240
282 } else { 289 } else {
283 transformUri = QString(":transform_%1_%2").arg(m_count++).arg(outputId); 290 transformUri = QString(":transform_%1_%2").arg(m_count++).arg(outputId);
284 m_transformURIs[transform] = transformUri; 291 m_transformURIs[transform] = transformUri;
285 } 292 }
286 293
287 stream << RDFTransformFactory::writeTransformToRDF(transform, transformUri) 294 if (transform.getIdentifier() != "") {
288 << endl; 295 stream << RDFTransformFactory::writeTransformToRDF(transform, transformUri)
296 << endl;
297 }
289 298
290 if (needEventType) { 299 if (needEventType) {
291 300
292 QString uri; 301 QString uri;
293 if (m_syntheticEventTypeURIs.find(transform) != 302 if (m_syntheticEventTypeURIs.find(transform) !=
386 << " tl:onTimeLine " << timelineURI << " ;\n" 395 << " tl:onTimeLine " << timelineURI << " ;\n"
387 << " tl:at \"PT" << timestamp 396 << " tl:at \"PT" << timestamp
388 << "S\"^^xsd:duration ;\n ] "; 397 << "S\"^^xsd:duration ;\n ] ";
389 } 398 }
390 399
391 stream << ";\n"; 400 if (transform.getIdentifier() != "") {
392 stream << " vamp:computed_by " << m_transformURIs[transform] << " "; 401 stream << ";\n";
402 stream << " vamp:computed_by " << m_transformURIs[transform] << " ";
403 }
393 404
394 if (feature.label.length() > 0) { 405 if (feature.label.length() > 0) {
395 stream << ";\n"; 406 stream << ";\n";
396 stream << " rdfs:label \"" << feature.label.c_str() << "\" "; 407 stream << " rdfs:label \"" << feature.label.c_str() << "\" ";
397 } 408 }