Nepomuk
#include <Nepomuk/Thing>
Public Member Functions | |
Thing (const QUrl &uri=QUrl(), const QUrl &pimoType=QUrl()) | |
Thing (const QUrl &uri, const QUrl &pimoType, ResourceManager *manager) | |
Thing (const QString &uriOrName, const QUrl &pimoType=QUrl()) | |
Thing (const QString &uriOrName, const QUrl &pimoType, ResourceManager *manager) | |
Thing (const Thing &other) | |
Thing (const Resource &other) | |
Thing (ResourceData *) | |
~Thing () | |
void | addGroundingOccurrence (const Resource &res) |
QList< Resource > | groundingOccurrences () const |
QList< Resource > | occurrences () const |
Thing & | operator= (const Thing &res) |
Thing & | operator= (const Resource &res) |
Thing & | operator= (const QUrl &res) |
QList< Resource > | referencingOccurrences () const |
Public Member Functions inherited from Nepomuk::Resource | |
Resource () | |
Resource (ResourceManager *manager) | |
Resource (const Resource &) | |
Resource (const QString &pathOrIdentifier, const QUrl &type=QUrl()) | |
Resource (const QString &pathOrIdentifier, const QUrl &type, ResourceManager *manager) | |
Resource (const QString &pathOrIdentifier, const QString &type) | |
Resource (const QUrl &uri, const QUrl &type=QUrl()) | |
Resource (const QUrl &uri, const QUrl &type, ResourceManager *manager) | |
Resource (ResourceData *) | |
virtual | ~Resource () |
void | addAltLabel (const QString &value) |
void | addAnnotation (const Resource &value) |
void | addIdentifier (const QString &value) |
void | addIsRelated (const Resource &value) |
void | addIsTopicOf (const Resource &value) |
void | addProperty (const QUrl &uri, const Variant &value) |
void | addSymbol (const QString &value) |
void | addTag (const Tag &value) |
void | addTopic (const Resource &value) |
void | addType (const QUrl &type) |
QHash< QString, Variant > | allProperties () const |
QStringList | altLabels () const |
QList< Resource > | annotationOf () const |
QList< Resource > | annotations () const |
QString | className () const |
QString | description () const |
bool | exists () const |
QString | genericDescription () const |
QString | genericIcon () const |
QString | genericLabel () const |
bool | hasProperty (const QUrl &uri) const |
bool | hasProperty (const Types::Property &p, const Variant &v) const |
bool | hasProperty (const QString &uri) const |
bool | hasType (const QUrl &typeUri) const |
QStringList | identifiers () const |
void | increaseUsageCount () |
bool | isFile () const |
QList< Resource > | isRelatedOf () const |
QList< Resource > | isRelateds () const |
QList< Resource > | isTopicOfs () const |
bool | isValid () const |
QString | label () const |
ResourceManager * | manager () const |
bool | operator!= (const Resource &) const |
Resource & | operator= (const Resource &other) |
Resource & | operator= (const QUrl &uri) |
bool | operator== (const Resource &) const |
Thing | pimoThing () |
QHash< QUrl, Variant > | properties () const |
Variant | property (const QUrl &uri) const |
Variant | property (const QString &uri) const |
quint32 | rating () const |
void | remove () |
void | removeProperty (const QUrl &uri) |
void | removeProperty (const QUrl &uri, const Variant &value) |
void | removeProperty (const QString &uri) |
QUrl | resourceType () const |
QUrl | resourceUri () const |
void | setAltLabels (const QStringList &value) |
void | setAnnotations (const QList< Resource > &value) |
void | setDescription (const QString &value) |
void | setIdentifiers (const QStringList &value) |
void | setIsRelateds (const QList< Resource > &value) |
void | setIsTopicOfs (const QList< Resource > &value) |
void | setLabel (const QString &value) |
void | setProperty (const QUrl &uri, const Variant &value) |
void | setProperty (const QString &uri, const Variant &value) |
void | setRating (const quint32 &value) |
void | setSymbols (const QStringList &value) |
void | setTags (const QList< Tag > &value) |
void | setTopics (const QList< Resource > &value) |
void | setTypes (const QList< QUrl > &types) |
QStringList | symbols () const |
QList< Tag > | tags () const |
File | toFile () const |
QList< Resource > | topics () const |
QString | type () const |
QList< QUrl > | types () const |
QString | uri () const |
int | usageCount () const |
Additional Inherited Members | |
Static Public Member Functions inherited from Nepomuk::Resource | |
static QList< Resource > | allResources () |
static QString | altLabelUri () |
static QString | annotationUri () |
static QString | descriptionUri () |
static Resource | fromResourceUri (const KUrl &uri, const Nepomuk::Types::Class &type=Nepomuk::Types::Class(), ResourceManager *manager=0) |
static QString | identifierUri () |
static QString | isRelatedUri () |
static QString | isTopicOfUri () |
static QString | labelUri () |
static QString | ratingUri () |
static QString | symbolUri () |
static QString | tagUri () |
static QString | topicUri () |
Detailed Description
A Nepomuk PIMO Thing resource.
A Thing represents a unique abstract concept/idea or real-world entity which can have multiple representations or occurrences.
A typical example for a Thing is a unique person resource which identifies the person itself, not any representation such as an addressbook entry.
Things are typically grounded via application resources, i.e. those resources that are created or handled by applications. Again the typical example is the addressbook entry.
In general it is recommended to alway use the Thing instead of the grounding resource to annotate, i.e. to add tags, or relate to other resources. The advantage is its uniqueness. While there can be many occurrences of one concept there is only one Thing, identifying uniquely.
- Since
- 4.2
Constructor & Destructor Documentation
Nepomuk::Thing::Thing | ( | const QUrl & | uri = QUrl() , |
const QUrl & | pimoType = QUrl() |
||
) |
Create a Thing object with URI uri
.
If the Thing does not exist in the Nepomuk storage yet, it will be created once a writing method is called (such as Resource::setProperty).
Nepomuk::Thing::Thing | ( | const QUrl & | uri, |
const QUrl & | pimoType, | ||
ResourceManager * | manager | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
manager The resource manager to use. This allows to mix resources from different managers and, thus, different models.
- Since
- 4.3
Nepomuk::Thing::Thing | ( | const QString & | uriOrName, |
const QUrl & | pimoType = QUrl() |
||
) |
Create a new Thing with label or URI uriOrName
.
- Parameters
-
uriOrName The URI or the label of the Thing. The constructor tries hard to find the Thing associated. If it is not found, a new Thing will be created. pimoType The type of this Thing. Needs to be a subtype of pimo:Thing. If empty defaults to pimo:Thing.
Be aware that using the other constructor is always faster in case the URI of the Thing is known.
Nepomuk::Thing::Thing | ( | const QString & | uriOrName, |
const QUrl & | pimoType, | ||
ResourceManager * | manager | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
manager The resource manager to use. This allows to mix resources from different managers and, thus, different models.
- Since
- 4.3
Nepomuk::Thing::Thing | ( | const Thing & | other | ) |
Copy constructor.
Nepomuk::Thing::Thing | ( | const Resource & | other | ) |
Copy constructor.
- Parameters
-
other the resoruce to construct the Thing from.
Nepomuk::Thing::Thing | ( | ResourceData * | ) |
Constructor used internally.
Nepomuk::Thing::~Thing | ( | ) |
Desctructor.
Member Function Documentation
void Nepomuk::Thing::addGroundingOccurrence | ( | const Resource & | res | ) |
Add a grounding occurrence for this Thing.
Grounding resources are physical representations of the Thing.
An example is an mp3 file which represents an audio track or a website which represents a company or a person. Or the addressbook entry for an abstract person thing.
- See also
- pimo:groundingResource
QList<Resource> Nepomuk::Thing::groundingOccurrences | ( | ) | const |
Get the grounding occurrences for this Thing.
Grounding resources are physical representations of the Thing.
An example is an mp3 file which represents an audio track or a website which represents a company or a person. Or the addressbook entry for an abstract person thing.
- See also
- pimo:groundingResource
QList<Resource> Nepomuk::Thing::occurrences | ( | ) | const |
Thing& Nepomuk::Thing::operator= | ( | const QUrl & | res | ) |
Assignment operator.
QList<Resource> Nepomuk::Thing::referencingOccurrences | ( | ) | const |
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.