Syndication::RDF::Statement

Search for usage in LXR

Syndication::RDF::Statement Class Reference

#include <statement.h>

Public Member Functions

 Statement ()
 
 Statement (const Statement &other)
 
 Statement (ResourcePtr subject, PropertyPtr predicate, NodePtr object)
 
virtual ~Statement ()
 
virtual ResourcePtr asResource () const
 
virtual QString asString () const
 
virtual bool isNull () const
 
virtual NodePtr object () const
 
Statementoperator= (const Statement &other)
 
virtual bool operator== (const Statement &other) const
 
virtual PropertyPtr predicate () const
 
virtual ResourcePtr subject () const
 

Detailed Description

An RDF statement, consisting of a triple (subject, predicate, object).

Definition at line 28 of file statement.h.

Constructor & Destructor Documentation

◆ Statement() [1/3]

Syndication::RDF::Statement::Statement ( )

creates a null statement

Definition at line 37 of file statement.cpp.

◆ Statement() [2/3]

Syndication::RDF::Statement::Statement ( const Statement & other)

creates a copy of another statement

Parameters
otherthe statement to copy

Definition at line 45 of file statement.cpp.

◆ Statement() [3/3]

Syndication::RDF::Statement::Statement ( ResourcePtr subject,
PropertyPtr predicate,
NodePtr object )

creates a statement Do not call this in your code, use Model::createStatement() instead.

Parameters
subjectthe subject resource of the statement
predicatethe predicate of the statement
objectthe object node of the statement

Definition at line 50 of file statement.cpp.

◆ ~Statement()

Syndication::RDF::Statement::~Statement ( )
virtual

destructor

Definition at line 59 of file statement.cpp.

Member Function Documentation

◆ asResource()

ResourcePtr Syndication::RDF::Statement::asResource ( ) const
virtual

returns the object of this statement as resource, if possible.

Returns
the object node as Resource, or null if the object is not a resource

Definition at line 101 of file statement.cpp.

◆ asString()

QString Syndication::RDF::Statement::asString ( ) const
virtual

returns the object of this statement as string, if possible.

Returns
the literal text as QString, or a null string if the object is not a literal

Definition at line 112 of file statement.cpp.

◆ isNull()

bool Syndication::RDF::Statement::isNull ( ) const
virtual

returns whether this statement is a null statement (i.e.

was created using Statement())

Definition at line 78 of file statement.cpp.

◆ object()

NodePtr Syndication::RDF::Statement::object ( ) const
virtual

the object of the statement

Definition at line 95 of file statement.cpp.

◆ operator=()

Statement & Syndication::RDF::Statement::operator= ( const Statement & other)

assigns another statement

Parameters
otherthe statement to assign

Definition at line 63 of file statement.cpp.

◆ operator==()

bool Syndication::RDF::Statement::operator== ( const Statement & other) const
virtual

returns whether two statements are equal.

Currently statements are equal, if they are from the same model (!) and subject, predicate and object are equal.

Parameters
otherthe statement to compare to

Definition at line 69 of file statement.cpp.

◆ predicate()

PropertyPtr Syndication::RDF::Statement::predicate ( ) const
virtual

the predicate of the statement

Definition at line 89 of file statement.cpp.

◆ subject()

ResourcePtr Syndication::RDF::Statement::subject ( ) const
virtual

the subject of the statement.

Definition at line 83 of file statement.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.