Soprano 2.9.4
asyncmodel.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2008 Sebastian Trueg <trueg@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#ifndef _SOPRANO_ASYNC_MODEL_H_
23#define _SOPRANO_ASYNC_MODEL_H_
24
25#include "filtermodel.h"
26#include "asyncresult.h" // backwards comp when AsyncResult was defined in this header
27
28#include "soprano_export.h"
29
30
31namespace Soprano {
32
33 class Statement;
34 class StatementIterator;
35 class Node;
36 class NodeIterator;
37 class QueryResultIterator;
38
39 namespace Util {
40
41 class AsyncModelPrivate;
42
68 {
69 Q_OBJECT
70
71 public:
77 AsyncModel( Model* parent = 0 );
78
83
96
102 MultiThreaded
103 };
104
114
123
135
141 AsyncResult* addStatementAsync( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() );
142
149
163
169 AsyncResult* removeStatementAsync( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() );
170
177
191
197 AsyncResult* removeAllStatementsAsync( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() );
198
208
218
230 AsyncResult* listStatementsAsync( const Statement& statement ) const;
231
237 AsyncResult* listStatementsAsync( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
238
247
257
277 Query::QueryLanguage language,
278 const QString& userQueryLanguage = QString() ) const;
279
292 AsyncResult* containsStatementAsync( const Statement& statement ) const;
293
299 AsyncResult* containsStatementAsync( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
300
313
319 AsyncResult* containsAnyStatementAsync( const Node& subject, const Node& predicate, const Node& object, const Node& context = Node() ) const;
320
330
340
350
359 QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
360
361 using FilterModel::addStatement;
362 using FilterModel::removeStatement;
363 using FilterModel::removeAllStatements;
364 using FilterModel::listStatements;
365 using FilterModel::containsStatement;
366 using FilterModel::containsAnyStatement;
367
368 private:
369 AsyncModelPrivate* const d;
370
371 Q_PRIVATE_SLOT( d, void _s_executeNextCommand() )
372 };
373 }
374}
375
376#endif
A FilterModel is a virtual model that wraps another Model.
Definition: filtermodel.h:49
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
An iterator that provides a stream of Nodes.
Definition: nodeiterator.h:73
A Node represents one RDF resource.
Definition: node.h:54
An iterator for query results.
An iterator that provides a stream of Statements.
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Filter model that allows to perform operations asyncroneously.
Definition: asyncmodel.h:68
AsyncResult * statementCountAsync() const
AsyncResult * removeStatementAsync(const Statement &statement)
AsyncResult * removeStatementAsync(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
AsyncResult * addStatementAsync(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
AsyncResult * createBlankNodeAsync()
StatementIterator listStatements(const Statement &partial) const
AsyncResult * removeStatementsAsync(const QList< Statement > &statements)
AsyncResult * containsStatementAsync(const Statement &statement) const
AsyncResult * containsAnyStatementAsync(const Statement &statement) const
void setMode(AsyncModelMode mode)
NodeIterator listContexts() const
AsyncModel(Model *parent=0)
AsyncResult * containsStatementAsync(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
AsyncModelMode mode() const
AsyncResult * containsAnyStatementAsync(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
AsyncResult * removeAllStatementsAsync(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
AsyncResult * removeAllStatementsAsync(const Statement &statement)
AsyncResult * listStatementsAsync(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) const
AsyncResult * listStatementsAsync() const
AsyncResult * listStatementsAsync(const Statement &statement) const
AsyncResult * addStatementAsync(const Statement &statement)
AsyncResult * isEmptyAsync() const
AsyncResult * listContextsAsync() const
QueryResultIterator executeQuery(const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
AsyncResult * executeQueryAsync(const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
AsyncResult * addStatementsAsync(const QList< Statement > &statements)
A delayed result as returned by AsyncModel.
Definition: asyncresult.h:53
SOPRANO_EXPORT QUrl Statement()
#define SOPRANO_EXPORT