Soprano  2.9.4
statement.h
Go to the documentation of this file.
1 /* This file is part of Soprano Project.
2  *
3  * Copyright (C) 2006 Daniele Galdi <daniele.galdi@gmail.com>
4  * Copyright (C) 2007-2009 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_STATEMENT_H
23 #define SOPRANO_STATEMENT_H
24 
25 #include "node.h"
26 #include "soprano_export.h"
27 
28 namespace Soprano
29 {
48  {
49  public:
51 
55 
67  Statement( const Node &subject, const Node &predicate, const Node &object, const Node &context = Node() );
68 
69  Statement( const Statement &other );
70 
71  virtual ~Statement();
72 
73  Statement& operator=( const Statement& other );
75 
77  bool operator==( const Statement& other ) const;
78  bool operator!=( const Statement& other ) const;
79 
97  bool matches( const Statement& other ) const;
99 
101 
108  bool isValid() const;
110 
112 
115  Node subject() const;
116 
120  Node predicate() const;
121 
125  Node object() const;
126 
130  Node context() const;
132 
134 
139  void setSubject( const Node &subject );
140 
146  void setPredicate( const Node &predicate );
152  void setObject( const Node &object );
153 
159  void setContext( const Node &context );
161 
162  private:
163  class Private;
165  };
166 
170  SOPRANO_EXPORT uint qHash( const Statement& s );
171 }
172 
176 SOPRANO_EXPORT QDebug operator<<( QDebug s, const Soprano::Statement& );
177 
182 
183 #endif // SOPRANO_STATEMENT_H
184 
Soprano::Statement::Statement
Statement()
soprano_export.h
Soprano::Vocabulary::RDF::subject
SOPRANO_EXPORT QUrl subject()
Soprano::Statement::operator==
bool operator==(const Statement &other) const
Soprano::Statement::operator!=
bool operator!=(const Statement &other) const
Soprano::Statement::object
Node object() const
Soprano::Vocabulary::RDF::predicate
SOPRANO_EXPORT QUrl predicate()
Soprano::Statement::~Statement
virtual ~Statement()
QSharedDataPointer< Private >
SOPRANO_EXPORT
#define SOPRANO_EXPORT
Definition: soprano_export.h:37
Soprano::Statement
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Soprano::Statement::setSubject
void setSubject(const Node &subject)
node.h
QTextStream
Soprano::Statement::setContext
void setContext(const Node &context)
Soprano::Statement::predicate
Node predicate() const
Soprano::Statement::setObject
void setObject(const Node &object)
Soprano
Definition: backend.h:36
Soprano::Statement::Statement
Statement(const Statement &other)
Soprano::Statement::matches
bool matches(const Statement &other) const
Soprano::Statement::qHash
SOPRANO_EXPORT uint qHash(const Statement &s)
Soprano::Statement::operator<<
SOPRANO_EXPORT QTextStream & operator<<(QTextStream &s, const Soprano::Statement &)
Soprano::Node
A Node represents one RDF resource.
Definition: node.h:54
Soprano::Statement::setPredicate
void setPredicate(const Node &predicate)
Soprano::Statement::Statement
Statement(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
Soprano::Statement::operator<<
SOPRANO_EXPORT QDebug operator<<(QDebug s, const Soprano::Statement &)
Soprano::Statement::isValid
bool isValid() const
Soprano::Statement::subject
Node subject() const
Soprano::Vocabulary::SIL::context
SOPRANO_EXPORT QUrl context()
Soprano::Statement::operator=
Statement & operator=(const Statement &other)
Soprano::Statement::context
Node context() const