• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

soprano

Soprano::NRLModel

Soprano::NRLModel Class Reference

Model filter that enforces NRL cardinality rules. More...

#include <Soprano/NRLModel>

Inheritance diagram for Soprano::NRLModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 NRLModel (Model *parent)
 NRLModel ()
 ~NRLModel ()
Error::ErrorCode addNrlStatement (const Statement &s)
QUrl createGraph (const QUrl &type, QUrl *metadataGraph=0)
bool ignoreContext () const
Error::ErrorCode removeGraph (const QUrl &graph)
void setIgnoreContext (bool b)

Detailed Description

Model filter that enforces NRL cardinality rules.

The NRLModel enforces NRL cardinality rules. That means predicates with a cardinality of maximum 1 are always udpated while statements that define predicates with a maximum cardinality bigger than 1 are rejected once the maximum is reached (future versions might remove an earlier defined statement based on the time the old statements were added).

Thus, at the moment NRLModel is mostly usable for handling properties with a maximum cardinality of 1.

THE API AND EVEN THE COMPLETE CLASS IS SUBJECT TO CHANGE!

Author:
Sebastian Trueg <trueg@kde.org>
See also:
Vocabulary::NRL

Definition at line 53 of file nrlmodel.h.


Constructor & Destructor Documentation

Soprano::NRLModel::NRLModel (  ) 
Soprano::NRLModel::NRLModel ( Model *  parent  ) 
Soprano::NRLModel::~NRLModel (  ) 

Member Function Documentation

Error::ErrorCode Soprano::NRLModel::addNrlStatement ( const Statement &  s  ) 

Add a statement.

Parameters:
s The statement containing the property to be set. If the predicate has NRL cardinality restrictions existing statements will be updated. Otherwise this method has the same effect as Model::addStatement().

Adding a statement that defines a predicate with a maximum cardinality bigger than 1 which has already been reached fails with an error.

Returns:
Error::ErrorNone on success.
QUrl Soprano::NRLModel::createGraph ( const QUrl &  type,
QUrl *  metadataGraph = 0 
)

Create a new graph of type type.

This will actually create two graphs: the requested one and its metadata graph which will already contain basic metadata like creation date.

Returns:
The URI of the newly created graph.
Since:
2.3
bool Soprano::NRLModel::ignoreContext (  )  const
Returns:
true if contexts should be ignored when enforcing NRL rules.
See also:
setIgnoreContext()
Error::ErrorCode Soprano::NRLModel::removeGraph ( const QUrl &  graph  ) 

Remove a complete graph including its metadata graph.

This method can be seen as the counterpart to createGraph

Since:
2.3
void Soprano::NRLModel::setIgnoreContext ( bool  b  ) 

When enforcing the NRL cardinality rules NRLModel can either ignore the context of statements or treat different contexts as separate sets, each resetting the cardinality.

Parameters:
b If true (the default) NRLModel does ignore the context when enforcing rules. If false the NRL rules can be violated across contexts.
See also:
ignoreContext()

The documentation for this class was generated from the following file:
  • nrlmodel.h

soprano

Skip menu "soprano"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
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