• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

syndication/rdf

  • Syndication
  • RDF
  • Resource
Public Member Functions
Syndication::RDF::Resource Class Reference

#include <resource.h>

Inheritance diagram for Syndication::RDF::Resource:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Resource ()
 Resource (const Resource &other)
 Resource (const QString &uri)
virtual ~Resource ()
virtual void accept (NodeVisitor *visitor, NodePtr ptr)
virtual Resource * clone () const
virtual bool hasProperty (PropertyPtr property) const
virtual unsigned int id () const
virtual bool isAnon () const
virtual bool isLiteral () const
virtual bool isNull () const
virtual bool isProperty () const
virtual bool isResource () const
virtual bool isSequence () const
virtual Model model () const
Resource & operator= (const Resource &other)
bool operator== (const Node &other) const
virtual QList< StatementPtr > properties (PropertyPtr property) const
virtual StatementPtr property (PropertyPtr property) const
virtual void setId (unsigned int id)
virtual void setModel (const Model &model)
virtual QString text () const
virtual QString uri () const

Detailed Description

Resources are the entities in the RDF graph.

In RSS, e.g. the feed channel itself and the items are resources.


Constructor & Destructor Documentation

Syndication::RDF::Resource::Resource ( )

creates a null resource

Definition at line 65 of file resource.cpp.

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

copies a resource

Parameters:
otherthe resource to copy

Definition at line 60 of file resource.cpp.

Syndication::RDF::Resource::Resource ( const QString &  uri) [explicit]

creates a resource with a given URI.

Do not use this directly, use Model::createResource() instead.

Parameters:
urithe URI of the new resource

Definition at line 69 of file resource.cpp.

Syndication::RDF::Resource::~Resource ( ) [virtual]

destructor

Definition at line 85 of file resource.cpp.


Member Function Documentation

void Syndication::RDF::Resource::accept ( NodeVisitor *  visitor,
NodePtr  ptr 
) [virtual]

Used by visitors for double dispatch.

See NodeVisitor for more information.

Parameters:
visitorthe visitor calling the method
ptra shared pointer object for this node

Reimplemented from Syndication::RDF::Node.

Reimplemented in Syndication::RDF::Sequence, and Syndication::RDF::Property.

Definition at line 143 of file resource.cpp.

Resource * Syndication::RDF::Resource::clone ( ) const [virtual]

creates a copy of the resource object

Implements Syndication::RDF::Node.

Reimplemented in Syndication::RDF::Sequence, and Syndication::RDF::Property.

Definition at line 138 of file resource.cpp.

bool Syndication::RDF::Resource::hasProperty ( PropertyPtr  property) const [virtual]

returns whether the resource has a property property in the associated model.

Parameters:
propertythe property to check for

Definition at line 106 of file resource.cpp.

unsigned int Syndication::RDF::Resource::id ( ) const [virtual]

the identifier of this node.

the ID is unique per model and set by the associated model at creation time.

Implements Syndication::RDF::Node.

Definition at line 150 of file resource.cpp.

bool Syndication::RDF::Resource::isAnon ( ) const [virtual]

returns whether this resource is an anonymous resource

Implements Syndication::RDF::Node.

Definition at line 190 of file resource.cpp.

bool Syndication::RDF::Resource::isLiteral ( ) const [virtual]

returns false

Implements Syndication::RDF::Node.

Definition at line 185 of file resource.cpp.

bool Syndication::RDF::Resource::isNull ( ) const [virtual]

returns whether the resource is a null resource

Implements Syndication::RDF::Node.

Definition at line 155 of file resource.cpp.

bool Syndication::RDF::Resource::isProperty ( ) const [virtual]

returns true if this resource is also a property, false otherwise

Implements Syndication::RDF::Node.

Reimplemented in Syndication::RDF::Property.

Definition at line 180 of file resource.cpp.

bool Syndication::RDF::Resource::isResource ( ) const [virtual]

returns true

Implements Syndication::RDF::Node.

Definition at line 175 of file resource.cpp.

bool Syndication::RDF::Resource::isSequence ( ) const [virtual]

returns true if this resource is also a sequence, false otherwise.

Implements Syndication::RDF::Node.

Reimplemented in Syndication::RDF::Sequence.

Definition at line 195 of file resource.cpp.

Model Syndication::RDF::Resource::model ( ) const [virtual]

the model this resource belongs to

Definition at line 160 of file resource.cpp.

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

assigns a resource

Parameters:
otherthe resource to assign

Definition at line 89 of file resource.cpp.

bool Syndication::RDF::Resource::operator== ( const Node &  other) const [virtual]

checks two resources for equality.

Currently both URI (or anonID) _and_ id() must be equal!

Parameters:
otherthe node to compare this node to

Implements Syndication::RDF::Node.

Definition at line 95 of file resource.cpp.

QList< StatementPtr > Syndication::RDF::Resource::properties ( PropertyPtr  property) const [virtual]

returns the list of all statements from the associated model where this resource is the subject and the given property the predicate.

Parameters:
propertythe property to check for
Returns:
a list of the statements that satisfy the conditions.

Definition at line 127 of file resource.cpp.

StatementPtr Syndication::RDF::Resource::property ( PropertyPtr  property) const [virtual]

returns a statement from the associated model where this resource is the subject and the given property the predicate.

Parameters:
propertythe property to check for
Returns:
the first statement found that satisfies the conditions. If there are multiple statements, an arbitrary one is returned.

Definition at line 116 of file resource.cpp.

void Syndication::RDF::Resource::setId ( unsigned int  id) [virtual]

used in Model

Implements Syndication::RDF::Node.

Definition at line 206 of file resource.cpp.

void Syndication::RDF::Resource::setModel ( const Model &  model) [virtual]

used in Model

Implements Syndication::RDF::Node.

Definition at line 200 of file resource.cpp.

QString Syndication::RDF::Resource::text ( ) const [virtual]

returns a null string

Implements Syndication::RDF::Node.

Definition at line 212 of file resource.cpp.

QString Syndication::RDF::Resource::uri ( ) const [virtual]

returns the URI of the resource

Definition at line 217 of file resource.cpp.


The documentation for this class was generated from the following files:
  • resource.h
  • resource.cpp

syndication/rdf

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.5
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