Soprano
2.9.4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
soprano
inference
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
28
class
QUrl
;
29
30
namespace
Soprano {
31
32
class
Statement
;
33
34
namespace
Inference {
35
36
class
Rule
;
37
71
class
SOPRANO_EXPORT
InferenceModel
:
public
FilterModel
72
{
73
Q_OBJECT
74
75
public
:
76
InferenceModel
(
Model
* parent );
77
~
InferenceModel
();
78
83
Error::ErrorCode
addStatement(
const
Statement
& );
84
88
Error::ErrorCode
removeStatement(
const
Statement
& );
89
93
Error::ErrorCode
removeAllStatements(
const
Statement
& );
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:
123
void
performInference();
124
130
void
clearInference();
131
146
void
setCompressedSourceStatements(
bool
b );
147
160
void
setOptimizedQueriesEnabled(
bool
b );
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
Generated by
1.8.3.1