This file is indexed.

/usr/include/nepomuk/property.h is in kdelibs5-dev 4:4.13.3-0ubuntu0.5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
/* This file is part of the Nepomuk-KDE libraries
   Copyright (c) 2007 Sebastian Trueg <trueg@kde.org>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef _NEPOMUK_PROPERTY_H_
#define _NEPOMUK_PROPERTY_H_

#include <QtCore/QList>
#include <QtCore/QUrl>
#include <QtCore/QString>
#include <QtCore/QVariant>
#include <QtCore/QSharedData>

#include "entity.h"
#include "nepomuk_export.h"

namespace Nepomuk {
    namespace Types {

        class Class;
        class Literal;

        /**
         * \class Property property.h Nepomuk/Types/Property
         *
         * \brief 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>
         */
        class NEPOMUK_EXPORT Property : public Entity
        {
        public:
            /**
             * Default constructor. Creates an empty Property.
             */
            Property();

            /**
             * Create the property referred to by \p 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.
             */
            Property( const QUrl& uri );

            /**
             * Default copy constructor
             */
            Property( const Property& );

            /**
             * Destructor
             */
            ~Property();

            /**
             * Copy operator.
             */
            Property& operator=( const Property& );

            /**
             * Each property can have multiple parent properties.
             * \return 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.
             */
            QList<Property> parentProperties();

            /**
             * Each property can have multiple parent properties.
             * \return 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.
             *
             * Const version
             *
             * \since 4.4
             */
            QList<Property> parentProperties() const;

            /**
             * \return 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.
             */
            QList<Property> subProperties();

            /**
             * \return 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.
             *
             * Const version
             *
             * \since 4.4
             */
            QList<Property> subProperties() const;

            /**
             * The inverse property (nrl:inverseProperty).
             * \return A Property instance representing the inverse property of this one
             * or 0 if none was specified in the ontology.
             */
            Property inverseProperty();

            /**
             * The inverse property (nrl:inverseProperty).
             * \return A Property instance representing the inverse property of this one
             * or 0 if none was specified in the ontology.
             *
             * Const version
             *
             * \since 4.4
             */
            Property inverseProperty() const;

            /**
             * The range of the property.
             * \return The range of the property or an invalid Class in case
             * the range of this poperty is a literal.
             * \sa literalRange
             */
            Class range();

            /**
             * The range of the property.
             * \return The range of the property or an invalid Class in case
             * the range of this poperty is a literal.
             * \sa literalRange
             *
             * Const version
             *
             * \since 4.4
             */
            Class range() const;

            /**
             * 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.
             *
             * \sa range
             */
            Literal 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.
             *
             * \sa range
             *
             * Const version
             *
             * \since 4.4
             */
            Literal literalRangeType() const;

            /**
             * The domain of the property.
             */
            Class domain();

            /**
             * The domain of the property.
             *
             * Const version
             *
             * \since 4.4
             */
            Class domain() const;

            /**
             * The cardinality of this property as specified by nrl:cardinality.
             *
             * \return the cardinality of the property or -1 if none was set.
             */
            int cardinality();

            /**
             * The cardinality of this property as specified by nrl:cardinality.
             *
             * \return the cardinality of the property or -1 if none was set.
             *
             * Const version
             *
             * \since 4.4
             */
            int cardinality() const;

            /**
             * The minimum cardinality of this property as specified by nrl:minCardinality.
             *
             * \return the minimum cardinality of the property or -1 if none was set.
             */
            int minCardinality();

            /**
             * The minimum cardinality of this property as specified by nrl:minCardinality.
             *
             * \return the minimum cardinality of the property or -1 if none was set.
             *
             * Const version
             *
             * \since 4.4
             */
            int minCardinality() const;

            /**
             * The maximum cardinality of this property as specified by nrl:maxCardinality.
             *
             * \return the maximum cardinality of the property or -1 if none was set.
             */
            int maxCardinality();

            /**
             * The maximum cardinality of this property as specified by nrl:maxCardinality.
             *
             * \return the maximum cardinality of the property or -1 if none was set.
             *
             * Const version
             *
             * \since 4.4
             */
            int maxCardinality() const;

            /**
             * Check if a property inherits this property. This is a recursive method which
             * does not only check direct child propertyes.
             *
             * \return true if other is derived from this property, false otherwise.
             */
            bool isParentOf( const Property& other );

            /**
             * Check if a property inherits this property. This is a recursive method which
             * does not only check direct child propertyes.
             *
             * \return true if other is derived from this property, false otherwise.
             *
             * Const version
             *
             * \since 4.4
             */
            bool isParentOf( const Property& other ) const;

            /**
             * Check if this property is derived from another property. This is a recursive method which
             * does not only check direct child propertyes.
             *
             * \return true if this property is derived from other, false otherwise.
             */
            bool 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.
             *
             * \return true if this property is derived from other, false otherwise.
             *
             * Const version
             *
             * \since 4.4
             */
            bool isSubPropertyOf( const Property& other ) const;
        };
    }
}


#ifndef DISABLE_NEPOMUK_LEGACY

namespace Nepomuk {

    class Ontology;
    class Class;
    class Literal;

    /**
     * A property is a resource of type rdf:Property which relates a domain
     * with a range. The latter one can be a literal in addition to a Class.
     *
     * \deprecated in favor of Nepomuk::Types::Property
     */
    class KDE_DEPRECATED NEPOMUK_EXPORT Property : public Entity
    {
    public:
	/**
	 * Default constructor. Creates an empty Property.
	 */
	Property();

	/**
	 * Default copy constructor
	 */
	Property( const Property& );

	/**
	 * Destructor
	 */
	~Property();

	Property& operator=( const Property& );

	/**
	 * Each property can have multiple parent properties.
	 * \return 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.
	 */
	QList<const Property*> parentProperties() const;

	/**
	 * \return 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.
	 */
	QList<const Property*> parentOf() const;

	/**
	 * The inverse property (nrl:inverseProperty).
	 * \return A Property instance representing the inverse property of this one
	 * or 0 if none was specified in the ontology.
	 */
	const Property* inverseProperty() const;

	/**
	 * The range of the property.
	 * \return The range of the property or an invalid Class in case
	 * the range of this poperty is a literal.
	 * \sa literalRange
	 */
	const Class* range() const;

	/**
	 * If the rage of this property is a literal (i.e. range returns 0)
	 * this method provides the literal type.
	 *
	 * \returns the literal type of this property or an empty, invalid Literal
	 * if the range is a Class.
	 *
	 * \sa range
	 */
	Literal literalRangeType() const;

	/**
	 * The domain of the property.
	 */
	const Class* domain() const;

	/**
	 * The cardinality of this property as specified by nrl:cardinality.
	 *
	 * \return the cardinality of the property or -1 if none was set.
	 */
	int cardinality() const;

	/**
	 * The minimum cardinality of this property as specified by nrl:minCardinality.
	 *
	 * \return the minimum cardinality of the property or -1 if none was set.
	 */
	int minCardinality() const;

	/**
	 * The maximum cardinality of this property as specified by nrl:maxCardinality.
	 *
	 * \return the maximum cardinality of the property or -1 if none was set.
	 */
	int maxCardinality() const;

	// QString unit() const;

	/**
	 * Loads a property actually including the whole ontology
	 * it is declared in.
	 *
	 * Dependancies are resolved automatically if possible.
	 *
	 * \return A property object representing the property identified
	 * by uri or an invalid Property object if the resource identified
	 * by uri is either not a property or does not exist.
	 */
	static const Property* load( const QUrl& uri );

    private:
	class Private;
	QSharedDataPointer<Private> d;

	friend class OntologyManager;
    };
}

#endif // DISABLE_NEPOMUK_LEGACY

#endif // _NEPOMUK_PROPERTY_H_