This file is indexed.

/usr/include/nepomuk/entity.h is in kdelibs5-dev 4:4.8.4-4+deb7u1.

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
/* This file is part of the Nepomuk-KDE libraries
   Copyright (c) 2007-2010 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_ENTITY_H_
#define _NEPOMUK_ENTITY_H_

#include <QtCore/QUrl>
#include <QtCore/QString>
#include <QtCore/QSharedData>
#include <QtCore/QHash>

#include <Soprano/Node>

#include <kglobal.h>
#include <klocale.h>

#include "nepomuk_export.h"

class QIcon;


namespace Nepomuk {
    namespace Types {
        class EntityPrivate;

        /**
         * \brief Abstract base class for Class and Property;
         *
         * Base class for static ontology entities Class and Property.
         * It encapsulates the generic labels and comments that both
         * types have.
         *
         * Due to internal optimizations comparing two Entities is much
         * faster than comparing two QUrl objects.
         *
         * \author Sebastian Trueg <trueg@kde.org>
         */
        class NEPOMUK_EXPORT Entity
        {
        public:
            /**
             * Default copy constructor.
             */
            Entity( const Entity& );

            /**
             * Destructor.
             */
            virtual ~Entity();

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

            /**
             * The name of the resource. The name equals the fragment of the
             * URI.
             */
            QString name() const;

            /**
             * The URI of the resource
             */
            QUrl uri() const;

            /**
             * Retrieve the label of the entity (rdfs:label)
             *
             * \param language The code of the language to use. Defaults to the session
             *                 language configured in KDE. As of KDE 4.3 only the currently
             *                 configured language is loaded to save memory.
             *
             * \return The label translated into \p language or the default fallback label
             * if no translation is available or the name() if no label could be found
             * at all.
             */
            QString label( const QString& language = KGlobal::locale()->language() );

            /**
             * Retrieve the label of the entity (rdfs:label)
             *
             * \param language The code of the language to use. Defaults to the session
             *                 language configured in KDE. As of KDE 4.3 only the currently
             *                 configured language is loaded to save memory.
             *
             * \return The label translated into \p language or the default fallback label
             * if no translation is available or the name() if no label could be found
             * at all.
             *
             * Const version
             *
             * \since 4.4
             */
            QString label( const QString& language = KGlobal::locale()->language() ) const;

            /**
             * Retrieve the comment of the entity (rdfs:comment)
             *
             * \param language The code of the language to use. Defaults to the session
             *                 language configured in KDE. As of KDE 4.3 only the currently
             *                 configured language is loaded to save memory.
             *
             * \return The comment translated into \p language or the default fallback comment
             * if no translation is available or an empty string if no comment could be found
             * at all.
             */
            QString comment( const QString& language = KGlobal::locale()->language() );

            /**
             * Retrieve the comment of the entity (rdfs:comment)
             *
             * \param language The code of the language to use. Defaults to the session
             *                 language configured in KDE. As of KDE 4.3 only the currently
             *                 configured language is loaded to save memory.
             *
             * \return The comment translated into \p language or the default fallback comment
             * if no translation is available or an empty string if no comment could be found
             * at all.
             *
             * Const version
             *
             * \since 4.4
             */
            QString comment( const QString& language = KGlobal::locale()->language() ) const;

            /**
             * Retrieve the icon stored for the entity (nao:hasSymbol)
             *
             * If no symbol is defined for the entity a null icon will be returned.
             *
             * \since 4.1
             */
            QIcon icon();

            /**
             * Retrieve the icon stored for the entity (nao:hasSymbol)
             *
             * If no symbol is defined for the entity a null icon will be returned.
             *
             * Const version.
             *
             * \since 4.4
             */
            QIcon icon() const;

            /**
             * Is this a valid Entity, i.e. has it a valid URI.
             * A valid Entity does not necessarily have a label and a comment, it
             * does not even have to exist in the Nepomuk store.
             *
             * \sa isAvailable
             */
            bool isValid() const;

            /**
             * Is this Entity available locally, i.e. could its properties
             * be loaded from the Nepomuk store.
             */
            bool isAvailable();

            /**
             * Is this Entity available locally, i.e. could its properties
             * be loaded from the Nepomuk store.
             *
             * Const version.
             *
             * \since 4.4
             */
            bool isAvailable() const;

            /**
             * The Types classes are optimized for performance under the
             * aasumption that ontologies never change during the execution
             * time of an application.
             *
             * Since there might be situations where this does not apply
             * the internal cache can be reset via this method.
             *
             * \param recursive If \p true all related entities will be reset
             * as well.
             *
             * \since 4.1
             */
            void reset( bool recursive = false );

            /**
             * nao:userVisible can be used to hide certain properties and
             * resources of a certain type from the user.
             *
             * \return \p true if this entity should be visible to the user.
             *
             * \since 4.6
             */
            bool userVisible() const;

            /**
             * An Entity can be used as a QUrl automagically.
             */
            operator QUrl() const { return uri(); }

            /**
             * Compares two Entity instances. This is faster than simply
             * comparing the URIs.
             */
            bool operator==( const Entity& other ) const;

            /**
             * Compares the Entity with a URI.
             *
             * \since 4.5
             */
            bool operator==( const QUrl& other ) const;

            /**
             * Compares two Entity instances. This is faster than simply
             * comparing the URIs.
             */
            bool operator!=( const Entity& other ) const;

            /**
             * Compares the Entity with a URI.
             *
             * \since 4.5
             */
            bool operator!=( const QUrl& other ) const;

        protected:
            /**
             * Create an invalid Entity instance.
             */
            Entity();

            QExplicitlySharedDataPointer<EntityPrivate> d;
        };

        inline uint qHash( const Entity& c )
        {
            return qHash( c.uri() );
        }
    }
}

#ifndef DISABLE_NEPOMUK_LEGACY

namespace Nepomuk {

    class Ontology;

    /**
     * \deprecated in favor of Nepomuk::Types::Entity
     */
    class KDE_DEPRECATED NEPOMUK_EXPORT Entity
    {
    public:
        Entity( const Entity& );
        ~Entity();

        Entity& operator=( const Entity& );

        /**
         * The ontology in which the resource is defined.
         */
        const Ontology* definingOntology() const;

        /**
         * The name of the resource. The name equals the fragment of the
         * URI.
         */
        QString name() const;

        /**
         * The URI of the resource
         */
        QUrl uri() const;

        QString label( const QString& language = QString() ) const;
        QString comment( const QString& language = QString() ) const;

    protected:
        Entity();

    private:
        class Private;
        QSharedDataPointer<Private> d;

        friend class OntologyManager;
    };
}

#endif // DISABLE_NEPOMUK_LEGACY

#endif // _NEPOMUK_ENTITY_H_