Soprano::Backend Class Reference

Soprano::Backend defines the interface for a Soprano backend plugin. More...

#include <Soprano/Backend>

Inheritance diagram for Soprano::Backend:
[legend]

List of all members.

Public Member Functions

 Backend (const QString &name)
virtual ~Backend ()
virtual StorageModelcreateModel (const BackendSettings &settings=BackendSettings()) const =0
virtual BackendFeatures supportedFeatures () const =0
virtual QStringList supportedUserFeatures () const
bool supportsFeatures (BackendFeatures feature, const QStringList &userFeatures=QStringList()) const


Detailed Description

Soprano::Backend defines the interface for a Soprano backend plugin.

The Backend interface defines two important methods: createModel() and supportedFeatures(). It inherits from Error::ErrorCache for error handling and subclasses should use clearError() and setError() to report the status.

See also:
Writing Soprano Plugins
Author:
Sebastian Trueg <trueg@kde.org>

Definition at line 132 of file backend.h.


Constructor & Destructor Documentation

Soprano::Backend::Backend ( const QString name  ) 

virtual Soprano::Backend::~Backend (  )  [virtual]


Member Function Documentation

virtual StorageModel* Soprano::Backend::createModel ( const BackendSettings settings = BackendSettings()  )  const [pure virtual]

Creates a new RDF model with options. The caller takes ownership and has to care about deletion.

Parameters:
settings The settings that should be used to create the Model. Backend implementations should never ignore settings but rather return 0 if an option is not supported. Backends can, however, define their own default settings. Invalid settings should result in an Error with value Error::ErrorInvalidArgument.
See also:
BackendSetting

virtual BackendFeatures Soprano::Backend::supportedFeatures (  )  const [pure virtual]

Each backend can support a set of features. Backends without any features do not make much sense. If the features include Soprano::BackendFeatureUser additional user features not defined in Backend::BackendFeature can be supported via supportedUserFeatures().

Returns:
A combination of Soprano::BackendFeature values.

virtual QStringList Soprano::Backend::supportedUserFeatures (  )  const [virtual]

A Backend can support additional features that are not defined in Backend::BackendFeature. These user defined features have string identifiers. If a backend supports additional features it has to include Soprano::BackendFeatureUser in supportedFeatures().

The default implementation returns an empty list.

Returns:
the list of supported user features.

bool Soprano::Backend::supportsFeatures ( BackendFeatures  feature,
const QStringList userFeatures = QStringList() 
) const

Check if a backend supports certain features. If feature includes Soprano::BackendFeatureUser the list if userFeatures is also compared.

Returns:
true if the backend does support the requested features, false otherwise.


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 18:57:46 2008 for Soprano by  doxygen 1.5.4