• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Nepomuk

Nepomuk::Types::Property

Nepomuk::Types::Property Class Reference

A property is a resource of type rdf:Property which relates a domain with a range. More...

#include <Nepomuk/Types/Property>

Inheritance diagram for Nepomuk::Types::Property:

Inheritance graph
[legend]

List of all members.


Public Member Functions

int cardinality ()
Class domain ()
Property inverseProperty ()
bool isParentOf (const Property &other)
bool isSubPropertyOf (const Property &other)
Literal literalRangeType ()
int maxCardinality ()
int minCardinality ()
Property & operator= (const Property &)
QList< Property > parentProperties ()
 Property (const Property &)
 Property (const QUrl &uri)
 Property ()
Class range ()
QList< Property > subProperties ()
 ~Property ()

Detailed Description

A property is a resource of type rdf:Property which relates a domain with a range.

The latter one can be a Literal or a Class.

Property instances are explicitly shared. Two instances created with the same uri reference the same data.

While Resource objects can be changed Property instances are considered to be static and never changed during their lifetime.

Author:
Sebastian Trueg <trueg@kde.org>

Definition at line 52 of file property.h.


Constructor & Destructor Documentation

Nepomuk::Types::Property::Property (  ) 

Default constructor.

Creates an empty Property.

Nepomuk::Types::Property::Property ( const QUrl &  uri  ) 

Create the property referred to by uri.

The result is either a valid property which could be loaded from the Nepomuk store or a simple property which only contains the uri.

Be aware that the data is only loaded once read.

Subsequent calls result in a simple hash lookup of cached data.

Nepomuk::Types::Property::Property ( const Property &   ) 

Default copy constructor.

Nepomuk::Types::Property::~Property (  ) 

Destructor.


Member Function Documentation

int Nepomuk::Types::Property::cardinality (  ) 

The cardinality of this property as specified by nrl:cardinality.

Returns:
the cardinality of the property or -1 if none was set.

Class Nepomuk::Types::Property::domain (  ) 

The domain of the property.

Property Nepomuk::Types::Property::inverseProperty (  ) 

The inverse property (nrl:inverseProperty).

Returns:
A Property instance representing the inverse property of this one or 0 if none was specified in the ontology.

bool Nepomuk::Types::Property::isParentOf ( const Property &  other  ) 

Check if a property inherits this property.

This is a recursive method which does not only check direct child propertyes.

Returns:
true if other is derived from this property, false otherwise.

bool Nepomuk::Types::Property::isSubPropertyOf ( const Property &  other  ) 

Check if this property is derived from another property.

This is a recursive method which does not only check direct child propertyes.

Returns:
true if this property is derived from other, false otherwise.

Literal Nepomuk::Types::Property::literalRangeType (  ) 

If the rage of this property is a literal (i.e.

range returns an invalid Class) this method provides the literal type.

Returns:
the literal type of this property or an empty, invalid Literal if the range is a Class.
See also:
range

int Nepomuk::Types::Property::maxCardinality (  ) 

The maximum cardinality of this property as specified by nrl:maxCardinality.

Returns:
the maximum cardinality of the property or -1 if none was set.

int Nepomuk::Types::Property::minCardinality (  ) 

The minimum cardinality of this property as specified by nrl:minCardinality.

Returns:
the minimum cardinality of the property or -1 if none was set.

Property& Nepomuk::Types::Property::operator= ( const Property &   ) 

Copy operator.

QList<Property> Nepomuk::Types::Property::parentProperties (  ) 

Each property can have multiple parent properties.

Returns:
A list of all parent properties of this property. If the list is emppty it means that the property has no direct parents, i.e. it is derived from rdf:Resource.

Class Nepomuk::Types::Property::range (  ) 

The range of the property.

Returns:
The range of the property or an invalid Class in case the range of this poperty is a literal.
See also:
literalRange

QList<Property> Nepomuk::Types::Property::subProperties (  ) 

Returns:
A list of all properties that have this property as a parent. Be aware that this list can never be final since other ontologies that have not been loaded yet may contain properties that are derived from this property.


The documentation for this class was generated from the following file:
  • property.h

Nepomuk

Skip menu "Nepomuk"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal