comparison rdf/RDFExporter.cpp @ 510:af7b6e55895b

* Ensure text models are exported with text properties in RDF, and imported back into text models again (instead of time/value models)
author Chris Cannam
date Mon, 08 Dec 2008 11:53:10 +0000
parents 83eae5239db6
children 31ab733841d0
comparison
equal deleted inserted replaced
509:6066bde1c126 510:af7b6e55895b
153 TextModel *m = dynamic_cast<TextModel *>(m_model); 153 TextModel *m = dynamic_cast<TextModel *>(m_model);
154 if (m) { 154 if (m) {
155 f.hasTimestamp = true; 155 f.hasTimestamp = true;
156 f.hasDuration = false; 156 f.hasDuration = false;
157 const TextModel::PointList &pl(m->getPoints()); 157 const TextModel::PointList &pl(m->getPoints());
158 m_fw->setFixedEventTypeURI("af:Text");
158 for (TextModel::PointList::const_iterator i = pl.begin(); 159 for (TextModel::PointList::const_iterator i = pl.begin();
159 i != pl.end(); ++i) { 160 i != pl.end(); ++i) {
160 f.timestamp = Vamp::RealTime::frame2RealTime(i->frame, sr); 161 f.timestamp = Vamp::RealTime::frame2RealTime(i->frame, sr);
161 f.values.clear(); 162 f.values.clear();
162 f.values.push_back(i->height); 163 f.values.push_back(i->height);