Soprano
2.7.2
|
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 #include "soprano_export.h" 00028 00029 namespace Soprano { 00030 00031 class Model; 00032 class StatementIterator; 00033 00046 class SOPRANO_EXPORT RdfSchemaModel : public FilterModel 00047 { 00048 public: 00053 RdfSchemaModel( Model* parentModel = 0 ); 00054 00058 ~RdfSchemaModel(); 00059 00065 StatementIterator classes() const; 00066 00080 StatementIterator directSubClassOf( const Node& subClass, const Node& superClass = Node() ) const; 00081 00095 StatementIterator directSubPropertyOf( const Node& subProperty, const Node& superProperty = Node() ) const; 00096 00108 StatementIterator directType( const Node& someClass, const Node& someType ) const; 00109 00121 StatementIterator domain( const Node& prop, const Node& domain ) const; 00122 00129 StatementIterator properties() const; 00130 00142 StatementIterator range( const Node& prop, const Node& range ) const; 00143 00161 StatementIterator subClassOf( const Node& subClass, const Node& superClass = Node() ) const; 00162 00180 StatementIterator subPropertyOf( const Node& subProperty, const Node& superProperty = Node() ) const; 00181 00197 StatementIterator type( const Node& someClass, const Node& someType ) const; 00198 00206 bool isClass( const Node& resource ) const; 00207 00215 bool isProperty( const Node& resource ) const; 00216 00225 bool isDirectSubClassOf( const Node& subClass, const Node& superClass ) const; 00226 00235 bool isDirectSubPropertyOf( const Node& subProperty, const Node& superProperty ) const; 00236 00245 bool isDirectType( const Node& someClass, const Node& someType ) const; 00246 00258 bool isSubClassOf( const Node& subClass, const Node& superClass ) const; 00259 00271 bool isSubPropertyOf( const Node& subProperty, const Node& superProperty ) const; 00272 00284 bool isType( const Node& someClass, const Node& someType ) const; 00285 00286 private: 00287 class Private; 00288 Private* const d; 00289 }; 00290 } 00291 00292 #endif 00293 00294