KDE 4.7 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.ResourceManager manager)
| __init__ (self, Nepomuk.Tag a0)
| __init__ (self, Nepomuk.Resource a0)
| __init__ (self, QString uriOrIdentifier)
| __init__ (self, QString uriOrIdentifier, Nepomuk.ResourceManager manager)
| __init__ (self, QUrl uri)
| __init__ (self, QUrl uri, Nepomuk.ResourceManager manager)
| __init__ (self, QString uri, QUrl type)
| __init__ (self, QUrl uri, QUrl type)
| __init__ (self, QString uri, QUrl type, Nepomuk.ResourceManager manager)
| __init__ (self, QUrl uri, QUrl type, Nepomuk.ResourceManager manager)
[Nepomuk.Resource] | tagOf (self)
## Static Methods
[Nepomuk.Tag] | allTags ()
QString | resourceTypeUri ()

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | Nepomuk.ResourceManager | manager
| ) |  |  |

Create a new empty and invalid Tag instance

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

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

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

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

__init__ | ( | self, |
|  | QString | uriOrIdentifier,
|  | Nepomuk.ResourceManager | manager
| ) |  |  |

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

Parameters:

  | manager | The resource manager to use. This allows to mix resources from different managers and, thus, different models.

Since:
  4.3

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

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

__init__ | ( | self, |
|  | QUrl | uri,
|  | Nepomuk.ResourceManager | manager
| ) |  |  |

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

Parameters:

  | manager | The resource manager to use. This allows to mix resources from different managers and, thus, different models.

Since:
  4.3

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

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

__init__ | ( | self, |
|  | QString | uri,
|  | QUrl | type,
|  | Nepomuk.ResourceManager | manager
| ) |  |  |

Since:
  4.3

__init__ | ( | self, |
|  | QUrl | uri,
|  | QUrl | type,
|  | Nepomuk.ResourceManager | manager
| ) |  |  |

Since:
  4.3

[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

## Static Method Documentation

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

In those cases it might be better to use the asyncronous approach via Query.QueryServiceClient and a Query.ResourceTypeTerm with type Soprano.Vocabulary.NAO.Tag().

QString resourceTypeUri | ( |  | ) |

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