Soprano 2.9.4
storagemodel.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_STORAGE_MODEL_H_
23#define _SOPRANO_STORAGE_MODEL_H_
24
25#include "model.h"
26#include "soprano_export.h"
27
28namespace Soprano {
29
30 class Backend;
31
45 {
46 Q_OBJECT
47
48 public:
49 virtual ~StorageModel();
50
54 virtual bool isEmpty() const;
55
59 virtual bool containsStatement( const Statement &statement ) const;
60
64 virtual bool containsAnyStatement( const Statement &statement ) const;
65
69 virtual Error::ErrorCode removeAllStatements( const Statement &statement );
70
71 /*
72 * Default implementation uses Query::Serializer for Query::QueryLanguageSparql and
73 * executeQuery( const QString&, Query::QueryLanguage, const QString& ) const.
74 *
75 * Be aware that one of the two query methods has to be re-implemented.
76 * Otherwise calling one of them results in an endless loop.
77 */
78// virtual QueryResultIterator executeQuery( const Query::Query& query ) const;
79
80 /*
81 * Default implementation uses Query::Parser and
82 * executeQuery( const Query::Query& ) const.
83 *
84 * Be aware that one of the two query methods has to be re-implemented.
85 * Otherwise calling one of them results in an endless loop.
86 */
87// virtual QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
88
92 const Backend* backend() const;
93
97
98 protected:
102 StorageModel( const Backend* backend );
103
104 private:
105 class Private;
106 Private* const d;
107 };
108}
109
110#endif
Soprano::Backend defines the interface for a Soprano backend plugin.
Definition: backend.h:264
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
virtual bool containsStatement(const Statement &statement) const =0
virtual bool containsAnyStatement(const Statement &statement) const =0
Error::ErrorCode removeAllStatements()
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Base class for all Model implementations that store data (as compared to FilterModel).
Definition: storagemodel.h:45
StorageModel(const Backend *backend)
virtual bool isEmpty() const
virtual bool containsStatement(const Statement &statement) const
const Backend * backend() const
virtual Error::ErrorCode removeAllStatements(const Statement &statement)
virtual bool containsAnyStatement(const Statement &statement) const
#define SOPRANO_EXPORT