Mercurial > hg > svcore
comparison rdf/RDFTransformFactory.cpp @ 987:a51781b11dd4
Scary warning if transform RDF fails to use XSD duration format
author | Chris Cannam |
---|---|
date | Wed, 01 Oct 2014 09:20:24 +0100 |
parents | 06579b8ffb7b |
children | 8c9c425b4958 |
comparison
equal
deleted
inserted
replaced
986:e8e6c4e7437b | 987:a51781b11dd4 |
---|---|
239 (Window<float>::getTypeForName | 239 (Window<float>::getTypeForName |
240 (onode.value.toLower().toStdString())); | 240 (onode.value.toLower().toStdString())); |
241 } else if (optional == "sample_rate") { | 241 } else if (optional == "sample_rate") { |
242 transform.setSampleRate(onode.value.toFloat()); | 242 transform.setSampleRate(onode.value.toFloat()); |
243 } else if (optional == "start") { | 243 } else if (optional == "start") { |
244 transform.setStartTime | 244 RealTime start = RealTime::fromXsdDuration(onode.value.toStdString()); |
245 (RealTime::fromXsdDuration(onode.value.toStdString())); | 245 transform.setStartTime(start); |
246 } else if (optional == "duration") { | 246 } else if (optional == "duration") { |
247 transform.setDuration | 247 RealTime duration = RealTime::fromXsdDuration(onode.value.toStdString()); |
248 (RealTime::fromXsdDuration(onode.value.toStdString())); | 248 transform.setDuration(duration); |
249 if (duration == RealTime::zeroTime) { | |
250 cerr << "\nRDFTransformFactory: WARNING: Duration is specified as \"" << onode.value << "\" in RDF file,\n but this evaluates to zero when parsed as an xsd:duration datatype.\n The duration property will therefore be ignored.\n To specify start time and duration use the xsd:duration format,\n for example \"PT2.5S\"^^xsd:duration (for 2.5 seconds).\n\n"; | |
251 } | |
249 } else { | 252 } else { |
250 cerr << "RDFTransformFactory: ERROR: Inconsistent optionals lists (unexpected optional \"" << optional << "\"" << endl; | 253 cerr << "RDFTransformFactory: ERROR: Inconsistent optionals lists (unexpected optional \"" << optional << "\"" << endl; |
251 } | 254 } |
252 } | 255 } |
253 | 256 |