KDE 4.3 PyKDE API Reference

- KDE's Python API

# Property Class Reference

`from PyKDE4.nepomuk import *`

## Detailed Description

Represents the property of a resource.

This class keeps all the information of a resource property that has been collected by the ontology parser.

## Methods

| __init__ (self)
| __init__ (self, QString uri, QString type)
QString | comment (self)
ResourceClass | domain (self)
bool | hasSimpleType (self)
Property | inverseProperty (self)
bool | isList (self)
QString | name (self)
| setComment (self, QString comment)
| setDomain (self, ResourceClass domain)
| setInverseProperty (self, Property property)
| setIsList (self, bool isList)
| setType (self, QString type)
| setUri (self, QString uri)
QString | type (self)
QString | typeConversionMethod (self)
QString | typeString (self, bool simple=0, QString nameSpace=QString())
QString | uri (self)

## Method Documentation

__init__ | ( |  | self ) |

Creates a new property.

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

Creates a new property of a given type and with a given uri.

Parameters:

  | uri | The uri that defines the property.
  | type | The type the property is of.

QString comment | ( |  | self ) |

Returns the comment of the property.

ResourceClass domain | ( |  | self ) |

Returns the domain resource the property belongs to.

bool hasSimpleType | ( |  | self ) |

Returns whether the property is of simple type.

Property inverseProperty | ( |  | self ) |

Returns the inverse property of this property.

bool isList | ( |  | self ) |

Returns whether the property is a list of values.

QString name | ( |  | self ) |

Returns the name of the property.

setComment | ( | self, |
|  | QString | comment
| ) |  |  |

Sets the comment of the property.

setDomain | ( | self, |
|  | ResourceClass | domain
| ) |  |  |

Sets the domain the property belongs to.

setInverseProperty | ( | self, |
|  | Property | property
| ) |  |  |

Sets the inverse property of this property.

setIsList | ( | self, |
|  | bool | isList
| ) |  |  |

Sets whether the property is a list of values.

setType | ( | self, |
|  | QString | type
| ) |  |  |

Sets the type of the property.

setUri | ( | self, |
|  | QString | uri
| ) |  |  |

Sets the uri of the property.

QString type | ( |  | self ) |

Returns the scope of the property.

QString typeConversionMethod | ( |  | self ) |

Returns the conversion method of the property.

QString typeString | ( | self, |
|  | bool | simple=0,
|  | QString | nameSpace=QString()
| ) |  |  |

Returns the type string of the property.

QString uri | ( |  | self ) |

Returns the uri of the property.