• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Nepomuk

  • Nepomuk
  • Thing
Public Member Functions

Nepomuk::Thing Class Reference

A Nepomuk PIMO Thing resource. More...

#include <Nepomuk/Thing>

Inheritance diagram for Nepomuk::Thing:
Inheritance graph
[legend]

List of all members.

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, ResourceManager *manager)
 Thing (const Thing &other)
 Thing (const QString &uriOrName, const QUrl &pimoType=QUrl())
 Thing (const Resource &other)
 Thing (ResourceData *)
 ~Thing ()
void addGroundingOccurrence (const Resource &res)
QList< Resource > groundingOccurrences () const
QList< Resource > occurrences () const
Thing & operator= (const Resource &res)
Thing & operator= (const Thing &res)
Thing & operator= (const QUrl &res)
QList< Resource > referencingOccurrences () const

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.

Author:
Sebastian Trueg <trueg@kde.org>
Since:
4.2

Definition at line 57 of file thing.h.


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).

Parameters:
uriThe URI of the Thing. If empty, a new random one will be created.
pimoTypeThe type of this Thing. Needs to be a subtype of pimo:Thing. If empty defaults to pimo:Thing.
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:
managerThe 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:
uriOrNameThe 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.
pimoTypeThe 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:
managerThe 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:
otherthe 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 Thing &  res)

Assignment operator.

Thing& Nepomuk::Thing::operator= ( const Resource &  res)

Assignment operator.

Reimplemented from Nepomuk::Resource.

Thing& Nepomuk::Thing::operator= ( const QUrl &  res)

Assignment operator.

Reimplemented from Nepomuk::Resource.

QList<Resource> Nepomuk::Thing::referencingOccurrences ( ) const

The documentation for this class was generated from the following file:
  • thing.h

Nepomuk

Skip menu "Nepomuk"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal