Soprano  2.7.56
Public Member Functions | Static Public Member Functions | Related Functions
Soprano::PluginManager Class Reference

The PluginManager loads and maintains all Soprano plugins. More...

#include <Soprano/PluginManager>

+ Inheritance diagram for Soprano::PluginManager:

List of all members.

Public Member Functions

 ~PluginManager ()
void setPluginSearchPath (const QStringList &path, bool useDefaults=true)
bool loadCustomPlugin (const QString &path)
const BackendloadCustomBackend (const QString &path)
const ParserloadCustomParser (const QString &path)
const SerializerloadCustomSerializer (const QString &path)
const BackenddiscoverBackendByName (const QString &name)
const BackenddiscoverBackendByFeatures (BackendFeatures features, const QStringList &userFeatures=QStringList())
QList< const Backend * > allBackends ()
const ParserdiscoverParserByName (const QString &name)
const ParserdiscoverParserForSerialization (RdfSerialization serialization, const QString &userSerialization=QString())
QList< const Parser * > allParsers ()
const SerializerdiscoverSerializerByName (const QString &name)
const SerializerdiscoverSerializerForSerialization (RdfSerialization serialization, const QString &userSerialization=QString())
QList< const Serializer * > allSerializers ()

Static Public Member Functions

static PluginManagerinstance ()

Related Functions

(Note that these are not member functions.)

SOPRANO_EXPORT const BackenddiscoverBackendByName (const QString &name)
SOPRANO_EXPORT const BackenddiscoverBackendByFeatures (BackendFeatures features, const QStringList &userFeatures=QStringList())
SOPRANO_EXPORT void setUsedBackend (const Backend *)
SOPRANO_EXPORT const BackendusedBackend ()

Detailed Description

The PluginManager loads and maintains all Soprano plugins.

Normally there is no need to use this class as all important methods have global counterparts in the Soprano namespace.

See also:
Writing Soprano Plugins
Author:
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org

Definition at line 55 of file pluginmanager.h.


Constructor & Destructor Documentation


Member Function Documentation

void Soprano::PluginManager::setPluginSearchPath ( const QStringList path,
bool  useDefaults = true 
)

Set the plugin search path. The PluginManager searches a set of folders for installed plugins. Here a plugin consists of a desktop file describing it and the actual plugin library file. For loading custom plugins manually see loadCustomPlugin.

Parameters:
pathThe folders that PluginManager should search for plugin description files.
useDefaultsIf true PluginManager will also search the default plugin paths
See also:
Writing Soprano Plugins
Since:
2.3

Load a custom plugin from a library at the specified path.

Parameters:
pathThe path to the library file that contains the plugin. Be aware that plugins loaded via this method do not need a desktop file as described

PluginManager uses the name the plugin provides (Plugin::pluginName) to manage the plugin.

Returns:
true if the plugin could be loaded successfully, false if no suported plugin could be found at path.
Since:
2.3

Load a custom Backend plugin from a library at the specified path.

Parameters:
pathThe path to the library file that contains the plugin.

PluginManager uses the name the plugin provides (Plugin::pluginName) to manage the plugin.

Returns:
The loaded Backend plugin or 0 in case no suported plugin could be found at path or the found plugin is not a backend.
Since:
2.3

Load a custom Parser plugin from a library at the specified path.

Parameters:
pathThe path to the library file that contains the plugin.

PluginManager uses the name the plugin provides (Plugin::pluginName) to manage the plugin.

Returns:
The loaded Parser plugin or 0 in case no suported plugin could be found at path or the found plugin is not a backend.
Since:
2.3

Load a custom Serializer plugin from a library at the specified path.

Parameters:
pathThe path to the library file that contains the plugin.

PluginManager uses the name the plugin provides (Plugin::pluginName) to manage the plugin.

Returns:
The loaded Serializer plugin or 0 in case no suported plugin could be found at path or the found plugin is not a backend.
Since:
2.3

Find a backend plugin by its name.

Returns:
the backend specified by name or null if could not be found.
const Backend* Soprano::PluginManager::discoverBackendByFeatures ( BackendFeatures  features,
const QStringList userFeatures = QStringList() 
)

Find a backend plugin by its features.

Parameters:
featuresThe features that are requested, a combination of Soprano::BackendFeature flags.
userFeaturesIf features contain Backend::BackendFeatureUser this paramter states the additionally requested user features.
Returns:
a Backend that supports the features defined in features.

Find a backend plugin by its name.

Returns:
the backend specified by name or null if could not be found.

Find a parser plugin by its name.

Returns:
the parser specified by name or null if could not be found.
const Parser* Soprano::PluginManager::discoverParserForSerialization ( RdfSerialization  serialization,
const QString userSerialization = QString() 
)

Find a Parser instance that is able to parse RDF data serialized as serialization.

Parameters:
serializationThe requested serialization.
userSerializationIf serialization is set to Soprano::SerializationUser this parameter specifies the serialization to use. It allows the extension of the Soprano Parser interface with new RDF serializations that are not officially supported by Soprano.
Returns:
A Parser plugin that can parse RDF data encoded in the requested serialization or 0 if no such plugin could be found.

Find a parser plugin by its name.

Returns:
the parser specified by name or null if could not be found.

Find a serializer plugin by its name.

Returns:
the serializer specified by name or null if could not be found.
const Serializer* Soprano::PluginManager::discoverSerializerForSerialization ( RdfSerialization  serialization,
const QString userSerialization = QString() 
)

Find a Serializer instance that is able to encode RDF data using serialization.

Parameters:
serializationThe requested serialization.
userSerializationIf serialization is set to Soprano::SerializationUser this parameter specifies the serialization to use. It allows the extension of the Soprano Serializer interface with new RDF serializations that are not officially supported by Soprano.
Returns:
A Serializer plugin that can serialize RDF data encoded in the requested serialization or 0 if no such plugin could be found.

Find a serializer plugin by its name.

Returns:
the serializer specified by name or null if could not be found.

query_api_disabled Get the singleton instance of the PluginManager


Friends And Related Function Documentation

SOPRANO_EXPORT const Backend * discoverBackendByName ( const QString name) [related]

Find a backend plugin by its name.

Returns:
the backend specified by name or null if could not be found.
See also:
PluginManager::discoverBackendByName()
SOPRANO_EXPORT const Backend * discoverBackendByFeatures ( BackendFeatures  features,
const QStringList userFeatures = QStringList() 
) [related]

Find a backend plugin by its features.

Parameters:
featuresThe features that are requested.
userFeaturesIf features contain Soprano::BackendFeatureUser this paramter states the additionally requested user features.
Returns:
a backend that supports the features defined in features.
See also:
PluginManager::discoverBackendByFeatures()
SOPRANO_EXPORT void setUsedBackend ( const Backend ) [related]

Set the Backend to globally use in createModel.

By default and if available backend "redland" is used.

SOPRANO_EXPORT const Backend * usedBackend ( ) [related]

Retrieve the Backend to globally use in createModel.

Can be set via setUsedBackend.


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