# class ReadOnlyModel

###

Module | soprano
Namespace | Soprano::Util
Class | ReadOnlyModel
Inherits | Soprano::Model

\class ReadOnlyModel readonlymodel.h Soprano/Util/ReadOnlyModel

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

### methods

- ReadOnlyModel (parentModel)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parentModel | Soprano.Model | 0

  Create a new read-only-model

  parentModel - The parent Model.

- addStatement (statement)

  returns Soprano.Error.ErrorCode

  Argument | Type | Default
  --- | --- | ---
  statement | Soprano.Statement |

  Will do nothing but set an Error.ErrorPermissionDenied error.

- containsAnyStatement (statement)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  statement | Soprano.Statement |

  Simply pipes the call through to the parent model.

- containsStatement (statement)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  statement | Soprano.Statement |

  Simply pipes the call through to the parent model.

- createBlankNode ( )

  returns Soprano.Node

  Will do nothing but set an Error.ErrorPermissionDenied error.

- executeQuery (query, language, userQueryLanguage)

  returns Soprano.QueryResultIterator

  Argument | Type | Default
  --- | --- | ---
  query | QString |
  language | Soprano.Query.QueryLanguage |
  userQueryLanguage | QString | QString()

  Simply pipes the call through to the parent model.

- isEmpty ( )

  returns bool

  Simply pipes the call through to the parent model.

- listContexts ( )

  returns Soprano.NodeIterator

  Simply pipes the call through to the parent model.

- listStatements (partial)

  returns Soprano.StatementIterator

  Argument | Type | Default
  --- | --- | ---
  partial | Soprano.Statement |

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

- removeAllStatements (statement)

  returns Soprano.Error.ErrorCode

  Argument | Type | Default
  --- | --- | ---
  statement | Soprano.Statement |

  Will do nothing but set an Error.ErrorPermissionDenied error.

- removeStatement (statement)

  returns Soprano.Error.ErrorCode

  Argument | Type | Default
  --- | --- | ---
  statement | Soprano.Statement |

  Will do nothing but set an Error.ErrorPermissionDenied error.

- setParentModel (model)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  model | Soprano.Model |

  Set the parent Model.

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

- statementCount ( )

  returns int

  Simply pipes the call through to the parent model.