Soprano 2.9.4
inferencemodel.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2007 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_INFERENCE_MODEL_H_
23#define _SOPRANO_INFERENCE_MODEL_H_
24
25#include "filtermodel.h"
26#include "soprano_export.h"
27
28class QUrl;
29
30namespace Soprano {
31
32 class Statement;
33
34 namespace Inference {
35
36 class Rule;
37
72 {
73 Q_OBJECT
74
75 public:
78
84
89
94
100 void addRule( const Rule& );
101
107 void setRules( const QList<Rule>& rules );
108
109 using FilterModel::addStatement;
110 using FilterModel::removeStatement;
111 using FilterModel::removeAllStatements;
112
113 public Q_SLOTS:
124
131
147
161
162 private:
171 int inferStatement( const Statement& statement, bool recurse = false );
172
181 int inferRule( const Rule& rule, bool recurse );
182
187 QList<Node> inferedGraphsForStatement( const Statement& statement ) const;
188
193 QUrl storeUncompressedSourceStatement( const Statement& sourceStatement );
194
195 class Private;
196 Private* const d;
197 };
198 }
199}
200
201#endif
A FilterModel is a virtual model that wraps another Model.
Definition: filtermodel.h:49
The Soprano Inference Model provides a simple forward chaining inference engine which uses the underl...
Error::ErrorCode removeStatement(const Statement &)
Error::ErrorCode removeAllStatements(const Statement &)
Error::ErrorCode addStatement(const Statement &)
void setRules(const QList< Rule > &rules)
A rule used by the InferenceModel to generate inferenced statements.
Definition: inferencerule.h:50
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
SOPRANO_EXPORT QUrl Statement()
#define SOPRANO_EXPORT