• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

soprano

Soprano::FilterModel

Soprano::FilterModel Class Reference

A FilterModel is a virtual model that wraps another Model. More...

#include <Soprano/FilterModel>

Inheritance diagram for Soprano::FilterModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~FilterModel ()



Error::ErrorCode addStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
virtual Error::ErrorCode addStatement (const Statement &statement)
bool containsAnyStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
virtual bool containsAnyStatement (const Statement &statement) const
bool containsStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
virtual bool containsStatement (const Statement &statement) const
virtual Node createBlankNode ()
virtual QueryResultIterator executeQuery (const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
virtual bool isEmpty () const
virtual NodeIterator listContexts () const
StatementIterator listStatements (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
virtual StatementIterator listStatements (const Statement &partial) const
virtual Model * parentModel () const
Error::ErrorCode removeAllStatements (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
virtual Error::ErrorCode removeAllStatements (const Statement &statement)
Error::ErrorCode removeStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
virtual Error::ErrorCode removeStatement (const Statement &statement)
virtual void setParentModel (Model *model)
virtual int statementCount () const
virtual Error::ErrorCode write (QTextStream &os) const

Protected Member Functions

 FilterModel (Model *parent)
 FilterModel ()
virtual void parentStatementAdded (const Statement &)
virtual void parentStatementRemoved (const Statement &)
virtual void parentStatementsAdded ()
virtual void parentStatementsRemoved ()

Detailed Description

A FilterModel is a virtual model that wraps another Model.

FilterModels can be stacked to provide filtering on each of the Model's methods. A FilterModel has a parent model which is the data base for this filter. The parent can be an actual StorageModel or another FilterModel.

Error handling:

The FilterModel "inherits" its parent Model's errors, i.e. FilterModel::lastError() always equals FilterModel::parent()->lastError() (If the FilterModel implementations are called in subclasses).

Author:
Sebastian Trueg <trueg@kde.org>

Definition at line 48 of file filtermodel.h.


Constructor & Destructor Documentation

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

Destructor.

Soprano::FilterModel::FilterModel (  )  [protected]

Create an empty filter model.

Soprano::FilterModel::FilterModel ( Model *  parent  )  [protected]

Create a new FilterModel which works on parent.

Calls setParentModel.

Parameters:
parent The parent Model.

Member Function Documentation

Error::ErrorCode Soprano::FilterModel::addStatement ( const Node &  subject,
const Node &  predicate,
const Node &  object,
const Node &  context = Node() 
)

Reimplemented for convenience.

Calls Model::addStatement(const Node&,const Node&,const Node&,const Node&)

Reimplemented from Soprano::Model.

virtual Error::ErrorCode Soprano::FilterModel::addStatement ( const Statement &  statement  )  [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel, Soprano::Inference::InferenceModel, and Soprano::Index::IndexFilterModel.

bool Soprano::FilterModel::containsAnyStatement ( const Node &  subject,
const Node &  predicate,
const Node &  object,
const Node &  context = Node() 
) const

Reimplemented for convenience.

Calls Model::containsAnyStatement(const Node&,const Node&,const Node&,const Node&)

Reimplemented from Soprano::Model.

virtual bool Soprano::FilterModel::containsAnyStatement ( const Statement &  statement  )  const [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel.

bool Soprano::FilterModel::containsStatement ( const Node &  subject,
const Node &  predicate,
const Node &  object,
const Node &  context = Node() 
) const

Reimplemented for convenience.

Calls Model::containsStatement(const Node&,const Node&,const Node&,const Node&)

Reimplemented from Soprano::Model.

virtual bool Soprano::FilterModel::containsStatement ( const Statement &  statement  )  const [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel.

virtual Node Soprano::FilterModel::createBlankNode (  )  [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

virtual QueryResultIterator Soprano::FilterModel::executeQuery ( const QString &  query,
Query::QueryLanguage  language,
const QString &  userQueryLanguage = QString() 
) const [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel, and Soprano::Index::IndexFilterModel.

virtual bool Soprano::FilterModel::isEmpty (  )  const [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel.

virtual NodeIterator Soprano::FilterModel::listContexts (  )  const [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel.

StatementIterator Soprano::FilterModel::listStatements ( const Node &  subject,
const Node &  predicate,
const Node &  object,
const Node &  context = Node() 
) const

Reimplemented for convenience.

Calls Model::listStatements(const Node&,const Node&,const Node&,const Node&)

Reimplemented from Soprano::Model.

virtual StatementIterator Soprano::FilterModel::listStatements ( const Statement &  partial  )  const [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel.

virtual Model* Soprano::FilterModel::parentModel (  )  const [virtual]

Get the parent model.

Returns:
The parent Model or 0 if none has been set.
virtual void Soprano::FilterModel::parentStatementAdded ( const Statement &   )  [protected, virtual]

Handle a statementsAdded() signal from the parent Model.

The default implementation simply re-emits the signal.

virtual void Soprano::FilterModel::parentStatementRemoved ( const Statement &   )  [protected, virtual]

Handle a statementsRemoved() signal from the parent Model.

The default implementation simply re-emits the signal.

virtual void Soprano::FilterModel::parentStatementsAdded (  )  [protected, virtual]

Handle a statementsAdded() signal from the parent Model.

The default implementation simply re-emits the signal.

Reimplemented in Soprano::Util::SignalCacheModel.

virtual void Soprano::FilterModel::parentStatementsRemoved (  )  [protected, virtual]

Handle a statementsRemoved() signal from the parent Model.

The default implementation simply re-emits the signal.

Reimplemented in Soprano::Util::SignalCacheModel.

Error::ErrorCode Soprano::FilterModel::removeAllStatements ( const Node &  subject,
const Node &  predicate,
const Node &  object,
const Node &  context = Node() 
)

Reimplemented for convenience.

Calls Model::removeAllStatements(const Node&,const Node&,const Node&,const Node&)

Reimplemented from Soprano::Model.

virtual Error::ErrorCode Soprano::FilterModel::removeAllStatements ( const Statement &  statement  )  [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel, Soprano::Inference::InferenceModel, and Soprano::Index::IndexFilterModel.

Error::ErrorCode Soprano::FilterModel::removeStatement ( const Node &  subject,
const Node &  predicate,
const Node &  object,
const Node &  context = Node() 
)

Reimplemented for convenience.

Calls Model::removeStatement(const Node&,const Node&,const Node&,const Node&)

Reimplemented from Soprano::Model.

virtual Error::ErrorCode Soprano::FilterModel::removeStatement ( const Statement &  statement  )  [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel, Soprano::Inference::InferenceModel, and Soprano::Index::IndexFilterModel.

virtual void Soprano::FilterModel::setParentModel ( Model *  model  )  [virtual]

Set the parent Model.

Parameters:
model The Model that this filter will forward any commands to.
virtual int Soprano::FilterModel::statementCount (  )  const [virtual]

Default implementation simply pipes the call through to the parent model.

Implements Soprano::Model.

Reimplemented in Soprano::Util::MutexModel.

virtual Error::ErrorCode Soprano::FilterModel::write ( QTextStream &  os  )  const [virtual]

Default implementation simply pipes the call through to the parent model.

Reimplemented from Soprano::Model.


The documentation for this class was generated from the following file:
  • filtermodel.h

soprano

Skip menu "soprano"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal