Soprano::Util::ReadOnlyModel Class Reference

Simple filter model preventing any write operations. More...

#include <Soprano/Util/ReadOnlyModel>

Inheritance diagram for Soprano::Util::ReadOnlyModel:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ReadOnlyModel (Model *parentModel=0)
 ~ReadOnlyModel ()
void setParentModel (Model *model)
StatementIterator listStatements (const Statement &partial) const
NodeIterator listContexts () const
QueryResultIterator executeQuery (const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
bool containsStatement (const Statement &statement) const
bool containsAnyStatement (const Statement &statement) const
bool isEmpty () const
int statementCount () const
Error::ErrorCode addStatement (const Statement &statement)
Error::ErrorCode removeStatement (const Statement &statement)
Error::ErrorCode removeAllStatements (const Statement &statement)
Node createBlankNode ()


Detailed Description

Simple filter model preventing any write operations.

Stacking a ReadOnlyModel on top of another model will prevent any write operation to be performed. All calls to non-const methods are terminated by Error::ErrorPermissionDenied.

Author:
Sebastian Trueg <trueg@kde.org>
Since:
2.1

Definition at line 42 of file readonlymodel.h.


Constructor & Destructor Documentation

Soprano::Util::ReadOnlyModel::ReadOnlyModel ( Model parentModel = 0  ) 

Create a new read-only-model

Parameters:
parentModel The parent Model.

Soprano::Util::ReadOnlyModel::~ReadOnlyModel (  ) 

Destructor


Member Function Documentation

void Soprano::Util::ReadOnlyModel::setParentModel ( Model model  ) 

Set the parent Model.

Parameters:
model The Model that this filter will forward any commands to.

StatementIterator Soprano::Util::ReadOnlyModel::listStatements ( const Statement partial  )  const [virtual]

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

Implements Soprano::Model.

NodeIterator Soprano::Util::ReadOnlyModel::listContexts (  )  const [virtual]

Simply pipes the call through to the parent model.

Implements Soprano::Model.

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

Simply pipes the call through to the parent model.

Implements Soprano::Model.

bool Soprano::Util::ReadOnlyModel::containsStatement ( const Statement statement  )  const [virtual]

Simply pipes the call through to the parent model.

Implements Soprano::Model.

bool Soprano::Util::ReadOnlyModel::containsAnyStatement ( const Statement statement  )  const [virtual]

Simply pipes the call through to the parent model.

Implements Soprano::Model.

bool Soprano::Util::ReadOnlyModel::isEmpty (  )  const [virtual]

Simply pipes the call through to the parent model.

Implements Soprano::Model.

int Soprano::Util::ReadOnlyModel::statementCount (  )  const [virtual]

Simply pipes the call through to the parent model.

Implements Soprano::Model.

Error::ErrorCode Soprano::Util::ReadOnlyModel::addStatement ( const Statement statement  )  [virtual]

Will do nothing but set an Error::ErrorPermissionDenied error.

Implements Soprano::Model.

Error::ErrorCode Soprano::Util::ReadOnlyModel::removeStatement ( const Statement statement  )  [virtual]

Will do nothing but set an Error::ErrorPermissionDenied error.

Implements Soprano::Model.

Error::ErrorCode Soprano::Util::ReadOnlyModel::removeAllStatements ( const Statement statement  )  [virtual]

Will do nothing but set an Error::ErrorPermissionDenied error.

Implements Soprano::Model.

Node Soprano::Util::ReadOnlyModel::createBlankNode (  )  [virtual]

Will do nothing but set an Error::ErrorPermissionDenied error.

Implements Soprano::Model.


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

Generated on Tue Jul 22 17:39:37 2008 for Soprano by  doxygen 1.5.6