KDE 4.9 PyKDE API Reference

- KDE's Python API

# StorageModel Class Reference

`from PyKDE4.soprano import *`

Inherits: Soprano.Model → QObject
Subclasses: Soprano.Client.DBusModel
Namespace: Soprano

## Detailed Description

\class StorageModel storagemodel.h Soprano/StorageModel

Base class for all Model implementations that store data (as compared to FilterModel).

The StorageModel implements some of the methods from Model which may be equal for different backends.

\sa Backend.createModel()

Author:
  Sebastian Trueg <trueg@kde.org>

## Methods

| __init__ (self, Soprano.Backend backend)
Soprano.Backend | backend (self)
bool | containsAnyStatement (self, Soprano.Statement statement)
bool | containsStatement (self, Soprano.Statement statement)
bool | isEmpty (self)
Soprano.Error.ErrorCode | removeAllStatements (self, Soprano.Statement statement)

## Method Documentation

__init__ | ( | self, |
|  | Soprano.Backend | backend
| ) |  |  |

Parameters:

  | backend | The Backend that created this model.

Soprano.Backend backend | ( |  | self ) |

Returns:
  The backend that was used to create this model.

bool containsAnyStatement | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

Default implementation is based on Model.listStatements

bool containsStatement | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

Default implementation is based on Model.listStatements

bool isEmpty | ( |  | self ) |

Default implementation is based on Model.statementCount

Soprano.Error.ErrorCode removeAllStatements | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

Default implementation is based on listStatements() and removeStatement().