# class Tag

###

Module | nepomuk
Namespace | Nepomuk
Class | Tag
Inherits | Nepomuk::Resource

\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

- Tag ( )

  returns ctor

  Create a new empty and invalid Tag instance

- Tag (a0)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  a0 | Nepomuk.Tag |

  Default copy constructor

- Tag (a0)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  a0 | Nepomuk.Resource |

- Tag (uriOrIdentifier)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  uriOrIdentifier | QString |

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

- Tag (uri)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  uri | QUrl |

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

- Tag (uri, type)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  uri | QString |
  type | QUrl |

- Tag (uri, type)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  uri | QUrl |
  type | QUrl |

- allTags ( )

  returns QList<Nepomuk::Tag>
  static

  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.

- resourceTypeUri ( )

  returns QString
  static

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

- tagOf ( )

  returns QList<Nepomuk::Resource>

  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.

  See also ResourceManager.allResourcesWithProperty