• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

syndication/rdf

Syndication::RDF::Model

Syndication::RDF::Model Class Reference

An RDF model, a set of RDF statements. More...

#include <model.h>

List of all members.

Public Member Functions

 Model (const Model &other)
 Model ()
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 (StatementPtr statement)
virtual void removeStatement (ResourcePtr subject, PropertyPtr predicate, NodePtr object)
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:
other another 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:
text the 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:
uri the 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:
uri the 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:
uri the 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:
id the 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:
id the 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:
other another 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:
other the 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:
id the 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 ( StatementPtr  statement  )  [virtual]

removes a statement from the model.

Parameters:
statement the statement to remove

Definition at line 132 of file model.cpp.

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

removes a statement from the model.

Parameters:
subject subject of the statement
predicate predicate of the statement
object object of the statement

Definition at line 137 of file model.cpp.

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

searches the model for a resource by ID.

Parameters:
id the 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:
type a 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

syndication/rdf

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal