syndication/rdf
Syndication::RDF::Model Class Reference
#include <model.h>
Detailed Description
An RDF model, a set of RDF statements.Model objects are implicitely shared.
Definition at line 46 of file model.h.
Public Member Functions | |
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 |
Model (const Model &other) | |
Model () | |
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 |
virtual | ~Model () |
Constructor & Destructor Documentation
Syndication::RDF::Model::Model | ( | ) |
Syndication::RDF::Model::Model | ( | const Model & | other | ) |
Member Function Documentation
StatementPtr Syndication::RDF::Model::addStatement | ( | ResourcePtr | subject, | |
PropertyPtr | predicate, | |||
NodePtr | object | |||
) | [virtual] |
LiteralPtr Syndication::RDF::Model::createLiteral | ( | const QString & | text | ) | [virtual] |
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
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
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
QString Syndication::RDF::Model::debugInfo | ( | ) | const [virtual] |
bool Syndication::RDF::Model::isEmpty | ( | ) | const [virtual] |
LiteralPtr Syndication::RDF::Model::literalByID | ( | uint | id | ) | const [virtual] |
NodePtr Syndication::RDF::Model::nodeByID | ( | uint | id | ) | const [virtual] |
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
PropertyPtr Syndication::RDF::Model::propertyByID | ( | uint | id | ) | const [virtual] |
void Syndication::RDF::Model::removeStatement | ( | StatementPtr | statement | ) | [virtual] |
void Syndication::RDF::Model::removeStatement | ( | ResourcePtr | subject, | |
PropertyPtr | predicate, | |||
NodePtr | object | |||
) | [virtual] |
ResourcePtr Syndication::RDF::Model::resourceByID | ( | uint | id | ) | const [virtual] |
QList< ResourcePtr > Syndication::RDF::Model::resourcesWithType | ( | ResourcePtr | type | ) | const [virtual] |
QList< StatementPtr > Syndication::RDF::Model::statements | ( | ) | const [virtual] |
The documentation for this class was generated from the following files: