• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

syndication/rdf

  • Syndication
  • RDF
  • Model
Public Member Functions | List of all members
Syndication::RDF::Model Class Reference

#include <model.h>

Public Member Functions

 Model ()
 
 Model (const Model &other)
 
virtual ~Model ()
 
virtual StatementPtr addStatement (ResourcePtr subject, PropertyPtr predicate, NodePtr object)
 
virtual LiteralPtr createLiteral (const QString &text)
 
virtual PropertyPtr createProperty (const QString &uri)
 
virtual ResourcePtr createResource (const QString &uri=QString())
 
virtual SequencePtr createSequence (const QString &uri=QString())
 
virtual QString debugInfo () const
 
virtual bool isEmpty () const
 
virtual LiteralPtr literalByID (uint id) const
 
virtual NodePtr nodeByID (uint id) const
 
Model & operator= (const Model &other)
 
bool operator== (const Model &other) const
 
virtual PropertyPtr propertyByID (uint id) const
 
virtual void removeStatement (ResourcePtr subject, PropertyPtr predicate, NodePtr object)
 
virtual void removeStatement (StatementPtr statement)
 
virtual ResourcePtr resourceByID (uint id) const
 
virtual QList< ResourcePtr > resourcesWithType (ResourcePtr type) const
 
virtual QList< StatementPtr > statements () const
 

Detailed Description

An RDF model, a set of RDF statements.

Model objects are implicitely shared.

Author
Frank Osterfeld

Definition at line 49 of file model.h.

Constructor & Destructor Documentation

Syndication::RDF::Model::Model ( )

default constructor, creates an empty model containing no statements

Definition at line 31 of file model.cpp.

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

constructs a model from another.

Both models will share the same set of statements, so adding/removing statements from one model also modifies the other!

Parameters
otheranother model

Definition at line 35 of file model.cpp.

Syndication::RDF::Model::~Model ( )
virtual

destructor

Definition at line 40 of file model.cpp.

Member Function Documentation

StatementPtr Syndication::RDF::Model::addStatement ( ResourcePtr  subject,
PropertyPtr  predicate,
NodePtr  object 
)
virtual

adds a statement to the model.

Parameters
subject
predicate
object
Returns
a shared pointer to a statement associated with this model, with the given subject, predicate and object

Definition at line 146 of file model.cpp.

LiteralPtr Syndication::RDF::Model::createLiteral ( const QString &  text)
virtual

creates a literal and associates it with this model.

Parameters
textthe literal text
Returns
a shared pointer to the requested literal

Definition at line 123 of file model.cpp.

PropertyPtr Syndication::RDF::Model::createProperty ( const QString &  uri)
virtual

creates a property and associates it with this model.

If the model already contains a property with the given URI, the existing instance is returned.

Parameters
urithe URI of the property. This must be non-empty, otherwise null property is returned
Returns
a shared pointer to the requested property

Definition at line 55 of file model.cpp.

ResourcePtr Syndication::RDF::Model::createResource ( const QString &  uri = QString())
virtual

creates a resource and associates it with this model.

If the model already contains a resource with the given URI, the existing instance is returned.

Parameters
urithe URI of the resource. If a null string, a blank node is created.
Returns
a shared pointer to the requested resource

Definition at line 80 of file model.cpp.

SequencePtr Syndication::RDF::Model::createSequence ( const QString &  uri = QString())
virtual

creates a sequence and associates it with this model.

If the model already contains a sequence with the given URI, the existing instance is returned.

Parameters
urithe URI of the sequence, or a null string for an anonymous instance
Returns
a shared pointer to the requested sequence

Definition at line 98 of file model.cpp.

QString Syndication::RDF::Model::debugInfo ( ) const
virtual

/** a debug string listing the contained statements for debugging purposes

Returns
debug string

Definition at line 274 of file model.cpp.

bool Syndication::RDF::Model::isEmpty ( ) const
virtual

returns whether this model is empty, i.e.

contains no statements.

Definition at line 198 of file model.cpp.

LiteralPtr Syndication::RDF::Model::literalByID ( uint  id) const
virtual

searches the model for a literal by ID.

Parameters
idthe ID to search for
Returns
the literal with the given ID, or a null literal if the model doesn't contain a literal with this ID

Definition at line 376 of file model.cpp.

NodePtr Syndication::RDF::Model::nodeByID ( uint  id) const
virtual

searches the model for a node by ID.

Parameters
idthe ID to search for
Returns
the node with the given ID, or a null node (which is of type Literal) if the model doesn't contain the node with this ID

Definition at line 317 of file model.cpp.

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

assigns another model.

Both models will share the same set of statements, so adding/removing statements from one model also modifies the other!

Parameters
otheranother model

Definition at line 44 of file model.cpp.

bool Syndication::RDF::Model::operator== ( const Model &  other) const

Returns whether two models objects represent the same model (i.e.

share the same underlying statement set). Currently this method does not compare the statement list. Two indepently created models containing the same statements are not equal!

Parameters
otherthe model to compare to

Definition at line 50 of file model.cpp.

PropertyPtr Syndication::RDF::Model::propertyByID ( uint  id) const
virtual

searches the model for a property by ID.

Parameters
idthe ID to search for
Returns
the property with the given ID, or a null property if the model doesn't contain a property with this ID

Definition at line 355 of file model.cpp.

void Syndication::RDF::Model::removeStatement ( ResourcePtr  subject,
PropertyPtr  predicate,
NodePtr  object 
)
virtual

removes a statement from the model.

Parameters
subjectsubject of the statement
predicatepredicate of the statement
objectobject of the statement

Definition at line 137 of file model.cpp.

void Syndication::RDF::Model::removeStatement ( StatementPtr  statement)
virtual

removes a statement from the model.

Parameters
statementthe statement to remove

Definition at line 132 of file model.cpp.

ResourcePtr Syndication::RDF::Model::resourceByID ( uint  id) const
virtual

searches the model for a resource by ID.

Parameters
idthe ID to search for
Returns
the resource with the given ID, or a null resource if the model doesn't contain a resource with this ID

Definition at line 334 of file model.cpp.

QList< ResourcePtr > Syndication::RDF::Model::resourcesWithType ( ResourcePtr  type) const
virtual

returns all resources of a given type.

subClassOf semantics are ignored.

Parameters
typea resource representing an RDFS class

Definition at line 300 of file model.cpp.

QList< StatementPtr > Syndication::RDF::Model::statements ( ) const
virtual

returns a list of the statements in this model.

Definition at line 269 of file model.cpp.


The documentation for this class was generated from the following files:
  • model.h
  • model.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

syndication/rdf

Skip menu "syndication/rdf"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal