• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Nepomuk

  • Nepomuk
  • Types
  • Class
Public Member Functions

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

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

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 50 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::allParentClasses ( ) const

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()

Const version.

Since:
4.4
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<Class> Nepomuk::Types::Class::allSubClasses ( ) const

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()

Const version.

Since:
4.4
QList<Property> Nepomuk::Types::Class::domainOf ( ) const

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()

Const version.

Since:
4.4
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:
labelThe label of the property (i.e. rdfs:label)
languageThe 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::findPropertyByLabel ( const QString &  label,
const QString &  language = QString() 
) const

Search for a property in the class by its label.

Parameters:
labelThe label of the property (i.e. rdfs:label)
languageThe 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.

Const version.

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

Search for a property in the class by its name.

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

Const version.

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

Search for a property in the class by its name.

Parameters:
nameThe 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) const

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.

Const version.

Since:
4.4
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.
bool Nepomuk::Types::Class::isSubClassOf ( const Class &  other) const

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.

Const version.

Since:
4.4
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<Class> Nepomuk::Types::Class::parentClasses ( ) const

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()

Const version.

Since:
4.4
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<Property> Nepomuk::Types::Class::rangeOf ( ) const

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()

Const version.

Since:
4.4
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.
QList<Class> Nepomuk::Types::Class::subClasses ( ) const
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.

Const version.

Since:
4.4

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

Nepomuk

Skip menu "Nepomuk"
  • Main Page
  • Modules
  • 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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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