This file is indexed.

/usr/include/soprano/rdfschemamodel.h is in libsoprano-dev 2.9.4+dfsg1-0ubuntu2.

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
/*
 * This file is part of Soprano Project.
 *
 * 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 _SOPRANO_RDF_SCHEMA_MODEL_H_
#define _SOPRANO_RDF_SCHEMA_MODEL_H_

#include "filtermodel.h"
#include "node.h"
#include "soprano_export.h"

namespace Soprano {

    class Model;
    class StatementIterator;

    /**
     * \class RdfSchemaModel rdfschemamodel.h Soprano/RdfSchemaModel
     *
     * \brief Provides convenience methods to handle RDFS data.
     *
     * Interface based on Sesame's RdfSchemaSource. (Copyright (C) 2002-2006 Aduna BV, GNU LGPL License applies.)
     *
     * \warning Backward inferencing has not been implemented yet. Thus, methods like subClassOf() return the same
     * as directSubClassOf().
     *
     * \author Sebastian Trueg <trueg@kde.org>
     */
    class SOPRANO_EXPORT RdfSchemaModel : public FilterModel
    {
    public:
        /**
         * Create a new RDF Schema wrapper model that performs actions
         * on \p model
         */
        RdfSchemaModel( Model* parentModel = 0 );

        /**
         * Destructor.
         */
        ~RdfSchemaModel();

        /**
         * Get all defined RDF/S classes.
         * \return a StatementIterator that iterates over all statements in the model
         * defining an RDF/S class.
         */
        StatementIterator classes() const;

        /**
         * Gets all direct subClassOf relations with a specific sub- and/or superclass. 
         * A class A is a direct subclass of class B if there is no class C such that A is 
         * a subclass of C and C is a subclass of B.
         *
         * \param subClass The subclass of the relations that should be returned, 
         * or an empty node if relations with any subclass should be returned.
         * \param superClass The superclass of the relations that should be returned, 
         * or an empty node if relations with any superclass should be returned.
         *
         * \return A StatementIterator containing statements of the form
         * (subClass, rdfs:subClassOf, superClass).
         */
        StatementIterator directSubClassOf( const Node& subClass, const Node& superClass = Node() ) const;

        /**
         * Gets all direct subPropertyOf relations with a specific sub- and/or superproperty.
         * A property A is a direct subproperty of property B if there is no property C such
         * that A is a subproperty of C and C is a subproperty of B. 
         *
         * \param subProperty The subproperty of the relations that should be returned,
         * or an empty node if relations with any subproperty should be returned.
         * \param superProperty The superproperty of the relations that should be returned,
         * or an empty node if relations with any superproperty should be returned.
         *
         * \return A StatementIterator containing statements of the form
         * (subProperty, rdfs:subPropertyOf, superProperty).
         */
        StatementIterator directSubPropertyOf( const Node& subProperty, const Node& superProperty = Node() ) const;

        /**
         * Gets all direct type relations with a specific instance and/or class.
         *
         * \param someClass The instance of the relations that should be returned,
         * or an empty node if relations with any instance should be returned.
         * \param someType The class of the relations that should be returned,
         * or an empty node if relations with any class should be returned.
         *
         * \return A StatementIterator containing statements of the form
         * (someClass, rdf:type, someType).
         */
        StatementIterator directType( const Node& someClass, const Node& someType ) const;

        /**
         * Gets all domain relations with a specific property and/or domain class.
         *
         * \param prop The property of the relations that should be returned,
         * or an empty node if relations with any property should be returned.
         * \param domain The domain of the relations that should be returned,
         * or an empty node if relations with any domain should be returned.
         *
         * \return A StatementIterator containing statements of the form
         * (prop, rdfs:domain, domain).
         */
        StatementIterator domain( const Node& prop, const Node& domain ) const;

        /**
         * Gets all defined properties. 
         *
         * \return A StatementIterator containing statements of the form
         * (someProperty, rdf:type, rdf:Property).
         */
        StatementIterator properties() const;    

        /**
         * Gets all range relations with a specific property and/or range class.
         *
         * \param prop The property of the relations that should be returned,
         * or an empty node if relations with any property should be returned.
         * \param range The range of the relations that should be returned,
         * or an empty node if relations with any range should be returned.
         *
         * \return A StatementIterator containing statements of the form
         * (prop, rdfs:range, range).
         */
        StatementIterator range( const Node& prop, const Node& range ) const;

        /**
         * Gets all subClassOf relations with a specific sub- and/or superclass.
         * Note that the subClassOf relation is reflexive: a class is implicitly
         * always a subclass of itself.
         *
         * Do not use this method if the Soprano backend supports inferencing.
         * Use directSubClassOf instead which is much faster.
         *
         * \param subClass The subclass of the relations that should be returned,
         * or an empty node if relations with any subclass should be returned.
         * \param superClass The superclass of the relations that should be returned,
         * or an emtpy node if relations with any superclass should be returned.
         *
         * \return A StatementIterator containing all valid statements of the form
         * (subClass, rdfs:subClassOf, superClass) including those calculated through
         * direct inferencing.
         */
        StatementIterator subClassOf( const Node& subClass, const Node& superClass = Node() ) const;

        /**
         * Gets all subPropertyOf relations with a specific sub- and/or superproperty.
         * Note that the subPropertyOf relation is reflexive: a property is implicitly
         * always a subproperty of itself.
         *
         * Do not use this method if the Soprano backend supports inferencing.
         * Use directSubPropertyOf instead which is much faster.
         *
         * \param subProperty The subproperty of the relations that should be returned,
         * or an empty node if relations with any subproperty should be returned.
         * \param superProperty The superproperty of the relations that should be returned,
         * or an empty node if relations with any superproperty should be returned.
         *
         * \return A StatementIterator containing all valid statements of the form
         * (subProperty, rdfs:subPropertyOf, superProperty) including those calculated through
         * direct inferencing.
         */
        StatementIterator subPropertyOf( const Node& subProperty, const Node& superProperty = Node() ) const;
    
        /**
         * Gets all type relations with a specific instance and/or class.
         *
         * Do not use this method if the Soprano backend supports inferencing.
         * Use directType instead which is much faster.
         *
         * \param someClass The instance of the relations that should be returned,
         * or an empty node if relations with any instance should be returned.
         * \param someType The class of the relations that should be returned,
         * or an empty node if relations with any class should be returned.
         *
         * \return A StatementIterator containing all valid statements of the form
         * (someClass, rdf:type, someType) including those calculated through
         * direct inferencing.
         */
        StatementIterator type( const Node& someClass, const Node& someType ) const;

        /**
         * Checks whether the supplied resource represents a class.
         *
         * \param resource The resource to check.
         *
         * \return true if resource is a class, false otherwise.
         */
        bool isClass( const Node& resource ) const;

        /**
         * Checks whether the supplied resource represents a property.
         *
         * \param resource The resource to check.
         *
         * \return true if resource is a property, false otherwise.
         */
        bool isProperty( const Node& resource ) const;

        /**
         * Checks whether one resource is a direct subclass of another.
         *
         * \param subClass A class.
         * \param superClass A class.
         *
         * \return true if subClass is a direct subclass of superClass, false otherwise.
         */
        bool isDirectSubClassOf( const Node& subClass, const Node& superClass ) const;

        /**
         * Checks whether one resource is a direct subproperty of another.
         *
         * \param subProperty A property.
         * \param superProperty A property.
         *
         * \return true if subProperty is a direct subproperty of superProperty, false otherwise.
         */
        bool isDirectSubPropertyOf( const Node& subProperty, const Node& superProperty ) const;

        /**
         * Checks whether one resource is a direct instance of another.
         *
         * \param someClass An instance.
         * \param someType A class.
         *
         * \return true if someClass is a direct instance of someType, false otherwise.
         */
        bool isDirectType( const Node& someClass, const Node& someType ) const;

        /**
         * Checks whether one resource is a subclass of another.
         *
         * Do not use this method if the Soprano backend supports inferencing.
         * Use isDirectSubClassOf instead which is much faster.
         *
         * \param subClass A class.
         * \param superClass A class.
         *
         * \return true if subClass is a subclass of superClass, false otherwise.
         */
        bool isSubClassOf( const Node& subClass, const Node& superClass ) const;

        /**
         * Checks whether one resource is a subproperty of another.
         *
         * Do not use this method if the Soprano backend supports inferencing.
         * Use isDirectSubPropertyOf instead which is much faster.
         *
         * \param subProperty A property.
         * \param superProperty A property.
         *
         * \return true if subProperty is a subproperty of superProperty, false otherwise.
         */
        bool isSubPropertyOf( const Node& subProperty, const Node& superProperty ) const;

        /**
         * Checks whether one resource is a instance of another.
         *
         * Do not use this method if the Soprano backend supports inferencing.
         * Use isDirectType instead which is much faster.
         *
         * \param someClass An instance.
         * \param someType A class.
         *
         * \return true if someClass is an instance of someType, false otherwise.
         */
        bool isType( const Node& someClass, const Node& someType ) const;

    private:
        class Private;
        Private* const d;
    };
}

#endif