• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Nepomuk

Nepomuk::Types::Entity

Nepomuk::Types::Entity Class Reference

Base class for static ontology entities Class and Property. More...

#include <entity.h>

Inheritance diagram for Nepomuk::Types::Entity:

Inheritance graph
[legend]

List of all members.


Public Member Functions

QString comment (const QString &language=KGlobal::locale()->language())
 Entity (const Entity &)
QIcon icon ()
bool isAvailable ()
bool isValid () const
QString label (const QString &language=KGlobal::locale()->language())
QString name () const
 operator QUrl () const
bool operator!= (const Entity &other) const
Entity & operator= (const Entity &)
bool operator== (const Entity &other) const
void reset (bool recursive=false)
QUrl uri () const
virtual ~Entity ()

Protected Member Functions

 Entity ()

Protected Attributes

QExplicitlySharedDataPointer
< EntityPrivate > 
d

Detailed Description

Base class for static ontology entities Class and Property.

It encapsulates the generic labels and comments that both types have.

Due to internal optimizations comparing two Entities is much faster than comparing two QUrl objects.

Author:
Sebastian Trueg <trueg@kde.org>

Definition at line 52 of file entity.h.


Constructor & Destructor Documentation

Nepomuk::Types::Entity::Entity ( const Entity &   ) 

Default copy constructor.

virtual Nepomuk::Types::Entity::~Entity (  )  [virtual]

Destructor.

Nepomuk::Types::Entity::Entity (  )  [protected]

Create an invalid Entity instance.


Member Function Documentation

QString Nepomuk::Types::Entity::comment ( const QString &  language = KGlobal::locale()->language()  ) 

Retrieve the comment of the entity (rdfs:comment).

Parameters:
language The code of the language to use. Defaults to the session language configured in KDE.
Returns:
The comment translated into language or the default fallback comment if no translation is available or an empty string if no comment could be found at all.

QIcon Nepomuk::Types::Entity::icon (  ) 

Retrieve the icon stored for the entity (nao:hasSymbol).

If no symbol is defined for the entity a null icon will be returned.

Since:
4.1

bool Nepomuk::Types::Entity::isAvailable (  ) 

Is this Entity available locally, i.e.

could its properties be loaded from the Nepomuk store.

bool Nepomuk::Types::Entity::isValid (  )  const

Is this a valid Entity, i.e.

has it a valid URI. A valid Entity does not necessarily have a label and a comment, it does not even have to exist in the Nepomuk store.

See also:
isAvailable

QString Nepomuk::Types::Entity::label ( const QString &  language = KGlobal::locale()->language()  ) 

Retrieve the label of the entity (rdfs:label).

Parameters:
language The code of the language to use. Defaults to the session language configured in KDE.
Returns:
The label translated into language or the default fallback label if no translation is available or the name() if no label could be found at all.

QString Nepomuk::Types::Entity::name (  )  const

The name of the resource.

The name equals the fragment of the URI.

Nepomuk::Types::Entity::operator QUrl (  )  const [inline]

An Entity can be used as a QUrl automagically.

Definition at line 147 of file entity.h.

bool Nepomuk::Types::Entity::operator!= ( const Entity &  other  )  const

Compares two Entity instances by simply comparing their URI.

Entity& Nepomuk::Types::Entity::operator= ( const Entity &   ) 

Copy operator.

bool Nepomuk::Types::Entity::operator== ( const Entity &  other  )  const

Compares two Entity instances by simply comparing their URI.

void Nepomuk::Types::Entity::reset ( bool  recursive = false  ) 

The Types classes are optimized for performance under the aasumption that ontologies never change during the execution time of an application.

Since there might be situations where this does not apply the internal cache can be reset via this method.

Parameters:
recursive If true all related entities will be reset as well.
Since:
4.1

QUrl Nepomuk::Types::Entity::uri (  )  const

The URI of the resource.


Member Data Documentation

QExplicitlySharedDataPointer<EntityPrivate> Nepomuk::Types::Entity::d [protected]

Definition at line 165 of file entity.h.


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

Nepomuk

Skip menu "Nepomuk"
  • Main Page
  • 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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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