Soprano  2.9.4
rdfschemamodel.h
Go to the documentation of this file.
1 /*
2  * This file is part of Soprano Project.
3  *
4  * Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef _SOPRANO_RDF_SCHEMA_MODEL_H_
23 #define _SOPRANO_RDF_SCHEMA_MODEL_H_
24 
25 #include "filtermodel.h"
26 #include "node.h"
27 #include "soprano_export.h"
28 
29 namespace Soprano {
30 
31  class Model;
32  class StatementIterator;
33 
47  {
48  public:
53  RdfSchemaModel( Model* parentModel = 0 );
54 
58  ~RdfSchemaModel();
59 
65  StatementIterator classes() const;
66 
80  StatementIterator directSubClassOf( const Node& subClass, const Node& superClass = Node() ) const;
81 
95  StatementIterator directSubPropertyOf( const Node& subProperty, const Node& superProperty = Node() ) const;
96 
108  StatementIterator directType( const Node& someClass, const Node& someType ) const;
109 
121  StatementIterator domain( const Node& prop, const Node& domain ) const;
122 
129  StatementIterator properties() const;
130 
142  StatementIterator range( const Node& prop, const Node& range ) const;
143 
161  StatementIterator subClassOf( const Node& subClass, const Node& superClass = Node() ) const;
162 
180  StatementIterator subPropertyOf( const Node& subProperty, const Node& superProperty = Node() ) const;
181 
197  StatementIterator type( const Node& someClass, const Node& someType ) const;
198 
206  bool isClass( const Node& resource ) const;
207 
215  bool isProperty( const Node& resource ) const;
216 
225  bool isDirectSubClassOf( const Node& subClass, const Node& superClass ) const;
226 
235  bool isDirectSubPropertyOf( const Node& subProperty, const Node& superProperty ) const;
236 
245  bool isDirectType( const Node& someClass, const Node& someType ) const;
246 
258  bool isSubClassOf( const Node& subClass, const Node& superClass ) const;
259 
271  bool isSubPropertyOf( const Node& subProperty, const Node& superProperty ) const;
272 
284  bool isType( const Node& someClass, const Node& someType ) const;
285 
286  private:
287  class Private;
288  Private* const d;
289  };
290 }
291 
292 #endif
293 
294 
soprano_export.h
Soprano::Vocabulary::RDF::type
SOPRANO_EXPORT QUrl type()
Soprano::Vocabulary::RDFS::range
SOPRANO_EXPORT QUrl range()
SOPRANO_EXPORT
#define SOPRANO_EXPORT
Definition: soprano_export.h:37
Soprano::FilterModel
A FilterModel is a virtual model that wraps another Model.
Definition: filtermodel.h:48
node.h
filtermodel.h
Soprano::Model
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:94
Soprano::Vocabulary::RDFS::subPropertyOf
SOPRANO_EXPORT QUrl subPropertyOf()
Soprano::StatementIterator
An iterator that provides a stream of Statements.
Definition: statementiterator.h:75
Soprano
Definition: backend.h:35
Soprano::Vocabulary::RDFS::domain
SOPRANO_EXPORT QUrl domain()
Soprano::Vocabulary::RDFS::subClassOf
SOPRANO_EXPORT QUrl subClassOf()
Soprano::RdfSchemaModel
Provides convenience methods to handle RDFS data.
Definition: rdfschemamodel.h:46
Soprano::Node
A Node represents one RDF resource.
Definition: node.h:53