Soprano  2.9.4
Public Types | Public Member Functions | List of all members
Soprano::Util::AsyncModel Class Reference

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
 
AsyncResultaddStatementAsync (const Statement &statement)
 
AsyncResultaddStatementAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
 
AsyncResultaddStatementsAsync (const QList< Statement > &statements)
 
AsyncResultremoveStatementAsync (const Statement &statement)
 
AsyncResultremoveStatementAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
 
AsyncResultremoveStatementsAsync (const QList< Statement > &statements)
 
AsyncResultremoveAllStatementsAsync (const Statement &statement)
 
AsyncResultremoveAllStatementsAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
 
AsyncResultisEmptyAsync () const
 
AsyncResultstatementCountAsync () const
 
AsyncResultlistStatementsAsync (const Statement &statement) const
 
AsyncResultlistStatementsAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
AsyncResultlistStatementsAsync () const
 
AsyncResultlistContextsAsync () const
 
AsyncResultexecuteQueryAsync (const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
 
AsyncResultcontainsStatementAsync (const Statement &statement) const
 
AsyncResultcontainsStatementAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
AsyncResultcontainsAnyStatementAsync (const Statement &statement) const
 
AsyncResultcontainsAnyStatementAsync (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
AsyncResultcreateBlankNodeAsync ()
 
StatementIterator listStatements (const Statement &partial) const
 
NodeIterator listContexts () const
 
QueryResultIterator executeQuery (const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) 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 addStatement (const Statement &statement)=0
 
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 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)
 
Error::ErrorCode removeAllStatements (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 removeAllStatements ()
 
virtual StatementIterator listStatements (const Statement &partial) const
 
StatementIterator listStatements (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
 
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
 
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 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
 
bool containsAnyStatement (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::FilterModel
virtual ~FilterModel ()
 
virtual Error::ErrorCode addStatement (const Statement &statement)=0
 
Error::ErrorCode addStatement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
 
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 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
 
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
 
virtual void setParentModel (Model *model)
 
virtual ModelparentModel () 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 &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
 

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
 

Detailed Description

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:

AsyncResult* result = model->listStatementsAsync( s );
connect( result, SIGNAL(resultReady(AsyncResult*)),
this, SLOT(slotResultReady(AsyncResult*)) );
Author
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org
Since
2.1

Definition at line 67 of file asyncmodel.h.

Member Enumeration Documentation

◆ AsyncModelMode

The mode of the model, single vs. multi threaded execution.

Since
2.2
Enumerator
SingleThreaded 

The model uses a single thread. Thus, commands are executed in the same thread but no two commands will ever block each other. This is the default mode for historical reasons.

MultiThreaded 

The model uses multiple threads through QThreadPool. Commands are executed in parallel. Be aware that the parent model needs to be thread-safe.

Definition at line 89 of file asyncmodel.h.

Constructor & Destructor Documentation

◆ AsyncModel()

Soprano::Util::AsyncModel::AsyncModel ( Model parent = 0)

Create a new Model.

Parameters
parentThe parent model to forward the operations to.

◆ ~AsyncModel()

Soprano::Util::AsyncModel::~AsyncModel ( )

Destructor.

Member Function Documentation

◆ setMode()

void Soprano::Util::AsyncModel::setMode ( AsyncModelMode  mode)

Set the mode to be used. For historical reasons the default mode is SingleThreaded.

See also
mode
Since
2.2

◆ mode()

AsyncModelMode Soprano::Util::AsyncModel::mode ( ) const

The mode used by this model.

See also
setMode
Since
2.2

◆ addStatementAsync() [1/2]

AsyncResult* Soprano::Util::AsyncModel::addStatementAsync ( const Statement statement)

Asyncroneously add the Statement to the Model.

Parameters
statementThe Statement to add.
See also
addStatement
Returns
an AsyncResult with result type Error::ErrorCode object which will signal when the result is ready.

◆ addStatementAsync() [2/2]

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.

Since
2.2

◆ addStatementsAsync()

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.

Since
2.2

◆ removeStatementAsync() [1/2]

AsyncResult* Soprano::Util::AsyncModel::removeStatementAsync ( const Statement statement)

Asyncroneously remove one statement. For removing statements with wildward matching see removeAllStatementsAsync().

Parameters
statementThe statement that should be removed. This has to be a valid statement.
See also
removeStatement
Returns
an AsyncResult with result type Error::ErrorCode object which will signal when the result is ready.

◆ removeStatementAsync() [2/2]

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.

Since
2.2

◆ removeStatementsAsync()

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.

Since
2.2

◆ removeAllStatementsAsync() [1/2]

AsyncResult* Soprano::Util::AsyncModel::removeAllStatementsAsync ( const Statement statement)

Asyncroneously 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.
See also
removeAllStatements
Returns
an AsyncResult with result type Error::ErrorCode object which will signal when the result is ready.

◆ removeAllStatementsAsync() [2/2]

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.

Since
2.2

◆ isEmptyAsync()

AsyncResult* Soprano::Util::AsyncModel::isEmptyAsync ( ) const

Asyncroneously check if the Model does contain any Statement.

See also
isEmpty
Returns
an AsyncResult with result type bool object which will signal when the result is ready.

◆ statementCountAsync()

AsyncResult* Soprano::Util::AsyncModel::statementCountAsync ( ) const

Asyncroneously determine the number of statements stored in this Model.

See also
statementCount
Returns
an AsyncResult with result type int object which will signal when the result is ready.

◆ listStatementsAsync() [1/3]

AsyncResult* Soprano::Util::AsyncModel::listStatementsAsync ( const Statement statement) const

Asyncroneously return an iterator over Model Statements that "partial" match the input Statement.

Parameters
statementThe partial Statement to match.
See also
listStatements
Returns
an AsyncResult with result type StatementIterator object which will signal when the result is ready.

◆ listStatementsAsync() [2/3]

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.

Since
2.2

◆ listStatementsAsync() [3/3]

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.

Since
2.2

◆ listContextsAsync()

AsyncResult* Soprano::Util::AsyncModel::listContextsAsync ( ) const

Asyncroneously list all contexts in the model, i.e. all named graphs.

See also
listContexts
Returns
an AsyncResult with result type NodeIterator object which will signal when the result is ready.

◆ executeQueryAsync()

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.

Parameters
queryThe query to evaluate.
languageThe query language used to encode query.
userQueryLanguageIf language equals Query::QueryLanguageUser userQueryLanguage defines the language to use.
See also
executeQuery
Returns
an AsyncResult with result type QueryResultIterator object which will signal when the result is ready.

◆ containsStatementAsync() [1/2]

AsyncResult* Soprano::Util::AsyncModel::containsStatementAsync ( const Statement statement) const

AsyncResult 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.
See also
containsStatement
Returns
an AsyncResult with result type bool object which will signal when the result is ready.

◆ containsStatementAsync() [2/2]

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.

Since
2.2

◆ containsAnyStatementAsync() [1/2]

AsyncResult* Soprano::Util::AsyncModel::containsAnyStatementAsync ( const Statement statement) const

Asyncroneously check if the model contains certain statements.

Parameters
statementA partially defined statement that serves as a pattern.
See also
containsAnyStatement
Returns
an AsyncResult with result type bool object which will signal when the result is ready.

◆ containsAnyStatementAsync() [2/2]

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.

Since
2.2

◆ createBlankNodeAsync()

AsyncResult* Soprano::Util::AsyncModel::createBlankNodeAsync ( )

Asyncroneously create a new blank node with a unique identifier.

See also
createBlankNode
Returns
an AsyncResult with result type Node object which will signal when the result is ready.

◆ listStatements() [1/6]

StatementIterator Soprano::Util::AsyncModel::listStatements ( const Statement partial) const
virtual

\reimplemented

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.

Since
2.4

Reimplemented from Soprano::FilterModel.

◆ listContexts()

NodeIterator Soprano::Util::AsyncModel::listContexts ( ) const
virtual

\reimplemented

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.

Since
2.4

Reimplemented from Soprano::FilterModel.

◆ executeQuery()

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

\reimplemented

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.

Since
2.4

Reimplemented from Soprano::FilterModel.

◆ addStatement() [1/4]

virtual Error::ErrorCode Soprano::FilterModel::addStatement

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

◆ addStatement() [2/4]

Error::ErrorCode Soprano::FilterModel::addStatement

◆ addStatement() [3/4]

virtual Error::ErrorCode Soprano::Model::addStatement

Add the Statement to the Model.

Parameters
statementThe Statement to add.

◆ addStatement() [4/4]

Error::ErrorCode Soprano::Model::addStatement

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

◆ removeStatement() [1/4]

virtual Error::ErrorCode Soprano::FilterModel::removeStatement

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

◆ removeStatement() [2/4]

Error::ErrorCode Soprano::FilterModel::removeStatement

◆ removeStatement() [3/4]

virtual Error::ErrorCode Soprano::Model::removeStatement

Remove one statement. For removing statements with wildward matching see removeAllStatements().

Parameters
statementThe statement that should be removed. This has to be a valid statement.
Returns
Error::ErrorNone on success and an error code if statement was invalid or an error occured.

◆ removeStatement() [4/4]

Error::ErrorCode Soprano::Model::removeStatement

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

◆ removeAllStatements() [1/5]

virtual Error::ErrorCode Soprano::FilterModel::removeAllStatements

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

◆ removeAllStatements() [2/5]

Error::ErrorCode Soprano::FilterModel::removeAllStatements

◆ removeAllStatements() [3/5]

virtual Error::ErrorCode Soprano::Model::removeAllStatements

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.

◆ removeAllStatements() [4/5]

Error::ErrorCode Soprano::Model::removeAllStatements

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() [5/5]

Error::ErrorCode Soprano::Model::removeAllStatements

Convenience method that clear the Model of all statements

◆ listStatements() [2/6]

virtual StatementIterator Soprano::FilterModel::listStatements

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

◆ listStatements() [3/6]

StatementIterator Soprano::FilterModel::listStatements

Reimplemented for convenience. Calls Model::listStatements(const Node&,const Node&,const Node&,const Node&)

◆ listStatements() [4/6]

virtual StatementIterator Soprano::Model::listStatements

Return an iterator over Model Statements that "partial" match the input Statement.

Parameters
partialThe partial Statement to match.
Returns
An iterator for all the matched Statements, on error an invalid iterator is returned.

◆ listStatements() [5/6]

StatementIterator Soprano::Model::listStatements

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.
Returns
An iterator for all the matched Statements, on error an invalid iterator is returned.

◆ listStatements() [6/6]

StatementIterator Soprano::Model::listStatements

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

Returns
An iterator for all statements in the model, on error an invalid iterator is returned.

◆ containsStatement() [1/4]

virtual bool Soprano::FilterModel::containsStatement

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

◆ containsStatement() [2/4]

bool Soprano::FilterModel::containsStatement

Reimplemented for convenience. Calls Model::containsStatement(const Node&,const Node&,const Node&,const Node&)

◆ containsStatement() [3/4]

virtual bool Soprano::Model::containsStatement

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.

◆ containsStatement() [4/4]

bool Soprano::Model::containsStatement

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

◆ containsAnyStatement() [1/4]

virtual bool Soprano::FilterModel::containsAnyStatement

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

◆ containsAnyStatement() [2/4]

bool Soprano::FilterModel::containsAnyStatement

Reimplemented for convenience. Calls Model::containsAnyStatement(const Node&,const Node&,const Node&,const Node&)

◆ containsAnyStatement() [3/4]

virtual bool Soprano::Model::containsAnyStatement

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.

◆ containsAnyStatement() [4/4]

bool Soprano::Model::containsAnyStatement

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: