//
//     Copyright 2008 Simon Edwards <simon@simonzone.com>

//                 Generated by twine

// This file is part of PyKDE4.

// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.

// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.


%ModuleHeaderCode
//ctscc
#include <soprano/asyncmodel.h>
#include <soprano/asyncquery.h>
#include <soprano/asyncresult.h>
#include <soprano/dbusclient.h>
#include <soprano/dbusexportiterator.h>
#include <soprano/dbusexportmodel.h>
#include <soprano/dbusmodel.h>
#include <soprano/dummymodel.h>
#include <soprano/filtermodel.h>
#include <soprano/inferencemodel.h>
#include <soprano/localsocketclient.h>
#include <soprano/model.h>
#include <soprano/mutexmodel.h>
#include <soprano/nrlmodel.h>
#include <soprano/pluginmanager.h>
#include <qobject.h>
#include <soprano/servercore.h>
#include <soprano/signalcachemodel.h>
#include <soprano/sparqlmodel.h>
#include <soprano/storagemodel.h>
#include <soprano/tcpclient.h>
%End

namespace Soprano
{

class Model : QObject, Soprano::Error::ErrorCache
{
%TypeHeaderCode
#include <soprano/model.h>
%End


public:
    virtual Soprano::Error::ErrorCode  addStatement (const Soprano::Statement& statement)=0;
    Soprano::Error::ErrorCode  addStatement (const Soprano::Node& subject, const Soprano::Node& predicate, const Soprano::Node& object, const Soprano::Node& context = Soprano::Node());
    Soprano::Error::ErrorCode  addStatements (const QList<Soprano::Statement>& statements);
    virtual Soprano::Error::ErrorCode  removeStatement (const Soprano::Statement& statement)=0;
    Soprano::Error::ErrorCode  removeStatement (const Soprano::Node& subject, const Soprano::Node& predicate, const Soprano::Node& object, const Soprano::Node& context = Soprano::Node());
    virtual Soprano::Error::ErrorCode  removeAllStatements (const Soprano::Statement& statement)=0;
    Soprano::Error::ErrorCode  removeAllStatements (const Soprano::Node& subject, const Soprano::Node& predicate, const Soprano::Node& object, const Soprano::Node& context = Soprano::Node());
    Soprano::Error::ErrorCode  removeStatements (const QList<Soprano::Statement>& statements);
    Soprano::Error::ErrorCode  removeContext (const Soprano::Node&);
    Soprano::Error::ErrorCode  removeAllStatements ();
    virtual Soprano::StatementIterator  listStatements (const Soprano::Statement& partial) const=0;
    Soprano::StatementIterator  listStatements (const Soprano::Node& subject, const Soprano::Node& predicate, const Soprano::Node& object, const Soprano::Node& context = Soprano::Node()) const;
    Soprano::StatementIterator  listStatements () const;
    Soprano::StatementIterator  listStatementsInContext (const Soprano::Node& context) const;
    virtual Soprano::NodeIterator  listContexts () const=0;
    virtual Soprano::QueryResultIterator  executeQuery (const QString& query, Soprano::Query::QueryLanguage language, const QString& userQueryLanguage = QString()) const=0;
    virtual bool            containsAnyStatement (const Soprano::Statement& statement) const=0;
    bool                    containsAnyStatement (const Soprano::Node& subject, const Soprano::Node& predicate, const Soprano::Node& object, const Soprano::Node& context = Soprano::Node()) const;
    virtual bool            containsStatement (const Soprano::Statement& statement) const=0;
    bool                    containsStatement (const Soprano::Node& subject, const Soprano::Node& predicate, const Soprano::Node& object, const Soprano::Node& context = Soprano::Node()) const;
    bool                    containsContext (const Soprano::Node& context) const;
    virtual bool            isEmpty () const=0;
    virtual int             statementCount () const=0;
    virtual Soprano::Error::ErrorCode  write (QTextStream& os) const;
    virtual Soprano::Node   createBlankNode ()=0;

signals:
    void                    statementsAdded ();
    void                    statementsRemoved ();
    void                    statementAdded (const Soprano::Statement& statement);
    void                    statementRemoved (const Soprano::Statement& statement);

protected:
                            Model ();

private:
                            Model (const Soprano::Model&);


//  Subclasses of QObject

%ConvertToSubClassCode
    // CTSCC for subclasses of 'QObject'
    sipType = NULL;

    if (dynamic_cast<Soprano::Client::DBusClient*>(sipCpp))
        sipType = sipType_Soprano_Client_DBusClient;
    else if (dynamic_cast<Soprano::Client::LocalSocketClient*>(sipCpp))
        sipType = sipType_Soprano_Client_LocalSocketClient;
    else if (dynamic_cast<Soprano::Client::TcpClient*>(sipCpp))
        sipType = sipType_Soprano_Client_TcpClient;
    else if (dynamic_cast<Soprano::Model*>(sipCpp))
        {
        sipType = sipType_Soprano_Model;
        if (dynamic_cast<Soprano::Client::SparqlModel*>(sipCpp))
            sipType = sipType_Soprano_Client_SparqlModel;
        else if (dynamic_cast<Soprano::FilterModel*>(sipCpp))
            {
            sipType = sipType_Soprano_FilterModel;
            if (dynamic_cast<Soprano::Inference::InferenceModel*>(sipCpp))
                sipType = sipType_Soprano_Inference_InferenceModel;
            else if (dynamic_cast<Soprano::NRLModel*>(sipCpp))
                sipType = sipType_Soprano_NRLModel;
            else if (dynamic_cast<Soprano::Server::DBusExportModel*>(sipCpp))
                sipType = sipType_Soprano_Server_DBusExportModel;
            else if (dynamic_cast<Soprano::Util::AsyncModel*>(sipCpp))
                sipType = sipType_Soprano_Util_AsyncModel;
            else if (dynamic_cast<Soprano::Util::MutexModel*>(sipCpp))
                sipType = sipType_Soprano_Util_MutexModel;
            else if (dynamic_cast<Soprano::Util::SignalCacheModel*>(sipCpp))
                sipType = sipType_Soprano_Util_SignalCacheModel;
            }
        else if (dynamic_cast<Soprano::StorageModel*>(sipCpp))
            {
            sipType = sipType_Soprano_StorageModel;
            if (dynamic_cast<Soprano::Client::DBusModel*>(sipCpp))
                sipType = sipType_Soprano_Client_DBusModel;
            }
        else if (dynamic_cast<Soprano::Util::DummyModel*>(sipCpp))
            sipType = sipType_Soprano_Util_DummyModel;
        }
    else if (dynamic_cast<Soprano::PluginManager*>(sipCpp))
        sipType = sipType_Soprano_PluginManager;
    else if (dynamic_cast<Soprano::Server::DBusExportIterator*>(sipCpp))
        sipType = sipType_Soprano_Server_DBusExportIterator;
    else if (dynamic_cast<Soprano::Server::ServerCore*>(sipCpp))
        sipType = sipType_Soprano_Server_ServerCore;
    else if (dynamic_cast<Soprano::Util::AsyncQuery*>(sipCpp))
        sipType = sipType_Soprano_Util_AsyncQuery;
    else if (dynamic_cast<Soprano::Util::AsyncResult*>(sipCpp))
        sipType = sipType_Soprano_Util_AsyncResult;
%End

public:
    virtual ~Model ();
};
// Model

};
// Soprano


