Soprano  2.9.4
readonlymodel.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_READ_ONLY_MODEL_H_
23 #define _SOPRANO_READ_ONLY_MODEL_H_
24 
25 #include "model.h"
26 #include "soprano_export.h"
27 
28 namespace Soprano {
29  namespace Util {
44  {
45  Q_OBJECT
46 
47  public:
52  ReadOnlyModel( Model* parentModel = 0 );
53 
58 
63  void setParentModel( Model* model );
64 
68  StatementIterator listStatements( const Statement &partial ) const;
69 
74 
78  QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
79 
83  bool containsStatement( const Statement &statement ) const;
84 
88  bool containsAnyStatement( const Statement &statement ) const;
89 
93  bool isEmpty() const;
94 
98  int statementCount() const;
99 
104 
109 
114 
119 
120  using Model::addStatement;
123  using Model::listStatements;
126 
127  private:
128  class Private;
129  Private* const d;
130  };
131  }
132 }
133 
134 #endif
Soprano::Util::ReadOnlyModel::isEmpty
bool isEmpty() const
soprano_export.h
Soprano::Model::listStatements
StatementIterator listStatements() const
model.h
Soprano::Model::addStatement
virtual Error::ErrorCode addStatement(const Statement &statement)=0
Soprano::Query::QueryLanguage
QueryLanguage
Definition: sopranotypes.h:129
Soprano::Util::ReadOnlyModel::setParentModel
void setParentModel(Model *model)
SOPRANO_EXPORT
#define SOPRANO_EXPORT
Definition: soprano_export.h:37
Soprano::Util::ReadOnlyModel::containsAnyStatement
bool containsAnyStatement(const Statement &statement) const
Soprano::Statement
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Soprano::Util::ReadOnlyModel::containsStatement
bool containsStatement(const Statement &statement) const
Soprano::Util::ReadOnlyModel::executeQuery
QueryResultIterator executeQuery(const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
Soprano::Util::ReadOnlyModel::~ReadOnlyModel
~ReadOnlyModel()
Soprano::Model::removeStatement
virtual Error::ErrorCode removeStatement(const Statement &statement)=0
Soprano::Util::ReadOnlyModel::removeAllStatements
Error::ErrorCode removeAllStatements(const Statement &statement)
Soprano::QueryResultIterator
An iterator for query results.
Definition: queryresultiterator.h:109
Soprano::Util::ReadOnlyModel::createBlankNode
Node createBlankNode()
Soprano::Model::removeAllStatements
Error::ErrorCode removeAllStatements()
Soprano::Util::ReadOnlyModel::listStatements
StatementIterator listStatements(const Statement &partial) const
Soprano::Util::ReadOnlyModel::listContexts
NodeIterator listContexts() const
Soprano::Util::ReadOnlyModel::addStatement
Error::ErrorCode addStatement(const Statement &statement)
Soprano::Model
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
Soprano::StatementIterator
An iterator that provides a stream of Statements.
Definition: statementiterator.h:76
Soprano::Util::ReadOnlyModel::statementCount
int statementCount() const
Soprano::Util::ReadOnlyModel::removeStatement
Error::ErrorCode removeStatement(const Statement &statement)
Soprano
Definition: backend.h:36
Soprano::Model::containsStatement
virtual bool containsStatement(const Statement &statement) const =0
Soprano::Util::ReadOnlyModel
Simple filter model preventing any write operations.
Definition: readonlymodel.h:44
Soprano::Model::containsAnyStatement
virtual bool containsAnyStatement(const Statement &statement) const =0
Soprano::NodeIterator
An iterator that provides a stream of Nodes.
Definition: nodeiterator.h:73
Soprano::Node
A Node represents one RDF resource.
Definition: node.h:54
Soprano::Error::ErrorCode
ErrorCode
Definition: error.h:40
Soprano::Util::ReadOnlyModel::ReadOnlyModel
ReadOnlyModel(Model *parentModel=0)
QString
Soprano::Vocabulary::Xesam::language
SOPRANO_EXPORT QUrl language()