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
28namespace 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
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
177
182
183#endif // SOPRANO_STATEMENT_H
184
A Node represents one RDF resource.
Definition: node.h:54
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
void setSubject(const Node &subject)
bool matches(const Statement &other) const
void setPredicate(const Node &predicate)
SOPRANO_EXPORT QTextStream & operator<<(QTextStream &s, const Soprano::Statement &)
Statement & operator=(const Statement &other)
SOPRANO_EXPORT QDebug operator<<(QDebug s, const Soprano::Statement &)
bool isValid() const
void setContext(const Node &context)
void setObject(const Node &object)
Statement(const Statement &other)
Node subject() const
Node context() const
Statement(const Node &subject, const Node &predicate, const Node &object, const Node &context=Node())
Node predicate() const
Node object() const
virtual ~Statement()
bool operator!=(const Statement &other) const
bool operator==(const Statement &other) const
SOPRANO_EXPORT uint qHash(const Statement &s)
#define SOPRANO_EXPORT