syndication/rdf
#include <resource.h>
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 |
Public Member Functions inherited from Syndication::RDF::Node | |
virtual | ~Node () |
Additional Inherited Members | |
Static Protected Attributes inherited from Syndication::RDF::Node | |
static unsigned int | idCounter = 1 |
Detailed Description
Resources are the entities in the RDF graph.
In RSS, e.g. the feed channel itself and the items are resources.
Definition at line 51 of file resource.h.
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 | ) |
|
explicit |
creates a resource with a given URI.
Do not use this directly, use Model::createResource() instead.
- Parameters
-
uri the URI of the new resource
Definition at line 69 of file resource.cpp.
|
virtual |
destructor
Definition at line 85 of file resource.cpp.
Member Function Documentation
|
virtual |
Used by visitors for double dispatch.
See NodeVisitor for more information.
- Parameters
-
visitor the visitor calling the method ptr a 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.
|
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.
|
virtual |
returns whether the resource has a property property
in the associated model.
- Parameters
-
property the property to check for
Definition at line 106 of file resource.cpp.
|
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.
|
virtual |
returns whether this resource is an anonymous resource
Implements Syndication::RDF::Node.
Definition at line 190 of file resource.cpp.
|
virtual |
|
virtual |
returns whether the resource is a null resource
Implements Syndication::RDF::Node.
Definition at line 155 of file resource.cpp.
|
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.
|
virtual |
|
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.
|
virtual |
the model this resource belongs to
Definition at line 160 of file resource.cpp.
assigns a resource
- Parameters
-
other the resource to assign
Definition at line 89 of file resource.cpp.
|
virtual |
checks two resources for equality.
Currently both URI (or anonID) and id() must be equal!
- Parameters
-
other the node to compare this node to
Implements Syndication::RDF::Node.
Definition at line 95 of file resource.cpp.
|
virtual |
returns the list of all statements from the associated model where this resource is the subject and the given property the predicate.
- Parameters
-
property the property to check for
- Returns
- a list of the statements that satisfy the conditions.
Definition at line 127 of file resource.cpp.
|
virtual |
returns a statement from the associated model where this resource is the subject and the given property the predicate.
- Parameters
-
property the 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.
|
virtual |
|
virtual |
|
virtual |
returns a null string
Implements Syndication::RDF::Node.
Definition at line 212 of file resource.cpp.
|
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:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.