Soprano  2.9.4
nrlmodel.h
Go to the documentation of this file.
1 /*
2  * This file is part of Soprano Project.
3  *
4  * Copyright (C) 2007-2011 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_NRL_MODEL_H_
23 #define _SOPRANO_NRL_MODEL_H_
24 
25 #include "filtermodel.h"
26 #include "soprano_export.h"
27 
28 #ifndef USING_SOPRANO_NRLMODEL_UNSTABLE_API
29 #error The Soprano::NrlModel API is subject to change. This has to be acnowledged by defining USING_SOPRANO_NRLMODEL_UNSTABLE_API
30 #endif
31 
32 namespace Soprano {
57  {
58  Q_OBJECT
59 
60  public:
62  NRLModel( Model* parent );
64 
78  void setIgnoreContext( bool b );
79 
86  bool ignoreContext() const;
87 
96  void setEnableQueryPrefixExpansion( bool enable );
97 
104 
114 
130 
142  QUrl createGraph( const QUrl& type, QUrl* metadataGraph = 0 );
143 
152 
159  virtual QueryResultIterator executeQuery( const QString& query, Query::QueryLanguage language, const QString& userQueryLanguage = QString() ) const;
160 
169  virtual Error::ErrorCode removeAllStatements( const Statement& statement );
170 
171  private:
172  class Private;
173  Private* const d;
174  };
175 }
176 
177 #endif
Soprano::NRLModel::setIgnoreContext
void setIgnoreContext(bool b)
soprano_export.h
Soprano::Vocabulary::RDF::type
SOPRANO_EXPORT QUrl type()
QUrl
Soprano::NRLModel::NRLModel
NRLModel(Model *parent)
Soprano::NRLModel::removeGraph
Error::ErrorCode removeGraph(const QUrl &graph)
Soprano::NRLModel::~NRLModel
~NRLModel()
Soprano::Query::QueryLanguage
QueryLanguage
Definition: sopranotypes.h:129
SOPRANO_EXPORT
#define SOPRANO_EXPORT
Definition: soprano_export.h:37
Soprano::FilterModel
A FilterModel is a virtual model that wraps another Model.
Definition: filtermodel.h:49
Soprano::Statement
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Soprano::NRLModel::NRLModel
NRLModel()
Soprano::NRLModel::queryPrefixes
QHash< QString, QUrl > queryPrefixes() const
Soprano::NRLModel::removeAllStatements
virtual Error::ErrorCode removeAllStatements(const Statement &statement)
Soprano::QueryResultIterator
An iterator for query results.
Definition: queryresultiterator.h:109
Soprano::NRLModel
Model filter that makes working with NRL data simpler.
Definition: nrlmodel.h:57
filtermodel.h
Soprano::Model
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
Soprano::NRLModel::executeQuery
virtual QueryResultIterator executeQuery(const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
Soprano::NRLModel::setEnableQueryPrefixExpansion
void setEnableQueryPrefixExpansion(bool enable)
Soprano::NRLModel::ignoreContext
bool ignoreContext() const
Soprano::NRLModel::createGraph
QUrl createGraph(const QUrl &type, QUrl *metadataGraph=0)
Soprano
Definition: backend.h:36
Soprano::NRLModel::addNrlStatement
Error::ErrorCode addNrlStatement(const Statement &s)
Soprano::NRLModel::queryPrefixExpansionEnabled
bool queryPrefixExpansionEnabled() const
QHash
Soprano::Error::ErrorCode
ErrorCode
Definition: error.h:40
QString
Soprano::Vocabulary::Xesam::language
SOPRANO_EXPORT QUrl language()