soprano/rdfschemamodel.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Soprano Project.
00003  *
00004  * Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef _SOPRANO_RDF_SCHEMA_MODEL_H_
00023 #define _SOPRANO_RDF_SCHEMA_MODEL_H_
00024 
00025 #include "filtermodel.h"
00026 #include "node.h"
00027 
00028 namespace Soprano {
00029 
00030     class Model;
00031     class StatementIterator;
00032 
00045     class RdfSchemaModel : public FilterModel
00046     {
00047     public:
00052         RdfSchemaModel( Model* parentModel );
00053 
00057         ~RdfSchemaModel();
00058 
00064         StatementIterator classes() const;
00065 
00079         StatementIterator directSubClassOf( const Node& subClass, const Node& superClass = Node() ) const;
00080 
00094         StatementIterator directSubPropertyOf( const Node& subProperty, const Node& superProperty = Node() ) const;
00095 
00107         StatementIterator directType( const Node& someClass, const Node& someType ) const;
00108 
00120         StatementIterator domain( const Node& prop, const Node& domain ) const;
00121 
00128         StatementIterator properties() const;    
00129 
00141         StatementIterator range( const Node& prop, const Node& range ) const;
00142 
00160         StatementIterator subClassOf( const Node& subClass, const Node& superClass = Node() ) const;
00161 
00179         StatementIterator subPropertyOf( const Node& subProperty, const Node& superProperty = Node() ) const;
00180     
00196         StatementIterator type( const Node& someClass, const Node& someType ) const;
00197 
00205         bool isClass( const Node& resource ) const;
00206 
00214         bool isProperty( const Node& resource ) const;
00215 
00224         bool isDirectSubClassOf( const Node& subClass, const Node& superClass ) const;
00225 
00234         bool isDirectSubPropertyOf( const Node& subProperty, const Node& superProperty ) const;
00235 
00244         bool isDirectType( const Node& someClass, const Node& someType ) const;
00245 
00257         bool isSubClassOf( const Node& subClass, const Node& superClass ) const;
00258 
00270         bool isSubPropertyOf( const Node& subProperty, const Node& superProperty ) const;
00271 
00283         bool isType( const Node& someClass, const Node& someType ) const;
00284 
00285     private:
00286         class Private;
00287         Private* const d;
00288     };
00289 }
00290 
00291 #endif
00292 
00293 

Generated on Fri Mar 7 19:00:25 2008 for Soprano by  doxygen 1.5.4