soprano/util/dummymodel.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Soprano Project.
00003  *
00004  * Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef SOPRANO_DUMMY_MODEL_H
00023 #define SOPRANO_DUMMY_MODEL_H
00024 
00025 #include "soprano_export.h"
00026 #include "model.h"
00027 
00028 
00029 namespace Soprano {
00030     namespace Util {
00042         class SOPRANO_EXPORT DummyModel : public Model
00043         {
00044             Q_OBJECT
00045 
00046         public:
00050             DummyModel();
00051 
00055             ~DummyModel();
00056 
00058             Error::ErrorCode addStatement( const Statement &statement );
00059             Error::ErrorCode addStatements( const QList<Statement> &statements );
00061 
00063             Error::ErrorCode removeStatement( const Statement &statement );
00064             Error::ErrorCode removeAllStatements( const Statement &statement );
00065             Error::ErrorCode removeStatements( const QList<Statement> &statements );
00066             Error::ErrorCode removeContext( const Node& );
00067             Error::ErrorCode removeAllStatements();
00069 
00071             StatementIterator listStatements( const Statement &partial ) const;
00072             StatementIterator listStatements() const;
00073             StatementIterator listStatementsInContext( const Node &context ) const;
00074             NodeIterator listContexts() const;
00075 //    QueryResultIterator executeQuery( const Query::Query& query ) const;
00076             QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
00078 
00080             bool containsAnyStatement( const Statement &statement ) const;
00081             bool containsStatement( const Statement &statement ) const;
00082             bool containsContext( const Node &context ) const;
00083             bool isEmpty() const;
00084             int statementCount() const;
00086 
00088             Error::ErrorCode write( QTextStream &os ) const;
00090 
00092             Node createBlankNode();
00094 
00095         private:
00096             class Private;
00097             Private* const d;
00098         };
00099     }
00100 }
00101 
00102 #endif

Generated on Fri Mar 7 18:57:44 2008 for Soprano by  doxygen 1.5.4