KDE 4.2 PyKDE API Reference

- KDE's Python API

# Tag Class Reference

`from PyKDE4.nepomuk import *`

Inherits: Nepomuk.Resource
Namespace: Nepomuk

## Detailed Description

\class Tag tag.h Nepomuk/Tag

A Tag can be assigned to any Thing. This allows simple grouping of resources. Each Tag is identifed by its label which should be unique.

Author:
  Sebastian Trueg <trueg@kde.org>

## Methods

| __init__ (self)
| __init__ (self, Nepomuk.Tag a0)
| __init__ (self, Nepomuk.Resource a0)
| __init__ (self, QString uriOrIdentifier)
| __init__ (self, QUrl uri)
| __init__ (self, QString uri, QUrl type)
| __init__ (self, QUrl uri, QUrl type)
[Nepomuk.Resource] | tagOf (self)

## Static Methods

[Nepomuk.Tag] | allTags ()
QString | resourceTypeUri ()

## Method Documentation

__init__ | ( |  | self ) |

Create a new empty and invalid Tag instance

__init__ | ( | self, |
|  | Nepomuk.Tag | a0
| ) |  |  |

Default copy constructor

__init__ | ( | self, |
|  | Nepomuk.Resource | a0
| ) |  |  |

__init__ | ( | self, |
|  | QString | uriOrIdentifier
| ) |  |  |

Create a new Tag instance representing the resource referenced by uriOrIdentifier.

__init__ | ( | self, |
|  | QUrl | uri
| ) |  |  |

Create a new Tag instance representing the resource referenced by uri.

__init__ | ( | self, |
|  | QString | uri,
|  | QUrl | type
| ) |  |  |

__init__ | ( | self, |
|  | QUrl | uri,
|  | QUrl | type
| ) |  |  |

[Nepomuk.Tag] allTags | ( |  | ) |

Retrieve a list of all available Tag resources. This list consists of all resource of type Tag that are stored in the local Nepomuk meta data storage and any changes made locally. Be aware that in some cases this list can get very big. Then it might be better to use libKNep directly.

QString resourceTypeUri | ( |  | ) |

Returns:
  The URI of the resource type that is used in Tag instances.

[Nepomuk.Resource] tagOf | ( |  | self ) |

Get all resources that have this resource set as property 'Tag'. Each Resource can be tagged with an arbitrary number of Tags. This allows a simple grouping of resources. \sa ResourceManager.allResourcesWithProperty