Soprano 2.9.4
Public Member Functions | Protected Member Functions | List of all members
Soprano::StorageModel Class Reference

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

#include <Soprano/StorageModel>

+ Inheritance diagram for Soprano::StorageModel:

Public Member Functions

virtual ~StorageModel ()
 
virtual bool isEmpty () const
 
virtual bool containsStatement (const Statement &statement) const
 
virtual bool containsAnyStatement (const Statement &statement) const
 
virtual Error::ErrorCode removeAllStatements (const Statement &statement)
 
const Backendbackend () const
 
virtual Error::ErrorCode removeAllStatements (const Statement &statement)=0
 
Error::ErrorCode removeAllStatements (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
 
Error::ErrorCode removeAllStatements ()
 
virtual bool containsStatement (const Statement &statement) const=0
 
bool containsStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
virtual bool containsAnyStatement (const Statement &statement) const=0
 
bool containsAnyStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
- Public Member Functions inherited from Soprano::Model
virtual ~Model ()
 
virtual Error::ErrorCode addStatement (const Statement &statement)=0
 
Error::ErrorCode addStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
 
Error::ErrorCode addStatements (const QList< Statement > &statements)
 
virtual Error::ErrorCode removeStatement (const Statement &statement)=0
 
Error::ErrorCode removeStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
 
virtual Error::ErrorCode removeAllStatements (const Statement &statement)=0
 
Error::ErrorCode removeAllStatements (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
 
Error::ErrorCode removeStatements (const QList< Statement > &statements)
 
Error::ErrorCode removeContext (const Node &)
 
Error::ErrorCode removeAllStatements ()
 
virtual StatementIterator listStatements (const Statement &partial) const =0
 
StatementIterator listStatements (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
StatementIterator listStatements () const
 
StatementIterator listStatementsInContext (const Node &context) const
 
virtual NodeIterator listContexts () const =0
 
virtual QueryResultIterator executeQuery (const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const =0
 
virtual bool containsAnyStatement (const Statement &statement) const =0
 
bool containsAnyStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
virtual bool containsStatement (const Statement &statement) const =0
 
bool containsStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
bool containsContext (const Node &context) const
 
virtual bool isEmpty () const =0
 
virtual int statementCount () const =0
 
virtual Error::ErrorCode write (QTextStream &os) const
 
virtual Node createBlankNode ()=0
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent=0)
 
 blockSignals (bool block)
 
 childEvent (QChildEvent *event)
 
 children ()
 
 connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoCompatConnection)
 
 connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type=Qt::AutoCompatConnection)
 
 connectNotify (const char *signal)
 
 customEvent (QEvent *event)
 
 deleteLater ()
 
 destroyed (QObject *obj=0)
 
 disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
 disconnect (const char *signal=0, const QObject *receiver=0, const char *method=0)
 
 disconnect (const QObject *receiver, const char *method=0)
 
 disconnectNotify (const char *signal)
 
 dumpObjectInfo ()
 
 dumpObjectTree ()
 
 dynamicPropertyNames ()
 
 event (QEvent *e)
 
 eventFilter (QObject *watched, QEvent *event)
 
 findChild (const QString &name=QString()
 
 findChildren (const QString &name=QString()
 
 findChildren (const QRegExp &regExp)
 
 inherits (const char *className)
 
 installEventFilter (QObject *filterObj)
 
 isWidgetType ()
 
 killTimer (int id)
 
 metaObject ()
 
 moveToThread (QThread *targetThread)
 
 parent ()
 
 property (const char *name)
 
 receivers (const char *signal)
 
 removeEventFilter (QObject *obj)
 
 sender ()
 
 setParent (QObject *parent)
 
 setProperty (const char *name, const QVariant &value)
 
 signalsBlocked ()
 
 startTimer (int interval)
 
 thread ()
 
 timerEvent (QTimerEvent *event)
 
 tr (const char *sourceText, const char *comment=0, int n=-1)
 
 trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 
 staticMetaObject
 
 QObject (QObject *parent, const char *name)
 
 checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
 child (const char *objName, const char *inheritsClass=0, bool recursiveSearch=true)
 
 className ()
 
 insertChild (QObject *object)
 
 isA (const char *className)
 
 name ()
 
 name (const char *defaultName)
 
 normalizeSignalSlot (const char *signalSlot)
 
 removeChild (QObject *object)
 
 setName (const char *name)
 
- Public Member Functions inherited from Soprano::Error::ErrorCache
virtual ~ErrorCache ()
 
virtual Error lastError () const
 

Protected Member Functions

 StorageModel (const Backend *backend)
 
- Protected Member Functions inherited from Soprano::Model
 Model ()
 
- Protected Member Functions inherited from Soprano::Error::ErrorCache
 ErrorCache ()
 
void clearError () const
 
void setError (const Error &) const
 
void setError (const QString &errorMessage, int code=ErrorUnknown) const
 

Additional Inherited Members

- Signals inherited from Soprano::Model
void statementsAdded ()
 
void statementsRemoved ()
 
void statementAdded (const Soprano::Statement &statement)
 
void statementRemoved (const Soprano::Statement &statement)
 

Detailed Description

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.

See also
Backend::createModel()
Author
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org

Definition at line 44 of file storagemodel.h.

Constructor & Destructor Documentation

◆ ~StorageModel()

virtual Soprano::StorageModel::~StorageModel ( )
virtual

◆ StorageModel()

Soprano::StorageModel::StorageModel ( const Backend backend)
protected
Parameters
backendThe Backend that created this model.

Member Function Documentation

◆ isEmpty()

virtual bool Soprano::StorageModel::isEmpty ( ) const
virtual

Default implementation is based on Model::statementCount

Implements Soprano::Model.

Reimplemented in Soprano::Client::DBusModel.

◆ containsStatement() [1/3]

virtual bool Soprano::StorageModel::containsStatement ( const Statement statement) const
virtual

Default implementation is based on Model::listStatements

Implements Soprano::Model.

Reimplemented in Soprano::Client::DBusModel, Soprano::Client::DBusModel, and Soprano::Client::DBusModel.

◆ containsAnyStatement() [1/3]

virtual bool Soprano::StorageModel::containsAnyStatement ( const Statement statement) const
virtual

Default implementation is based on Model::listStatements

Implements Soprano::Model.

Reimplemented in Soprano::Client::DBusModel, Soprano::Client::DBusModel, and Soprano::Client::DBusModel.

◆ removeAllStatements() [1/4]

virtual Error::ErrorCode Soprano::StorageModel::removeAllStatements ( const Statement statement)
virtual

◆ backend()

const Backend * Soprano::StorageModel::backend ( ) const
Returns
The backend that was used to create this model.

◆ removeAllStatements() [2/4]

virtual Error::ErrorCode Soprano::Model::removeAllStatements ( const Statement statement)
virtual

Remove all statements that match the partial statement. For removing one specific statement see removeStatement().

Parameters
statementA possible partially defined statement that serves as a filter for all statements that should be removed.

Implements Soprano::Model.

◆ removeAllStatements() [3/4]

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
subjectThe subject node to match. Can be empty as a wildcard.
predicateThe predicate node to match. Can be empty as a wildcard.
objectThe object node to match. Can be empty as a wildcard.
contextThe context node to match. Can be empty as a wildcard.

◆ removeAllStatements() [4/4]

Error::ErrorCode Soprano::Model::removeAllStatements ( )

Convenience method that clear the Model of all statements

◆ containsStatement() [2/3]

virtual bool Soprano::Model::containsStatement ( const Statement statement) const
virtual

Check if the model contains a statements.

Parameters
statementThe statement in question. This has to be a valid statement, i.e. subject, predicate, and object need to be defined. If the context node is empty the default graph is searched.
Returns
true if the Model contains the Statement, false otherwise or is statement is invalid.

Implements Soprano::Model.

◆ containsStatement() [3/3]

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ containsAnyStatement() [2/3]

virtual bool Soprano::Model::containsAnyStatement ( const Statement statement) const
virtual

Check if the model contains certain statements.

Parameters
statementA partially defined statement that serves as a pattern.
Returns
true if the Model contains a Statement matching the given statement pattern.

Implements Soprano::Model.

◆ containsAnyStatement() [3/3]

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
subjectThe subject node to match. Can be empty as a wildcard.
predicateThe predicate node to match. Can be empty as a wildcard.
objectThe object node to match. Can be empty as a wildcard.
contextThe context node to match. Can be empty as a wildcard.

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