Thing Class Reference
from PyKDE4.nepomuk import *
Inherits: Nepomuk.Resource
Namespace: Nepomuk
Detailed Description
\class Thing thing.h Nepomuk/Thing
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
Methods | |
__init__ (self, QUrl uri=QUrl(), QUrl pimoType=QUrl()) | |
__init__ (self, QUrl uri, QUrl pimoType, Nepomuk.ResourceManager manager) | |
__init__ (self, QString uriOrName, QUrl pimoType=QUrl()) | |
__init__ (self, QString uriOrName, QUrl pimoType, Nepomuk.ResourceManager manager) | |
__init__ (self, Nepomuk.Thing other) | |
__init__ (self, Nepomuk.Resource other) | |
__init__ (self, ResourceData a0) | |
[Nepomuk.Resource] | groundingOccurrences (self) |
[Nepomuk.Resource] | occurrences (self) |
[Nepomuk.Resource] | referencingOccurrences (self) |
Method Documentation
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).
- Parameters:
-
uri The URI of the Thing. If empty, a new random one will be created.
- Parameters:
-
pimoType The type of this Thing. Needs to be a subtype of pimo:Thing. If empty defaults to pimo:Thing.
__init__ | ( | self, | ||
QUrl | uri, | |||
QUrl | pimoType, | |||
Nepomuk.ResourceManager | manager | |||
) |
- Parameters:
-
manager The resource manager to use. This allows to mix resources from different managers and, thus, different models.
- Since:
- 4.3
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.
- Parameters:
-
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.
__init__ | ( | self, | ||
QString | uriOrName, | |||
QUrl | pimoType, | |||
Nepomuk.ResourceManager | manager | |||
) |
- Parameters:
-
manager The resource manager to use. This allows to mix resources from different managers and, thus, different models.
- Since:
- 4.3
__init__ | ( | self, | ||
Nepomuk.Thing | other | |||
) |
Copy constructor.
__init__ | ( | self, | ||
Nepomuk.Resource | other | |||
) |
Copy constructor.
- Parameters:
-
other the resoruce to construct the Thing from.
__init__ | ( | self, | ||
ResourceData | a0 | |||
) |
Constructor used internally.
[Nepomuk.Resource] groundingOccurrences | ( | self ) |
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.
\sa pimo:groundingResource
[Nepomuk.Resource] occurrences | ( | self ) |
[Nepomuk.Resource] referencingOccurrences | ( | self ) |