24 #include <dataquay/BasicStore.h> 30 using Dataquay::Nodes;
31 using Dataquay::Triple;
32 using Dataquay::Triples;
33 using Dataquay::BasicStore;
37 m_haveDescription(false)
42 cerr <<
"PluginRDFDescription: WARNING: No RDF description available for plugin ID \"" 43 << pluginId <<
"\"" << endl;
93 ids.push_back(i->first);
167 Profiler profiler(
"PluginRDFDescription::index");
179 Profiler profiler(
"PluginRDFDescription::index");
185 Node n =
index->complete
186 (Triple(plugin,
index->expand(
"vamp:name"), Node()));
188 if (n.type == Node::Literal && n.value !=
"") {
193 (Triple(plugin,
index->expand(
"dc:description"), Node()));
195 if (n.type == Node::Literal && n.value !=
"") {
200 (Triple(plugin,
index->expand(
"foaf:maker"), Node()));
202 if (n.type == Node::URI || n.type == Node::Blank) {
203 n =
index->complete(Triple(n,
index->expand(
"foaf:name"), Node()));
204 if (n.type == Node::Literal && n.value !=
"") {
214 (Triple(plugin,
index->expand(
"foaf:page"), Node()));
216 if (n.type == Node::URI && n.value !=
"") {
221 (Triple(Node(),
index->expand(
"vamp:available_plugin"), plugin));
224 n =
index->complete(Triple(n,
index->expand(
"foaf:page"), Node()));
225 if (n.type == Node::URI && n.value !=
"") {
236 Profiler profiler(
"PluginRDFDescription::indexOutputs");
242 Nodes outputs =
index->match
243 (Triple(plugin,
index->expand(
"vamp:output"), Node())).objects();
245 if (outputs.empty()) {
246 cerr <<
"ERROR: PluginRDFDescription::indexURL: NOTE: No outputs defined for <" 251 foreach (Node output, outputs) {
253 if ((output.type != Node::URI && output.type != Node::Blank) ||
254 output.value ==
"") {
255 cerr <<
"ERROR: PluginRDFDescription::indexURL: No valid URI for output " << output <<
" of plugin <" <<
m_pluginUri <<
">" << endl;
259 Node n =
index->complete(Triple(output,
index->expand(
"vamp:identifier"), Node()));
260 if (n.type != Node::Literal || n.value ==
"") {
261 cerr <<
"ERROR: PluginRDFDescription::indexURL: No vamp:identifier for output <" << output <<
">" << endl;
264 QString outputId = n.value;
268 n =
index->complete(Triple(output, Uri(
"a"), Node()));
270 if (n.type == Node::URI) outputType = n.value;
272 n =
index->complete(Triple(output,
index->expand(
"vamp:unit"), Node()));
274 if (n.type == Node::Literal) outputUnit = n.value;
276 if (outputType.contains(
"DenseOutput")) {
278 }
else if (outputType.contains(
"SparseOutput")) {
280 }
else if (outputType.contains(
"TrackLevelOutput")) {
288 if (outputUnit !=
"") {
292 n =
index->complete(Triple(output,
index->expand(
"dc:title"), Node()));
293 if (n.type == Node::Literal && n.value !=
"") {
297 n =
index->complete(Triple(output,
index->expand(
"vamp:computes_event_type"), Node()));
299 if (n.type == Node::URI && n.value !=
"") {
303 n =
index->complete(Triple(output,
index->expand(
"vamp:computes_feature"), Node()));
304 if (n.type == Node::URI && n.value !=
"") {
308 n =
index->complete(Triple(output,
index->expand(
"vamp:computes_signal_type"), Node()));
309 if (n.type == Node::URI && n.value !=
"") {
QString getURIForPluginId(QString pluginId)
QString getOutputFeatureAttributeURI(QString outputId) const
OutputStringMap m_outputSignalTypeURIMap
QString getPluginDescription() const
QString getPluginInfoURL() const
OutputStringMap m_outputNames
QString getPluginName() const
OutputDisposition getOutputDisposition(QString outputId) const
QString getOutputSignalTypeURI(QString outputId) const
QStringList getOutputIds() const
QString m_pluginDescription
QString getOutputUnit(QString outputId) const
const Dataquay::BasicStore * getIndex()
QString getOutputEventTypeURI(QString outputId) const
OutputDispositionMap m_outputDispositions
QString getOutputUri(QString outputId) const
QString getOutputName(QString outputId) const
bool haveDescription() const
OutputStringMap m_outputEventTypeURIMap
OutputStringMap m_outputUnitMap
QString getPluginMaker() const
static PluginRDFIndexer * getInstance()
OutputStringMap m_outputFeatureAttributeURIMap
OutputStringMap m_outputUriMap
Profile point instance class.