|
Soprano
2.9.2
|
Filter model that allows to perform operations asyncroneously. More...
#include <Soprano/Server/AsyncModel>
Inheritance diagram for Soprano::Util::AsyncModel:Public Types | |
| enum | AsyncModelMode { SingleThreaded, MultiThreaded } |
Public Member Functions | |
| AsyncModel (Model *parent=0) | |
| ~AsyncModel () | |
| void | setMode (AsyncModelMode mode) |
| AsyncModelMode | mode () const |
| AsyncResult * | addStatementAsync (const Statement &statement) |
| AsyncResult * | addStatementAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) |
| AsyncResult * | addStatementsAsync (const QList< Statement > &statements) |
| AsyncResult * | removeStatementAsync (const Statement &statement) |
| AsyncResult * | removeStatementAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) |
| AsyncResult * | removeStatementsAsync (const QList< Statement > &statements) |
| AsyncResult * | removeAllStatementsAsync (const Statement &statement) |
| AsyncResult * | removeAllStatementsAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) |
| AsyncResult * | isEmptyAsync () const |
| AsyncResult * | statementCountAsync () const |
| AsyncResult * | listStatementsAsync (const Statement &statement) const |
| AsyncResult * | listStatementsAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const |
| AsyncResult * | listStatementsAsync () const |
| AsyncResult * | listContextsAsync () const |
| AsyncResult * | executeQueryAsync (const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const |
| AsyncResult * | containsStatementAsync (const Statement &statement) const |
| AsyncResult * | containsStatementAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const |
| AsyncResult * | containsAnyStatementAsync (const Statement &statement) const |
| AsyncResult * | containsAnyStatementAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const |
| AsyncResult * | createBlankNodeAsync () |
| StatementIterator | listStatements (const Statement &partial) const |
| NodeIterator | listContexts () const |
| QueryResultIterator | executeQuery (const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const |
Public Member Functions inherited from Soprano::FilterModel | |
| virtual | ~FilterModel () |
| virtual void | setParentModel (Model *model) |
| virtual Model * | parentModel () const |
| virtual Error::ErrorCode | addStatement (const Statement &statement) |
| Error::ErrorCode | addStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) |
| virtual Error::ErrorCode | removeStatement (const Statement &statement) |
| Error::ErrorCode | removeStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) |
| virtual Error::ErrorCode | removeAllStatements (const Statement &statement) |
| Error::ErrorCode | removeAllStatements (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) |
| StatementIterator | listStatements (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const |
| virtual bool | containsStatement (const Statement &statement) const |
| bool | containsStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const |
| virtual bool | containsAnyStatement (const Statement &statement) const |
| bool | containsAnyStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const |
| virtual bool | isEmpty () const |
| virtual int | statementCount () const |
| virtual Error::ErrorCode | write (QTextStream &os) const |
| virtual Node | createBlankNode () |
Public Member Functions inherited from Soprano::Model | |
| virtual | ~Model () |
| Error::ErrorCode | addStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) |
| Error::ErrorCode | addStatements (const QList< Statement > &statements) |
| Error::ErrorCode | removeStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) |
| 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 () |
| 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 |
| bool | containsAnyStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const |
| bool | containsStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const |
| bool | containsContext (const Node &context) const |
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 ®Exp) | |
| 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 |
Additional Inherited Members | |
Signals inherited from Soprano::Model | |
| void | statementsAdded () |
| void | statementsRemoved () |
| void | statementAdded (const Soprano::Statement &statement) |
| void | statementRemoved (const Soprano::Statement &statement) |
Protected Member Functions inherited from Soprano::FilterModel | |
| FilterModel () | |
| FilterModel (Model *parent) | |
| virtual void | parentStatementsAdded () |
| virtual void | parentStatementsRemoved () |
| virtual void | parentStatementAdded (const Statement &) |
| virtual void | parentStatementRemoved (const Statement &) |
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 |
Filter model that allows to perform operations asyncroneously.
AsyncModel has two modes: AsyncModel::SingleThreaded and AsyncModel::MultiThreaded. The main purpose of the AsyncModel::SingleThreaded mode is to protect a Model against deadlocks in a single threaded situation.
AsyncModel::MultiThreaded mode provides real asyncroneous execution of Model commands.
Usage:
Definition at line 67 of file asyncmodel.h.
The mode of the model, single vs. multi threaded execution.
Definition at line 89 of file asyncmodel.h.
| Soprano::Util::AsyncModel::AsyncModel | ( | Model * | parent = 0 | ) |
Create a new Model.
| parent | The parent model to forward the operations to. |
| Soprano::Util::AsyncModel::~AsyncModel | ( | ) |
Destructor.
| void Soprano::Util::AsyncModel::setMode | ( | AsyncModelMode | mode | ) |
Set the mode to be used. For historical reasons the default mode is SingleThreaded.
| AsyncModelMode Soprano::Util::AsyncModel::mode | ( | ) | const |
| AsyncResult* Soprano::Util::AsyncModel::addStatementAsync | ( | const Statement & | statement | ) |
Asyncroneously add the Statement to the Model.
| statement | The Statement to add. |
| AsyncResult* Soprano::Util::AsyncModel::addStatementAsync | ( | 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.
| AsyncResult* Soprano::Util::AsyncModel::addStatementsAsync | ( | const QList< Statement > & | statements | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| AsyncResult* Soprano::Util::AsyncModel::removeStatementAsync | ( | const Statement & | statement | ) |
Asyncroneously remove one statement. For removing statements with wildward matching see removeAllStatementsAsync().
| statement | The statement that should be removed. This has to be a valid statement. |
| AsyncResult* Soprano::Util::AsyncModel::removeStatementAsync | ( | 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.
| AsyncResult* Soprano::Util::AsyncModel::removeStatementsAsync | ( | const QList< Statement > & | statements | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| AsyncResult* Soprano::Util::AsyncModel::removeAllStatementsAsync | ( | const Statement & | statement | ) |
Asyncroneously remove all statements that match the partial statement. For removing one specific statement see removeStatement().
| statement | A possible partially defined statement that serves as a filter for all statements that should be removed. |
| AsyncResult* Soprano::Util::AsyncModel::removeAllStatementsAsync | ( | 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.
| AsyncResult* Soprano::Util::AsyncModel::isEmptyAsync | ( | ) | const |
Asyncroneously check if the Model does contain any Statement.
| AsyncResult* Soprano::Util::AsyncModel::statementCountAsync | ( | ) | const |
Asyncroneously determine the number of statements stored in this Model.
| AsyncResult* Soprano::Util::AsyncModel::listStatementsAsync | ( | const Statement & | statement | ) | const |
Asyncroneously return an iterator over Model Statements that "partial" match the input Statement.
| statement | The partial Statement to match. |
| AsyncResult* Soprano::Util::AsyncModel::listStatementsAsync | ( | 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.
| AsyncResult* Soprano::Util::AsyncModel::listStatementsAsync | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Lists all statements in the Model asyncroneously.
| AsyncResult* Soprano::Util::AsyncModel::listContextsAsync | ( | ) | const |
Asyncroneously list all contexts in the model, i.e. all named graphs.
| AsyncResult* Soprano::Util::AsyncModel::executeQueryAsync | ( | const QString & | query, |
| Query::QueryLanguage | language, | ||
| const QString & | userQueryLanguage = QString() |
||
| ) | const |
Asyncroneously execute the given query over the Model.
This is a const read-only method. As such Model implementations should not support SPARQL extensions such as INSERT or UPDATE through this method. A future version of Soprano will provide an additional API for queries that change the Model.
| query | The query to evaluate. |
| language | The query language used to encode query. |
| userQueryLanguage | If language equals Query::QueryLanguageUser userQueryLanguage defines the language to use. |
| AsyncResult* Soprano::Util::AsyncModel::containsStatementAsync | ( | const Statement & | statement | ) | const |
AsyncResult check if the model contains a statements.
| statement | The 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. |
| AsyncResult* Soprano::Util::AsyncModel::containsStatementAsync | ( | 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.
| AsyncResult* Soprano::Util::AsyncModel::containsAnyStatementAsync | ( | const Statement & | statement | ) | const |
Asyncroneously check if the model contains certain statements.
| statement | A partially defined statement that serves as a pattern. |
| AsyncResult* Soprano::Util::AsyncModel::containsAnyStatementAsync | ( | 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.
| AsyncResult* Soprano::Util::AsyncModel::createBlankNodeAsync | ( | ) |
Asyncroneously create a new blank node with a unique identifier.
|
virtual |
The call is directly delivered to the parent model. However, the iterator is counted so that interweaving asyncroneous and non-asyncroneous calls does not result in unwanted behaviour.
Reimplemented from Soprano::FilterModel.
|
virtual |
The call is directly delivered to the parent model. However, the iterator is counted so that interweaving asyncroneous and non-asyncroneous calls does not result in unwanted behaviour.
Reimplemented from Soprano::FilterModel.
|
virtual |
The call is directly delivered to the parent model. However, the iterator is counted so that interweaving asyncroneous and non-asyncroneous calls does not result in unwanted behaviour.
Reimplemented from Soprano::FilterModel.
1.8.5