syndication/rdf
resource.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SYNDICATION_RDF_RESOURCE_H
00024 #define SYNDICATION_RDF_RESOURCE_H
00025
00026 #include <syndication/rdf/node.h>
00027
00028 #include <boost/shared_ptr.hpp>
00029
00030 class QString;
00031
00032 template <class T> class QList;
00033
00034 namespace Syndication {
00035 namespace RDF {
00036
00037 class Model;
00038 class Property;
00039 typedef boost::shared_ptr<Property> PropertyPtr;
00040 class Resource;
00041 class Statement;
00042 typedef boost::shared_ptr<Statement> StatementPtr;
00043
00044 typedef boost::shared_ptr<Resource> ResourcePtr;
00045
00051 class SYNDICATION_EXPORT Resource : public Node
00052 {
00053 friend class Model;
00054
00055 public:
00056
00060 Resource();
00061
00067 Resource(const Resource& other);
00068
00075 explicit Resource(const QString& uri);
00076
00080 virtual ~Resource();
00081
00087 Resource& operator=(const Resource& other);
00088
00095 bool operator==(const Node& other) const;
00096
00103 virtual void accept(NodeVisitor* visitor, NodePtr ptr);
00104
00108 virtual Resource* clone() const;
00109
00113 virtual Model model() const;
00114
00121 virtual bool hasProperty(PropertyPtr property) const;
00122
00132 virtual StatementPtr property(PropertyPtr property) const;
00133
00142 virtual QList<StatementPtr> properties(PropertyPtr property) const;
00143
00147 virtual bool isNull() const;
00148
00153 virtual unsigned int id() const;
00154
00158 virtual bool isResource() const;
00159
00163 virtual bool isLiteral() const;
00164
00169 virtual bool isProperty() const;
00170
00174 virtual bool isAnon() const;
00175
00180 virtual bool isSequence() const;
00181
00185 virtual QString text() const;
00186
00190 virtual QString uri() const;
00191
00192
00197 virtual void setModel(const Model& model);
00198
00203 virtual void setId(unsigned int id);
00204
00205 private:
00206
00207 class ResourcePrivate;
00208 typedef boost::shared_ptr<ResourcePrivate> ResourcePrivatePtr;
00209 ResourcePrivatePtr d;
00210 };
00211
00212 }
00213 }
00214
00215 #endif // SYNDICATION_RDF_RESOURCE_H