21 #ifndef _NEPOMUK_RESOURCE_H_
22 #define _NEPOMUK_RESOURCE_H_
24 #include <QtCore/QHash>
25 #include <QtCore/QStringList>
31 #include "nepomuk_export.h"
35 class ResourceManager;
154 Resource(
const QString& pathOrIdentifier,
const QUrl& type = QUrl() );
169 #ifndef KDE_NO_DEPRECATED
170 KDE_DEPRECATED
Resource(
const QString& pathOrIdentifier,
const QString& type );
187 Resource(
const QUrl& uri,
const QUrl& type = QUrl() );
197 Resource(
const QUrl& uri,
const QUrl& type,
ResourceManager* manager );
202 Resource( ResourceData* );
212 Resource& operator=(
const Resource& other );
217 Resource& operator=(
const QUrl& uri );
243 #ifndef KDE_NO_DEPRECATED
244 KDE_DEPRECATED QString uri()
const;
260 QUrl resourceUri()
const;
276 #ifndef KDE_NO_DEPRECATED
277 KDE_DEPRECATED QString type()
const;
289 QUrl resourceType()
const;
297 QList<QUrl> types()
const;
304 void setTypes(
const QList<QUrl>& types );
311 void addType(
const QUrl& type );
317 bool hasType(
const QUrl& typeUri )
const;
327 QString className()
const;
332 #ifndef KDE_NO_DEPRECATED
333 KDE_DEPRECATED QHash<QString, Variant> allProperties()
const;
339 QHash<QUrl, Variant> properties()
const;
349 bool hasProperty(
const QUrl& uri )
const;
361 #ifndef KDE_NO_DEPRECATED
362 KDE_DEPRECATED
bool hasProperty(
const QString& uri )
const;
371 Variant property(
const QUrl& uri )
const;
376 #ifndef KDE_NO_DEPRECATED
377 KDE_DEPRECATED
Variant property(
const QString& uri )
const;
386 void setProperty(
const QUrl& uri,
const Variant& value );
396 void addProperty(
const QUrl& uri,
const Variant& value );
401 #ifndef KDE_NO_DEPRECATED
402 KDE_DEPRECATED
void setProperty(
const QString& uri,
const Variant& value );
410 void removeProperty(
const QUrl& uri );
420 void removeProperty(
const QUrl& uri,
const Variant& value );
425 #ifndef KDE_NO_DEPRECATED
426 KDE_DEPRECATED
void removeProperty(
const QString& uri );
449 bool isValid()
const;
458 QString genericLabel()
const;
468 QString genericDescription()
const;
475 QString genericIcon()
const;
490 bool operator==(
const Resource& )
const;
497 bool operator!=(
const Resource& )
const;
503 QString description()
const;
509 void setDescription(
const QString& value );
514 static QString descriptionUri();
519 QStringList identifiers()
const;
524 void setIdentifiers(
const QStringList& value );
529 void addIdentifier(
const QString& value );
534 static QString identifierUri();
539 QStringList altLabels()
const;
544 void setAltLabels(
const QStringList& value );
549 void addAltLabel(
const QString& value );
554 static QString altLabelUri();
559 QList<Resource> annotations()
const;
564 void setAnnotations(
const QList<Resource>& value );
569 void addAnnotation(
const Resource& value );
574 static QString annotationUri();
580 QList<Tag> tags()
const;
586 void setTags(
const QList<Tag>& value );
593 void addTag(
const Tag& value );
598 static QString tagUri();
603 QList<Resource> topics()
const;
608 void setTopics(
const QList<Resource>& value );
613 void addTopic(
const Resource& value );
618 static QString topicUri();
623 QList<Resource> isTopicOfs()
const;
628 void setIsTopicOfs(
const QList<Resource>& value );
633 void addIsTopicOf(
const Resource& value );
638 static QString isTopicOfUri();
643 QList<Resource> isRelateds()
const;
648 void setIsRelateds(
const QList<Resource>& value );
653 void addIsRelated(
const Resource& value );
658 static QString isRelatedUri();
663 QString label()
const;
668 void setLabel(
const QString& value );
673 static QString labelUri();
678 quint32 rating()
const;
683 void setRating(
const quint32& value );
688 static QString ratingUri();
696 QStringList symbols()
const;
704 void setSymbols(
const QStringList& value );
712 void addSymbol(
const QString& value );
717 static QString symbolUri();
723 QList<Resource> annotationOf()
const;
729 QList<Resource> isRelatedOf()
const;
744 static QList<Resource> allResources();
753 int usageCount()
const;
761 void increaseUsageCount();
797 void determineFinalResourceData()
const;
799 ResourceData* m_data;
804 friend class ResourceData;
Resource is the central object type in Nepomuk.
A Tag can be assigned to any Thing.
The ResourceManager is the central Nepomuk configuration point.
uint qHash(const Resource &res)
A property is a resource of type rdf:Property which relates a domain with a range.
QString errorString(ErrorCode code)
A communication error, i.e.
A Nepomuk PIMO Thing resource.
The Nepomuk Variant extends over QVariant by introducing direct support for Resource embedding...
A Nepomuk resource representing a file.
A Class is a resource of type rdf:Class.