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

Nepomuk

Nepomuk::Types::Class

Nepomuk::Types::Class Class Reference

A Class is a resource of type rdf:Class. More...

#include <Nepomuk/Types/Class>

Inheritance diagram for Nepomuk::Types::Class:

Inheritance graph
[legend]

List of all members.


Public Member Functions

QList< Class > allParentClasses ()
QList< Class > allSubClasses ()
 Class (const Class &)
 Class (const QUrl &uri)
 Class ()
QList< Property > domainOf ()
Property findPropertyByLabel (const QString &label, const QString &language=QString())
Property findPropertyByName (const QString &name)
bool isParentOf (const Class &other)
bool isSubClassOf (const Class &other)
Class & operator= (const Class &)
QList< Class > parentClasses ()
QList< Property > rangeOf ()
QList< Class > subClasses ()
 ~Class ()

Detailed Description

A Class is a resource of type rdf:Class.

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

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

Author:
Sebastian Trueg <trueg@kde.org>

Definition at line 49 of file class.h.


Constructor & Destructor Documentation

Nepomuk::Types::Class::Class (  ) 

Default constructor.

Creates an empty Class.

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

Create the class referred to by uri.

The result is either a valid class which could be loaded from the Nepomuk store or a simple class 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::Class::Class ( const Class &   ) 

Default copy constructor.

Nepomuk::Types::Class::~Class (  ) 

Destructor.


Member Function Documentation

QList<Class> Nepomuk::Types::Class::allParentClasses (  ) 

Recursively determines all parent classes of this class, not only the direct ones.

Returns:
A list of parent classes of this class.
See also:
parentClasses()

QList<Class> Nepomuk::Types::Class::allSubClasses (  ) 

Recursively determines all sub classes of this class, not only the direct ones.

Returns:
A list of sub classes of this class.
See also:
subClasses()

QList<Property> Nepomuk::Types::Class::domainOf (  ) 

A Property has a certain domain which is a Class.

Returns:
A list of all properties that have this Class as a domain.
See also:
Property::domain()

Property Nepomuk::Types::Class::findPropertyByLabel ( const QString &  label,
const QString &  language = QString() 
)

Search for a property in the class by its label.

Parameters:
label The label of the property (i.e. rdfs:label)
language The language in which the label was specified. If empty the default rdfs:label is returned.
Returns:
the Property object identified by label or an invalid property if it could not be found.

Property Nepomuk::Types::Class::findPropertyByName ( const QString &  name  ) 

Search for a property in the class by its name.

Parameters:
name The name of the property.
Returns:
the Property object identified by name or an invalid property if it could not be found.

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

Check if a class inherits this class.

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

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

bool Nepomuk::Types::Class::isSubClassOf ( const Class &  other  ) 

Check if this class is derived from another class.

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

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

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

Copy operator.

QList<Class> Nepomuk::Types::Class::parentClasses (  ) 

Each class can have multiple parent classes.

This method provides a list of all direct parents.

Returns:
A list of all parent classes of this class. If the list is emppty it means that the class has no direct parents, i.e. it is derived from rdf:Resource.
See also:
allParentClasses()

QList<Property> Nepomuk::Types::Class::rangeOf (  ) 

A Property has a certain range which is a Class or a Literal.

Returns:
A list of all properties that have this Class as a range.
See also:
Property::range()

QList<Class> Nepomuk::Types::Class::subClasses (  ) 

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


The documentation for this class was generated from the following file:
  • class.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