syndication/rdf
#include <model.h>
List of all members.
Detailed Description
An RDF model, a set of RDF statements.
Model objects are implicitely shared.
- Author:
- Frank Osterfeld
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:
-
Definition at line 35 of file model.cpp.
Syndication::RDF::Model::~Model |
( |
| ) |
[virtual] |
Member Function Documentation
StatementPtr Syndication::RDF::Model::addStatement |
( |
ResourcePtr |
subject, |
|
|
PropertyPtr |
predicate, |
|
|
NodePtr |
object |
|
) |
| [virtual] |
adds a statement to the model.
- Parameters:
-
- 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:
-
- 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:
-
- 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:
-
- 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:
-
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:
-
- 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:
-
subject | subject of the statement |
predicate | predicate of the statement |
object | object 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:
-
statement | the 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:
-
- 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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:08:53 by
doxygen 1.7.5 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.