svcore
1.9
|
#include <RDFFeatureWriter.h>
Public Types | |
typedef vector< Parameter > | ParameterList |
Public Member Functions | |
RDFFeatureWriter () | |
virtual | ~RDFFeatureWriter () |
string | getDescription () const override |
ParameterList | getSupportedParameters () const override |
void | setParameters (map< string, string > ¶ms) override |
void | setTrackMetadata (QString trackid, TrackMetadata metadata) override |
void | write (QString trackid, const Transform &transform, const Vamp::Plugin::OutputDescriptor &output, const Vamp::Plugin::FeatureList &features, std::string summaryType="") override |
virtual void | setFixedEventTypeURI (QString uri) |
void | finish () override |
QString | getWriterTag () const override |
void | testOutputFile (QString trackId, TransformId transformId) override |
Throw FailedToOpenOutputStream if we can already tell that we will be unable to write to the output file. More... | |
void | flush () override |
virtual void | setNofM (int, int) |
Notify the writer that we are about to start extraction for input file N of M (where N is 1..M). More... | |
Protected Types | |
enum | FileWriteSupport { SupportOneFilePerTrackTransform = 1, SupportOneFilePerTrack = 2, SupportOneFileTotal = 4, SupportStdOut = 8 } |
typedef pair< QString, TransformId > | TrackTransformPair |
typedef map< TrackTransformPair, QString > | FileNameMap |
typedef map< TrackTransformPair, QFile * > | FileMap |
typedef map< QFile *, QTextStream * > | FileStreamMap |
Protected Member Functions | |
QTextStream * | getOutputStream (QString, TransformId, QTextCodec *) |
TrackTransformPair | getFilenameKey (QString, TransformId) |
QString | createOutputFilename (QString, TransformId) |
QString | getOutputFilename (QString, TransformId) |
QFile * | getOutputFile (QString, TransformId) |
Protected Attributes | |
FileMap | m_files |
FileNameMap | m_filenames |
FileStreamMap | m_streams |
QTextStream * | m_prevstream |
int | m_support |
QString | m_extension |
QString | m_baseDir |
bool | m_manyFiles |
QString | m_singleFileName |
bool | m_stdout |
bool | m_append |
bool | m_force |
Private Types | |
typedef map< QString, PluginRDFDescription > | RDFDescriptionMap |
typedef map< QString, TrackMetadata > | TrackMetadataMap |
typedef pair< QString, Transform > | StringTransformPair |
typedef pair< QTextStream *, QString > | StreamBuffer |
Private Member Functions | |
bool | haveTitleArtistMetadata (QString trackId) const |
void | reviewFileForAppending (QString filename) override |
void | writePrefixes (QTextStream *) |
void | writeSignalDescription (QTextStream *, QString) |
void | writeLocalFeatureTypes (QTextStream *, const Transform &, const Vamp::Plugin::OutputDescriptor &, PluginRDFDescription &, std::string summaryType) |
void | writeSparseRDF (QTextStream *stream, const Transform &transform, const Vamp::Plugin::OutputDescriptor &output, const Vamp::Plugin::FeatureList &features, PluginRDFDescription &desc, QString timelineURI) |
void | writeTrackLevelRDF (QTextStream *stream, const Transform &transform, const Vamp::Plugin::OutputDescriptor &output, const Vamp::Plugin::FeatureList &features, PluginRDFDescription &desc, QString signalURI) |
void | writeDenseRDF (QTextStream *stream, const Transform &transform, const Vamp::Plugin::OutputDescriptor &output, const Vamp::Plugin::FeatureList &features, PluginRDFDescription &desc, QString signalURI, QString timelineURI) |
Private Attributes | |
RDFDescriptionMap | m_rdfDescriptions |
TrackMetadataMap | m_metadata |
QString | m_fixedEventTypeURI |
set< QString > | m_startedTrackIds |
map< QTextStream *, set< Transform > > | m_startedStreamTransforms |
map< QString, QString > | m_trackTrackURIs |
map< QString, QString > | m_trackTimelineURIs |
map< QString, QString > | m_trackSignalURIs |
map< Transform, QString > | m_transformURIs |
map< Transform, QString > | m_syntheticEventTypeURIs |
map< Transform, QString > | m_syntheticSignalTypeURIs |
map< StringTransformPair, StreamBuffer > | m_openDenseFeatures |
QString | m_userAudioFileUri |
QString | m_userTrackUri |
QString | m_userMakerUri |
bool | m_plain |
bool | m_network |
bool | m_networkRetrieved |
long | m_count |
Detailed Description
Definition at line 41 of file RDFFeatureWriter.h.
Member Typedef Documentation
|
private |
Definition at line 67 of file RDFFeatureWriter.h.
|
private |
Definition at line 70 of file RDFFeatureWriter.h.
|
private |
Definition at line 132 of file RDFFeatureWriter.h.
|
private |
Definition at line 133 of file RDFFeatureWriter.h.
|
protectedinherited |
Definition at line 61 of file FileFeatureWriter.h.
|
protectedinherited |
Definition at line 62 of file FileFeatureWriter.h.
|
protectedinherited |
Definition at line 63 of file FileFeatureWriter.h.
|
protectedinherited |
Definition at line 64 of file FileFeatureWriter.h.
|
inherited |
Definition at line 51 of file FeatureWriter.h.
Member Enumeration Documentation
|
protectedinherited |
Enumerator | |
---|---|
SupportOneFilePerTrackTransform | |
SupportOneFilePerTrack | |
SupportOneFileTotal | |
SupportStdOut |
Definition at line 51 of file FileFeatureWriter.h.
Constructor & Destructor Documentation
RDFFeatureWriter::RDFFeatureWriter | ( | ) |
Definition at line 34 of file RDFFeatureWriter.cpp.
|
virtual |
Definition at line 47 of file RDFFeatureWriter.cpp.
Member Function Documentation
|
overridevirtual |
Implements FeatureWriter.
Definition at line 52 of file RDFFeatureWriter.cpp.
|
overridevirtual |
Reimplemented from FileFeatureWriter.
Definition at line 58 of file RDFFeatureWriter.cpp.
References FeatureWriter::Parameter::description, FileFeatureWriter::getSupportedParameters(), FeatureWriter::Parameter::hasArg, and FeatureWriter::Parameter::name.
|
overridevirtual |
Reimplemented from FileFeatureWriter.
Definition at line 92 of file RDFFeatureWriter.cpp.
References m_network, m_plain, m_userAudioFileUri, m_userMakerUri, m_userTrackUri, and FileFeatureWriter::setParameters().
Referenced by RDFExporter::RDFExporter().
|
overridevirtual |
Reimplemented from FeatureWriter.
Definition at line 117 of file RDFFeatureWriter.cpp.
References m_metadata.
|
overridevirtual |
Implements FeatureWriter.
Definition at line 131 of file RDFFeatureWriter.cpp.
References Transform::getIdentifier(), PluginRDFIndexer::getInstance(), FileFeatureWriter::getOutputStream(), Transform::getPluginIdentifier(), PluginRDFIndexer::indexConfiguredURLs(), m_network, m_networkRetrieved, m_plain, m_rdfDescriptions, FileFeatureWriter::m_singleFileName, m_startedStreamTransforms, m_startedTrackIds, FileFeatureWriter::m_stdout, m_trackSignalURIs, m_trackTimelineURIs, PluginRDFDescription::OutputDense, PluginRDFDescription::OutputTrackLevel, SVCERR, writeDenseRDF(), writeLocalFeatureTypes(), writePrefixes(), writeSignalDescription(), writeSparseRDF(), and writeTrackLevelRDF().
Referenced by RDFExporter::write().
|
virtual |
Definition at line 125 of file RDFFeatureWriter.cpp.
References m_fixedEventTypeURI.
Referenced by RDFExporter::write().
|
overridevirtual |
Reimplemented from FileFeatureWriter.
Definition at line 793 of file RDFFeatureWriter.cpp.
References FileFeatureWriter::finish(), m_openDenseFeatures, and m_startedStreamTransforms.
|
inlineoverridevirtual |
Implements FeatureWriter.
Definition at line 64 of file RDFFeatureWriter.h.
|
inlineprivate |
Definition at line 73 of file RDFFeatureWriter.h.
Referenced by writeSignalDescription().
|
overrideprivatevirtual |
Reimplemented from FileFeatureWriter.
Definition at line 265 of file RDFFeatureWriter.cpp.
References m_count.
|
private |
Definition at line 247 of file RDFFeatureWriter.cpp.
Referenced by write().
|
private |
Definition at line 299 of file RDFFeatureWriter.cpp.
References haveTitleArtistMetadata(), m_count, m_metadata, m_trackSignalURIs, m_trackTimelineURIs, m_trackTrackURIs, m_userAudioFileUri, m_userMakerUri, m_userTrackUri, FeatureWriter::TrackMetadata::maker, and FeatureWriter::TrackMetadata::title.
Referenced by write().
|
private |
!! bin names, extents and so on can be written out using e.g. vamp:bin_names ( "a" "b" "c" )
Definition at line 404 of file RDFFeatureWriter.cpp.
References Transform::getIdentifier(), PluginRDFDescription::getOutputDisposition(), PluginRDFDescription::getOutputEventTypeURI(), PluginRDFDescription::getOutputFeatureAttributeURI(), PluginRDFDescription::getOutputSignalTypeURI(), m_count, m_fixedEventTypeURI, m_plain, m_syntheticEventTypeURIs, m_syntheticSignalTypeURIs, m_transformURIs, PluginRDFDescription::OutputDense, PluginRDFDescription::OutputTrackLevel, and RDFTransformFactory::writeTransformToRDF().
Referenced by write().
|
private |
!! named bins?
Definition at line 525 of file RDFFeatureWriter.cpp.
References Transform::getIdentifier(), PluginRDFDescription::getOutputEventTypeURI(), PluginRDFDescription::haveDescription(), m_count, m_fixedEventTypeURI, m_plain, m_syntheticEventTypeURIs, and m_transformURIs.
Referenced by write().
|
private |
Definition at line 617 of file RDFFeatureWriter.cpp.
References PluginRDFDescription::getOutputFeatureAttributeURI(), and SVDEBUG.
Referenced by write().
|
private |
Definition at line 657 of file RDFFeatureWriter.cpp.
References Transform::getBlockSize(), Transform::getDuration(), Transform::getIdentifier(), PluginRDFDescription::getOutputSignalTypeURI(), Transform::getSampleRate(), Transform::getStartTime(), Transform::getStepSize(), PluginRDFDescription::haveDescription(), m_count, m_openDenseFeatures, m_plain, m_syntheticSignalTypeURIs, m_transformURIs, RealTime::realTime2Frame(), and SVCERR.
Referenced by write().
|
overridevirtualinherited |
Throw FailedToOpenOutputStream if we can already tell that we will be unable to write to the output file.
This is called to test the output stream before processing begins. The writer may legitimately succeed here but still fail later – this is really an optimisation to ensure that easy-to-recognise failure cases fail early.
Reimplemented from FeatureWriter.
Definition at line 231 of file FileFeatureWriter.cpp.
References FileFeatureWriter::createOutputFilename(), FileFeatureWriter::m_singleFileName, and FileFeatureWriter::m_stdout.
|
overridevirtualinherited |
Reimplemented from FeatureWriter.
Definition at line 347 of file FileFeatureWriter.cpp.
References FileFeatureWriter::m_prevstream.
|
protectedinherited |
Definition at line 317 of file FileFeatureWriter.cpp.
References FileFeatureWriter::getOutputFile(), FileFeatureWriter::m_prevstream, FileFeatureWriter::m_stdout, and FileFeatureWriter::m_streams.
Referenced by CSVFeatureWriter::finish(), CSVFeatureWriter::write(), and write().
|
protectedinherited |
Definition at line 249 of file FileFeatureWriter.cpp.
References FileFeatureWriter::m_manyFiles, and FileFeatureWriter::m_singleFileName.
Referenced by FileFeatureWriter::getOutputFile(), and FileFeatureWriter::getOutputFilename().
|
protectedinherited |
Definition at line 170 of file FileFeatureWriter.cpp.
References FeatureWriter::getWriterTag(), FileFeatureWriter::m_append, FileFeatureWriter::m_baseDir, FileFeatureWriter::m_extension, FileFeatureWriter::m_force, FileFeatureWriter::m_manyFiles, FileFeatureWriter::m_singleFileName, FileFeatureWriter::m_stdout, and SVCERR.
Referenced by FileFeatureWriter::getOutputFile(), FileFeatureWriter::getOutputFilename(), and FileFeatureWriter::testOutputFile().
|
protectedinherited |
Definition at line 266 of file FileFeatureWriter.cpp.
References FileFeatureWriter::createOutputFilename(), FileFeatureWriter::getFilenameKey(), and FileFeatureWriter::m_filenames.
|
protectedinherited |
Definition at line 277 of file FileFeatureWriter.cpp.
References FileFeatureWriter::createOutputFilename(), FileFeatureWriter::getFilenameKey(), FileFeatureWriter::m_append, FileFeatureWriter::m_files, FileFeatureWriter::reviewFileForAppending(), SVCERR, and SVDEBUG.
Referenced by FileFeatureWriter::getOutputStream().
|
inlinevirtualinherited |
Notify the writer that we are about to start extraction for input file N of M (where N is 1..M).
May be useful when writing multiple outputs into a single file where some syntactic element is needed to connect them.
Definition at line 93 of file FeatureWriter.h.
References FeatureWriter::write().
Member Data Documentation
|
private |
Definition at line 68 of file RDFFeatureWriter.h.
Referenced by write().
|
private |
Definition at line 71 of file RDFFeatureWriter.h.
Referenced by setTrackMetadata(), and writeSignalDescription().
|
private |
Definition at line 86 of file RDFFeatureWriter.h.
Referenced by setFixedEventTypeURI(), writeLocalFeatureTypes(), and writeSparseRDF().
|
private |
Definition at line 120 of file RDFFeatureWriter.h.
Referenced by write().
|
private |
Definition at line 122 of file RDFFeatureWriter.h.
|
private |
Definition at line 124 of file RDFFeatureWriter.h.
Referenced by writeSignalDescription().
|
private |
Definition at line 125 of file RDFFeatureWriter.h.
Referenced by write(), and writeSignalDescription().
|
private |
Definition at line 126 of file RDFFeatureWriter.h.
Referenced by write(), and writeSignalDescription().
|
private |
Definition at line 128 of file RDFFeatureWriter.h.
Referenced by writeDenseRDF(), writeLocalFeatureTypes(), and writeSparseRDF().
|
private |
Definition at line 129 of file RDFFeatureWriter.h.
Referenced by writeLocalFeatureTypes(), and writeSparseRDF().
|
private |
Definition at line 130 of file RDFFeatureWriter.h.
Referenced by writeDenseRDF(), and writeLocalFeatureTypes().
|
private |
Definition at line 134 of file RDFFeatureWriter.h.
Referenced by finish(), and writeDenseRDF().
|
private |
Definition at line 135 of file RDFFeatureWriter.h.
Referenced by setParameters(), and writeSignalDescription().
|
private |
Definition at line 136 of file RDFFeatureWriter.h.
Referenced by setParameters(), and writeSignalDescription().
|
private |
Definition at line 137 of file RDFFeatureWriter.h.
Referenced by setParameters(), and writeSignalDescription().
|
private |
Definition at line 139 of file RDFFeatureWriter.h.
Referenced by setParameters(), write(), writeDenseRDF(), writeLocalFeatureTypes(), and writeSparseRDF().
|
private |
Definition at line 141 of file RDFFeatureWriter.h.
Referenced by setParameters(), and write().
|
private |
Definition at line 142 of file RDFFeatureWriter.h.
Referenced by write().
|
private |
Definition at line 144 of file RDFFeatureWriter.h.
Referenced by reviewFileForAppending(), writeDenseRDF(), writeLocalFeatureTypes(), writeSignalDescription(), and writeSparseRDF().
|
protectedinherited |
Definition at line 65 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::finish(), FileFeatureWriter::getOutputFile(), and FileFeatureWriter::~FileFeatureWriter().
|
protectedinherited |
Definition at line 66 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::getOutputFilename().
|
protectedinherited |
Definition at line 67 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::finish(), FileFeatureWriter::getOutputStream(), and FileFeatureWriter::~FileFeatureWriter().
|
protectedinherited |
Definition at line 68 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::finish(), FileFeatureWriter::flush(), and FileFeatureWriter::getOutputStream().
|
protectedinherited |
Definition at line 87 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::FileFeatureWriter(), FileFeatureWriter::getSupportedParameters(), and FileFeatureWriter::setParameters().
|
protectedinherited |
Definition at line 88 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), and FileFeatureWriter::FileFeatureWriter().
|
protectedinherited |
Definition at line 89 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), and FileFeatureWriter::setParameters().
|
protectedinherited |
Definition at line 90 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), FileFeatureWriter::FileFeatureWriter(), FileFeatureWriter::getFilenameKey(), and FileFeatureWriter::setParameters().
|
protectedinherited |
Definition at line 91 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), FileFeatureWriter::FileFeatureWriter(), FileFeatureWriter::finish(), FileFeatureWriter::getFilenameKey(), FileFeatureWriter::setParameters(), FileFeatureWriter::testOutputFile(), write(), and CSVFeatureWriter::writeFeature().
|
protectedinherited |
Definition at line 92 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), FileFeatureWriter::finish(), FileFeatureWriter::getOutputStream(), FileFeatureWriter::setParameters(), FileFeatureWriter::testOutputFile(), write(), and CSVFeatureWriter::writeFeature().
|
protectedinherited |
Definition at line 93 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), FileFeatureWriter::getOutputFile(), and FileFeatureWriter::setParameters().
|
protectedinherited |
Definition at line 94 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), and FileFeatureWriter::setParameters().
The documentation for this class was generated from the following files:
Generated by 1.8.11