A Statement instance represents one RDF quadruple.
More...
#include <Soprano/Statement>
List of all members.
Detailed Description
A Statement instance represents one RDF quadruple.
In Soprano statements are quadruples, i.e. in addition to the subject, predicate, and object nodes, they have a fourth node, the context. The context represents the named graph in which the statement is stored. If the context is an empty node the statement is stored in the default graph.
A Statement is valid if subject, predicate, and object are valid. Invalid statements can, however, be used in many methods such as Model::listStatements as wildwards.
- See also:
- Node
- Author:
- Daniele Galdi <daniele.galdi@gmail.com>
Sebastian Trueg <trueg@kde.org>
Definition at line 47 of file statement.h.
Constructor & Destructor Documentation
Soprano::Statement::Statement |
( |
|
) |
|
Default Constructor, build an empty (invalid) Statement.
Soprano::Statement::Statement |
( |
const Node & |
subject, |
|
|
const Node & |
predicate, |
|
|
const Node & |
object, |
|
|
const Node & |
context = Node() | |
|
) |
| | |
Build a Statement with the given subject, predicate and object.
- Parameters:
-
Soprano::Statement::Statement |
( |
const Statement & |
other |
) |
|
Default Constructor, build an empty (invalid) Statement.
virtual Soprano::Statement::~Statement |
( |
|
) |
[virtual] |
Default Constructor, build an empty (invalid) Statement.
Member Function Documentation
Default Constructor, build an empty (invalid) Statement.
bool Soprano::Statement::operator== |
( |
const Statement & |
other |
) |
const |
Match this statement against template statement other. The only difference to operator== is that empty nodes are matched as wildcards, i.e. they match any other node.
Be aware that the following is NOT always true since only other is treated a a wildcard:
a.matches(b) == b.matches(a)
- Returns:
true
if this statement matches other, false
if not.
- See also:
- Node::matches()
bool Soprano::Statement::operator!= |
( |
const Statement & |
other |
) |
const |
Match this statement against template statement other. The only difference to operator== is that empty nodes are matched as wildcards, i.e. they match any other node.
Be aware that the following is NOT always true since only other is treated a a wildcard:
a.matches(b) == b.matches(a)
- Returns:
true
if this statement matches other, false
if not.
- See also:
- Node::matches()
bool Soprano::Statement::matches |
( |
const Statement & |
other |
) |
const |
Match this statement against template statement other. The only difference to operator== is that empty nodes are matched as wildcards, i.e. they match any other node.
Be aware that the following is NOT always true since only other is treated a a wildcard:
a.matches(b) == b.matches(a)
- Returns:
true
if this statement matches other, false
if not.
- See also:
- Node::matches()
bool Soprano::Statement::isValid |
( |
|
) |
const |
A Statement is valid if the subject is a resource or blank node, the predicate is a resource node, and the object is a valid node.
- Returns:
true
if the Statement is valid, false
otherwise
Node Soprano::Statement::subject |
( |
|
) |
const |
Node Soprano::Statement::predicate |
( |
|
) |
const |
Node Soprano::Statement::object |
( |
|
) |
const |
Node Soprano::Statement::context |
( |
|
) |
const |
- Returns:
- The Context node.
void Soprano::Statement::setSubject |
( |
const Node & |
subject |
) |
|
void Soprano::Statement::setPredicate |
( |
const Node & |
predicate |
) |
|
Change the Statement predicate.
- Parameters:
-
| predicate | The new predicate. |
void Soprano::Statement::setObject |
( |
const Node & |
object |
) |
|
void Soprano::Statement::setContext |
( |
const Node & |
context |
) |
|
Friends And Related Function Documentation
The documentation for this class was generated from the following file:
- /home/builduser/STABLE_7/pkgs/soprano/BUILD/soprano-2.5.2/soprano/statement.h