KDE 4.6 PyKDE API Reference

- KDE's Python API

# ResourceTerm Class Reference

`from PyKDE4.nepomuk import *`

Inherits: Nepomuk.Query.Term
Namespace: Nepomuk.Query

## Detailed Description

\class ResourceTerm resourceterm.h Nepomuk/Query/ResourceTerm

Matches exactly one resource.

The ResourceTerm does only make sense as a sub term to ComparisonTerm to match to a known resource. The typical example would be matching against a known tag:

     Tag myTag = fancyGetTag();
     ComparisonTerm term( Vocabulary.NAO.hasTag(), ResourceTerm(myTag) );

Author:
  Sebastian Trueg <trueg@kde.org>

Since:
  4.4

## Methods

| __init__ (self, Nepomuk.Query.ResourceTerm term)
| __init__ (self, Nepomuk.Resource resource=Nepomuk.Resource())
Nepomuk.Resource | resource (self)
| setResource (self, Nepomuk.Resource resource)

## Method Documentation

__init__ | ( | self, |
|  | Nepomuk.Query.ResourceTerm | term
| ) |  |  |

Copy constructor.

__init__ | ( | self, |
|  | Nepomuk.Resource | resource=Nepomuk.Resource()
| ) |  |  |

Default constructor

Parameters:

  | resource | The resource this term should match against.

Nepomuk.Resource resource | ( |  | self ) |

The resource this term should match against.

\sa setResource()

setResource | ( | self, |
|  | Nepomuk.Resource | resource
| ) |  |  |

Set the resource this term should match against.

\sa resource()