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

Nepomuk

  • Nepomuk
  • Types
  • Class
Public Member Functions | List of all members
Nepomuk::Types::Class Class Reference

#include <Nepomuk/Types/Class>

Inheritance diagram for Nepomuk::Types::Class:
Nepomuk::Types::Entity

Public Member Functions

 Class ()
 
 Class (const Class &)
 
 Class (const QUrl &uri)
 
 ~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)
 
bool isSubClassOf (const Class &other) const
 
Class & operator= (const Class &)
 
QList< Class > parentClasses ()
 
QList< Class > parentClasses () const
 
QList< Property > rangeOf ()
 
QList< Property > rangeOf () const
 
QList< Class > subClasses ()
 
QList< Class > subClasses () const
 
- Public Member Functions inherited from Nepomuk::Types::Entity
 Entity (const Entity &)
 
virtual ~Entity ()
 
QString comment (const QString &language=KGlobal::locale() ->language())
 
QString comment (const QString &language=KGlobal::locale() ->language()) const
 
QIcon icon ()
 
QIcon icon () const
 
bool isAvailable ()
 
bool isAvailable () const
 
bool isValid () const
 
QString label (const QString &language=KGlobal::locale() ->language())
 
QString label (const QString &language=KGlobal::locale() ->language()) const
 
QString name () const
 
 operator QUrl () const
 
bool operator!= (const Entity &other) const
 
bool operator!= (const QUrl &other) const
 
Entity & operator= (const Entity &)
 
bool operator== (const Entity &other) const
 
bool operator== (const QUrl &other) const
 
void reset (bool recursive=false)
 
QUrl uri () const
 
bool userVisible () const
 

Additional Inherited Members

- Protected Member Functions inherited from Nepomuk::Types::Entity
 Entity ()
 
- Protected Attributes inherited from Nepomuk::Types::Entity
QExplicitlySharedDataPointer< EntityPrivate > d
 

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.nosp@m.@kde.nosp@m..org

Definition at line 49 of file class.h.

Constructor & Destructor Documentation

◆ Class() [1/3]

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

Default constructor.

Creates an empty Class.

◆ Class() [2/3]

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.

◆ Class() [3/3]

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

Default copy constructor.

◆ ~Class()

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

Destructor.

Member Function Documentation

◆ allParentClasses() [1/2]

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

◆ allParentClasses() [2/2]

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

◆ allSubClasses() [1/2]

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

◆ allSubClasses() [2/2]

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

◆ domainOf() [1/2]

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

◆ domainOf() [2/2]

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

◆ findPropertyByLabel() [1/2]

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.

◆ findPropertyByLabel() [2/2]

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

◆ findPropertyByName() [1/2]

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.

◆ findPropertyByName() [2/2]

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

◆ isParentOf() [1/2]

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.

◆ isParentOf() [2/2]

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

◆ isSubClassOf() [1/2]

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.

◆ isSubClassOf() [2/2]

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

◆ operator=()

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

Copy operator.

◆ parentClasses() [1/2]

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

◆ parentClasses() [2/2]

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

◆ rangeOf() [1/2]

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

◆ rangeOf() [2/2]

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

◆ subClasses() [1/2]

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.

◆ subClasses() [2/2]

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
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • 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
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal