soprano/sopranotypes.h

Go to the documentation of this file.
00001 /* This file is part of Soprano
00002  *
00003  * Copyright (C) 2006 Daniele Galdi <daniele.galdi@gmail.com>
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_TYPES_H_
00023 #define _SOPRANO_TYPES_H_
00024 
00025 #include "soprano_export.h"
00026 
00027 #include <QtCore/QFlags>
00028 #include <QtCore/QString>
00029 
00030 namespace Soprano
00031 {
00035     // FIXME: what about the used charsets? Should we and if so, how should we include them?
00036     enum RdfSerialization {
00037         SerializationUnknown = 0x0,  
00038         SerializationRdfXml = 0x1,   
00039         SerializationN3 = 0x2,        
00040         SerializationNTriples = 0x4,  
00041         SerializationTurtle = 0x8,    
00042         SerializationTrig = 0x10,     
00043         SerializationNQuads = 0x20,   
00044         SerializationUser = 0x1000    
00045     };
00046     Q_DECLARE_FLAGS(RdfSerializations, RdfSerialization)
00047 
00048     
00058     SOPRANO_EXPORT QString serializationMimeType( RdfSerialization serialization, const QString& userSerialization = QString() );
00059 
00066     SOPRANO_EXPORT RdfSerialization mimeTypeToSerialization( const QString& mimetype );
00067 
00074     enum BackendOption {
00075         BackendOptionNone = 0x0,
00076         BackendOptionStorageMemory = 0x1,   
00077         BackendOptionEnableInference = 0x2, 
00078         BackendOptionStorageDir = 0x4,      
00079         BackendOptionUser = 0x1000           
00080     };
00081     Q_DECLARE_FLAGS( BackendOptions, BackendOption )
00082 
00083     
00091     enum BackendFeature {
00092         BackendFeatureNone = 0x0,
00093         BackendFeatureAddStatement = 0x1,       
00094         BackendFeatureRemoveStatementS = 0x2,   
00095         BackendFeatureListStatements = 0x4,     
00096         BackendFeatureQuery = 0x8,               
00097         BackendFeatureInference = 0x10,          
00098         BackendFeatureInferenceOptional = 0x20, 
00099         BackendFeatureContext = 0x40,           
00100         BackendFeatureStorageMemory = 0x80,     
00101         BackendFeatureUser = 0x1000              
00102     };
00103     Q_DECLARE_FLAGS( BackendFeatures, BackendFeature )
00104 
00105 
00106     namespace Query {
00114         enum QueryLanguage {
00115             QueryLanguageNone = 0x0,    
00116             QueryLanguageSparql = 0x1,  
00117             QueryLanguageRdql = 0x2,    
00118             QueryLanguageSerql = 0x4,   
00119             QueryLanguageUser = 0x1000, 
00120             QUERY_LANGUAGE_NONE = QueryLanguageNone,   
00121             QUERY_LANGUAGE_SPARQL = QueryLanguageSparql, 
00122             QUERY_LANGUAGE_RDQL = QueryLanguageRdql,   
00123             QUERY_LANGUAGE_SERQL = QueryLanguageSerql,  
00124             QUERY_LANGUAGE_USER = QueryLanguageUser 
00125         };
00126         Q_DECLARE_FLAGS( QueryLanguages, QueryLanguage )
00127 
00128         
00138         SOPRANO_EXPORT QString queryLanguageToString( Soprano::Query::QueryLanguage lang, const QString& userQueryLanguage = QString() );
00139 
00147         SOPRANO_EXPORT QueryLanguage queryLanguageFromString( const QString& queryLanguage );
00148     }
00149 }
00150 
00151 Q_DECLARE_OPERATORS_FOR_FLAGS(Soprano::RdfSerializations)
00152 Q_DECLARE_OPERATORS_FOR_FLAGS(Soprano::BackendOptions)
00153 Q_DECLARE_OPERATORS_FOR_FLAGS(Soprano::BackendFeatures)
00154 Q_DECLARE_OPERATORS_FOR_FLAGS(Soprano::Query::QueryLanguages)
00155 
00156 #endif

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