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

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • rcgen
rcgen/property.h
Go to the documentation of this file.
1 /*
2  *
3  * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $
4  *
5  * This file is part of the Nepomuk KDE project.
6  * Copyright (C) 2006-2007 Sebastian Trueg <trueg@kde.org>
7  *
8  * This library is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  * See the file "COPYING.LIB" for the exact licensing terms.
13  */
14 
15 #ifndef _NEPOMUK_PROPERTY_H_
16 #define _NEPOMUK_PROPERTY_H_
17 
18 #include <QtCore/QList>
19 #include <QtCore/QUrl>
20 
21 class ResourceClass;
22 
29 class Property
30 {
31 public:
32  typedef QList<const Property*> ConstPtrList;
33 
37  Property();
38 
45  //Property( const QUrl& uri, const QString& type );
46 
50  void setUri( const QUrl &uri );
51 
55  QUrl uri() const;
56 
60  void setRange( ResourceClass* type );
61 
68  void setLiteralRange( const QString& range );
69 
73  ResourceClass* range() const;
74 
79  QString literalRange() const;
80 
84  void setComment( const QString &comment );
85 
89  QString comment() const;
90 
94  void setIsList( bool isList );
95 
99  bool isList() const;
100 
104  void setDomain( ResourceClass *domain );
105 
109  ResourceClass* domain( bool onlyReturnGeneratedClass = false ) const;
110 
114  void setInverseProperty( Property *property );
115 
119  Property* inverseProperty() const;
120 
124  QString name() const;
125 
129  QString literalTypeConversionMethod() const;
130 
135  QString typeString( bool simple = false, const QString &nameSpace = QString() ) const;
136 
140  bool hasSimpleType() const;
141 
142 private:
143  QUrl m_uri;
144  ResourceClass* m_range;
145  QString m_literalRange;
146  QString m_comment;
147  bool m_isList;
148  ResourceClass* m_domain;
149  Property* m_inverseProperty;
150 };
151 
152 #endif
Property::Property
Property()
Creates a new property.
Definition: rcgen/property.cpp:26
Property::isList
bool isList() const
Returns whether the property is a list of values.
Definition: rcgen/property.cpp:88
Property::comment
QString comment() const
Returns the comment of the property.
Definition: rcgen/property.cpp:78
Property::range
ResourceClass * range() const
Returns the scope of the property.
Definition: rcgen/property.cpp:63
Property::literalRange
QString literalRange() const
Returns the literal range of the property (the name of the Qt type to be used.)
Definition: rcgen/property.cpp:68
Property::uri
QUrl uri() const
Returns the uri of the property.
Definition: rcgen/property.cpp:48
Property::setUri
void setUri(const QUrl &uri)
Creates a new property of a given type and with a given uri.
Definition: rcgen/property.cpp:43
Property::ConstPtrList
QList< const Property * > ConstPtrList
Definition: rcgen/property.h:32
Property::setComment
void setComment(const QString &comment)
Sets the comment of the property.
Definition: rcgen/property.cpp:73
ResourceClass
Represents a resource.
Definition: resourceclass.h:30
Property::hasSimpleType
bool hasSimpleType() const
Returns whether the property is of simple type.
Definition: rcgen/property.cpp:159
Property::setInverseProperty
void setInverseProperty(Property *property)
Sets the inverse property of this property.
Definition: rcgen/property.cpp:109
Property::setLiteralRange
void setLiteralRange(const QString &range)
Set the literal range of the property.
Definition: rcgen/property.cpp:58
Property::literalTypeConversionMethod
QString literalTypeConversionMethod() const
Returns the conversion method of the property.
Definition: rcgen/property.cpp:164
Property::setIsList
void setIsList(bool isList)
Sets whether the property is a list of values.
Definition: rcgen/property.cpp:83
Property::domain
ResourceClass * domain(bool onlyReturnGeneratedClass=false) const
Returns the domain resource the property belongs to.
Definition: rcgen/property.cpp:98
Property
Represents the property of a resource.
Definition: rcgen/property.h:29
Property::setDomain
void setDomain(ResourceClass *domain)
Sets the domain the property belongs to.
Definition: rcgen/property.cpp:93
Property::inverseProperty
Property * inverseProperty() const
Returns the inverse property of this property.
Definition: rcgen/property.cpp:114
Property::typeString
QString typeString(bool simple=false, const QString &nameSpace=QString()) const
Retrieve a string representation of the range.
Definition: rcgen/property.cpp:132
Property::setRange
void setRange(ResourceClass *type)
Sets the type of the property.
Definition: rcgen/property.cpp:53
Property::name
QString name() const
Returns the name of the property.
Definition: rcgen/property.cpp:119
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

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

kdelibs API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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