#include <PluginRDFIndexer.h>

Collaboration diagram for PluginRDFIndexer:
Collaboration graph

Public Member Functions

bool indexConfiguredURLs ()
 Index all URLs obtained from index files defined in the current settings. More...
 
bool indexURL (QString url)
 
QString getURIForPluginId (QString pluginId)
 
QString getIdForPluginURI (QString uri)
 
QStringList getIndexedPluginIds ()
 
void performConsistencyChecks ()
 Perform various checks for consistency of RDF definitions, printing warnings to stderr/logfile as appropriate. More...
 
const Dataquay::BasicStore * getIndex ()
 
 ~PluginRDFIndexer ()
 

Static Public Member Functions

static PluginRDFIndexergetInstance ()
 

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 PluginRDFIndexerm_instance = nullptr
 

Detailed Description

Definition at line 29 of file PluginRDFIndexer.h.

Member Typedef Documentation

typedef std::map<QString, QString> PluginRDFIndexer::StringMap
protected

Definition at line 69 of file PluginRDFIndexer.h.

Constructor & Destructor Documentation

PluginRDFIndexer::~PluginRDFIndexer ( )

Definition at line 78 of file PluginRDFIndexer.cpp.

References m_mutex.

PluginRDFIndexer::PluginRDFIndexer ( )
protected

Definition at line 63 of file PluginRDFIndexer.cpp.

References indexInstalledURLs(), and m_index.

Referenced by getInstance().

Member Function Documentation

bool PluginRDFIndexer::indexConfiguredURLs ( )

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 141 of file PluginRDFIndexer.cpp.

References CachedFile::getLocalFilename(), CachedFile::isOK(), pullURL(), reindex(), and SVDEBUG.

Referenced by TransformFactory::populateUninstalledTransforms(), and RDFFeatureWriter::write().

bool PluginRDFIndexer::indexURL ( QString  url)

Definition at line 274 of file PluginRDFIndexer.cpp.

References pullURL(), and reindex().

Referenced by getIdForPluginURI().

QString PluginRDFIndexer::getURIForPluginId ( QString  pluginId)
QString PluginRDFIndexer::getIdForPluginURI ( QString  uri)

Definition at line 219 of file PluginRDFIndexer.cpp.

References indexURL(), m_mutex, m_uriToIdMap, and SVDEBUG.

Referenced by RDFTransformFactoryImpl::getTransforms().

QStringList PluginRDFIndexer::getIndexedPluginIds ( )

Definition at line 253 of file PluginRDFIndexer.cpp.

References m_idToUriMap, and m_mutex.

Referenced by TransformFactory::populateUninstalledTransforms().

void PluginRDFIndexer::performConsistencyChecks ( )

Perform various checks for consistency of RDF definitions, printing warnings to stderr/logfile as appropriate.

Definition at line 189 of file PluginRDFIndexer.cpp.

References m_index, and SVCERR.

Referenced by TransformFactory::populateUninstalledTransforms().

const BasicStore * PluginRDFIndexer::getIndex ( )
void PluginRDFIndexer::indexInstalledURLs ( )
protected

Definition at line 84 of file PluginRDFIndexer.cpp.

References pullFile(), and reindex().

Referenced by PluginRDFIndexer().

bool PluginRDFIndexer::pullFile ( QString  path)
protected

Definition at line 266 of file PluginRDFIndexer.cpp.

References pullURL().

Referenced by indexInstalledURLs().

bool PluginRDFIndexer::pullURL ( QString  urlString)
protected
bool PluginRDFIndexer::reindex ( )
protected

Member Data Documentation

QMutex PluginRDFIndexer::m_mutex
protected
StringMap PluginRDFIndexer::m_uriToIdMap
protected

Definition at line 70 of file PluginRDFIndexer.h.

Referenced by getIdForPluginURI(), and reindex().

StringMap PluginRDFIndexer::m_idToUriMap
protected

Definition at line 71 of file PluginRDFIndexer.h.

Referenced by getIndexedPluginIds(), getURIForPluginId(), and reindex().

Dataquay::BasicStore* PluginRDFIndexer::m_index
protected
PluginRDFIndexer * PluginRDFIndexer::m_instance = nullptr
staticprotected

Definition at line 81 of file PluginRDFIndexer.h.

Referenced by getInstance().


The documentation for this class was generated from the following files: