Mercurial > hg > svcore
comparison rdf/PluginRDFIndexer.h @ 489:82ab61fa9223
* Reorganise our sparql queries on the basis that Redland must be
available, not only optional. So for anything querying the pool
of data about plugins, we use a single datastore and model which
is initialised at the outset by PluginRDFIndexer and then queried
directly; for anything that "reads from a file" (e.g. loading
annotations) we query directly using Rasqal, going to the
datastore when we need additional plugin-related information.
This may improve performance, but mostly it simplifies the code
and fixes a serious issue with RDF import in the previous versions
(namely that multiple sequential RDF imports would end up sharing
the same RDF data pool!)
author | Chris Cannam |
---|---|
date | Fri, 21 Nov 2008 16:12:29 +0000 |
parents | e0784311a103 |
children | e340b2fb9471 |
comparison
equal
deleted
inserted
replaced
488:1c66e199e7d9 | 489:82ab61fa9223 |
---|---|
43 | 43 |
44 bool indexURL(QString url); // in addition to "installed" URLs | 44 bool indexURL(QString url); // in addition to "installed" URLs |
45 | 45 |
46 QString getURIForPluginId(QString pluginId); | 46 QString getURIForPluginId(QString pluginId); |
47 QString getIdForPluginURI(QString uri); | 47 QString getIdForPluginURI(QString uri); |
48 QString getDescriptionURLForPluginId(QString pluginId); | |
49 QString getDescriptionURLForPluginURI(QString uri); | |
50 | 48 |
51 QStringList getIndexedPluginIds(); | 49 QStringList getIndexedPluginIds(); |
52 | 50 |
53 ~PluginRDFIndexer(); | 51 ~PluginRDFIndexer(); |
54 | 52 |
57 QMutex m_mutex; | 55 QMutex m_mutex; |
58 | 56 |
59 typedef std::map<QString, QString> StringMap; | 57 typedef std::map<QString, QString> StringMap; |
60 StringMap m_uriToIdMap; | 58 StringMap m_uriToIdMap; |
61 StringMap m_idToUriMap; | 59 StringMap m_idToUriMap; |
62 StringMap m_idToDescriptionMap; | |
63 | 60 |
64 void indexInstalledURLs(); | 61 void indexInstalledURLs(); |
65 bool indexFile(QString path); | 62 |
63 bool pullFile(QString path); | |
64 bool pullURL(QString urlString); | |
65 bool reindex(); | |
66 | |
66 static PluginRDFIndexer *m_instance; | 67 static PluginRDFIndexer *m_instance; |
67 }; | 68 }; |
68 | 69 |
69 #endif | 70 #endif |
70 | 71 |