svcore
1.9
|
#include <PluginRDFIndexer.h>
Public Member Functions | |
bool | indexConfiguredURLs () |
Index all URLs obtained from index files defined in the current settings. | |
bool | indexURL (QString url) |
QString | getURIForPluginId (QString pluginId) |
QString | getIdForPluginURI (QString uri) |
QStringList | getIndexedPluginIds () |
const Dataquay::BasicStore * | getIndex () |
~PluginRDFIndexer () | |
Static Public Member Functions | |
static PluginRDFIndexer * | getInstance () |
Protected Types | |
typedef std::map< QString, QString > | StringMap |
Protected Member Functions | |
PluginRDFIndexer () | |
void | indexInstalledURLs () |
bool | pullFile (QString path) |
bool | pullURL (QString urlString) |
bool | reindex () |
Protected Attributes | |
QMutex | m_mutex |
StringMap | m_uriToIdMap |
StringMap | m_idToUriMap |
Dataquay::BasicStore * | m_index |
Static Protected Attributes | |
static PluginRDFIndexer * | m_instance = 0 |
Definition at line 29 of file PluginRDFIndexer.h.
typedef std::map<QString, QString> PluginRDFIndexer::StringMap [protected] |
Definition at line 63 of file PluginRDFIndexer.h.
Definition at line 77 of file PluginRDFIndexer.cpp.
References m_mutex.
PluginRDFIndexer::PluginRDFIndexer | ( | ) | [protected] |
Definition at line 62 of file PluginRDFIndexer.cpp.
References indexInstalledURLs(), and m_index.
Referenced by getInstance().
PluginRDFIndexer * PluginRDFIndexer::getInstance | ( | ) | [static] |
Definition at line 56 of file PluginRDFIndexer.cpp.
References m_instance, and PluginRDFIndexer().
Referenced by RDFTransformFactoryImpl::getTransforms(), PluginRDFDescription::indexMetadata(), PluginRDFDescription::indexOutputs(), PluginRDFDescription::PluginRDFDescription(), RDFTransformFactoryImpl::setOutput(), RDFTransformFactoryImpl::setParameters(), RDFFeatureWriter::write(), and RDFTransformFactoryImpl::writeTransformToRDF().
Index all URLs obtained from index files defined in the current settings.
In contrast to indexing URLs that are installed locally alongside plugins, this is not done automatically because it may incur significant processing and networking effort. It could be called from a background thread at startup, for example.
Note that this class has a single mutex, so other functions will block if called from a different thread while this one is running.
Definition at line 140 of file PluginRDFIndexer.cpp.
References CachedFile::getLocalFilename(), CachedFile::isOK(), pullURL(), reindex(), and SVDEBUG.
Referenced by RDFFeatureWriter::write().
bool PluginRDFIndexer::indexURL | ( | QString | url | ) |
Definition at line 251 of file PluginRDFIndexer.cpp.
References pullURL(), and reindex().
Referenced by getIdForPluginURI().
QString PluginRDFIndexer::getURIForPluginId | ( | QString | pluginId | ) |
Definition at line 187 of file PluginRDFIndexer.cpp.
References m_idToUriMap, and m_mutex.
Referenced by PluginRDFDescription::PluginRDFDescription(), and RDFTransformFactoryImpl::writeTransformToRDF().
QString PluginRDFIndexer::getIdForPluginURI | ( | QString | uri | ) |
Definition at line 196 of file PluginRDFIndexer.cpp.
References indexURL(), m_mutex, and m_uriToIdMap.
Referenced by RDFTransformFactoryImpl::getTransforms().
QStringList PluginRDFIndexer::getIndexedPluginIds | ( | ) |
Definition at line 230 of file PluginRDFIndexer.cpp.
References m_idToUriMap, and m_mutex.
const BasicStore * PluginRDFIndexer::getIndex | ( | ) |
Definition at line 72 of file PluginRDFIndexer.cpp.
References m_index.
Referenced by PluginRDFDescription::indexMetadata(), PluginRDFDescription::indexOutputs(), RDFTransformFactoryImpl::setOutput(), and RDFTransformFactoryImpl::setParameters().
void PluginRDFIndexer::indexInstalledURLs | ( | ) | [protected] |
Definition at line 83 of file PluginRDFIndexer.cpp.
References pullFile(), and reindex().
Referenced by PluginRDFIndexer().
bool PluginRDFIndexer::pullFile | ( | QString | path | ) | [protected] |
Definition at line 243 of file PluginRDFIndexer.cpp.
References pullURL().
Referenced by indexInstalledURLs().
bool PluginRDFIndexer::pullURL | ( | QString | urlString | ) | [protected] |
Definition at line 260 of file PluginRDFIndexer.cpp.
References FileSource::canHandleScheme(), CachedFile::getLocalFilename(), CachedFile::isOK(), FileSource::isRemote(), m_index, and m_mutex.
Referenced by indexConfiguredURLs(), indexURL(), and pullFile().
bool PluginRDFIndexer::reindex | ( | ) | [protected] |
Definition at line 306 of file PluginRDFIndexer.cpp.
References PluginIdentifier::createIdentifier(), m_idToUriMap, m_index, and m_uriToIdMap.
Referenced by indexConfiguredURLs(), indexInstalledURLs(), and indexURL().
QMutex PluginRDFIndexer::m_mutex [protected] |
Definition at line 61 of file PluginRDFIndexer.h.
Referenced by getIdForPluginURI(), getIndexedPluginIds(), getURIForPluginId(), pullURL(), and ~PluginRDFIndexer().
StringMap PluginRDFIndexer::m_uriToIdMap [protected] |
Definition at line 64 of file PluginRDFIndexer.h.
Referenced by getIdForPluginURI(), and reindex().
StringMap PluginRDFIndexer::m_idToUriMap [protected] |
Definition at line 65 of file PluginRDFIndexer.h.
Referenced by getIndexedPluginIds(), getURIForPluginId(), and reindex().
Dataquay::BasicStore* PluginRDFIndexer::m_index [protected] |
Definition at line 73 of file PluginRDFIndexer.h.
Referenced by getIndex(), PluginRDFIndexer(), pullURL(), and reindex().
PluginRDFIndexer * PluginRDFIndexer::m_instance = 0 [static, protected] |
Definition at line 75 of file PluginRDFIndexer.h.
Referenced by getInstance().