#include <Soprano/Statement>
Public Member Functions | |
Statement () | |
Statement (const Node &subject, const Node &predicate, const Node &object, const Node &context=Node()) | |
Statement (const Statement &other) | |
virtual | ~Statement () |
Statement & | operator= (const Statement &other) |
bool | operator== (const Statement &other) const |
bool | operator!= (const Statement &other) const |
bool | matches (const Statement &other) const |
bool | isValid () const |
Node | subject () const |
Node | predicate () const |
Node | object () const |
Node | context () const |
void | setSubject (const Node &subject) |
void | setPredicate (const Node &predicate) |
void | setObject (const Node &object) |
void | setContext (const Node &context) |
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.
Definition at line 47 of file statement.h.
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.
subject | The subject (cannot be of type Node::LiteralNode) | |
predicate | The predicate (has to be of type Node::ResourceNode or Node::EmptyNode) | |
object | The object can be of either Node type. | |
context | The context node (has to be of type Node::ResourceNode or Node::EmptyNode) |
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.
Default Constructor, build an empty (invalid) Statement.
bool Soprano::Statement::operator== | ( | const Statement & | other | ) | const |
Match this statement against other. The only difference to operator== is that empty nodes are matched as wildcards, i.e. they match any other node.
true
if this statement matches other, false
if not. bool Soprano::Statement::operator!= | ( | const Statement & | other | ) | const |
Match this statement against other. The only difference to operator== is that empty nodes are matched as wildcards, i.e. they match any other node.
true
if this statement matches other, false
if not. bool Soprano::Statement::matches | ( | const Statement & | other | ) | const |
Match this statement against other. The only difference to operator== is that empty nodes are matched as wildcards, i.e. they match any other node.
true
if this statement matches other, false
if not. bool Soprano::Statement::isValid | ( | ) | const |
Node Soprano::Statement::subject | ( | ) | const |
Node Soprano::Statement::predicate | ( | ) | const |
Node Soprano::Statement::object | ( | ) | const |
Node Soprano::Statement::context | ( | ) | const |
void Soprano::Statement::setSubject | ( | const Node & | subject | ) |
void Soprano::Statement::setPredicate | ( | const Node & | predicate | ) |
void Soprano::Statement::setObject | ( | const Node & | object | ) |
void Soprano::Statement::setContext | ( | const Node & | context | ) |