Version: (using 4.3.00 (KDE 4.3.0) "release 155", KDE:KDE4:Factory:Desktop / openSUSE_11.1) Compiler: gcc OS: Linux (x86_64) release 2.6.27.25-0.1-default I'm trying to create a backup system for manual nepomuk data but export method with SPAQL query don't works. Test case: The next query is working fine: sopranocmd --socket `kde4-config --localprefix`/share/apps/nepomuk/socket --model main query "select ?y where { ?x <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#identifier> ?y .} ORDER BY ?y" but if I try using with export: sopranocmd --socket `kde4-config --localprefix`/share/apps/nepomuk/socket --model main export "select ?y where { ?x <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#identifier> ?y .} ORDER BY ?y" nepomuk.tags.backup.txt ****************************************** . . . . . . . ****************************************** Please, note that I only put a few first lines but all lines are the same. Add some test cases to sopranocmd could be useful.
SVN commit 1013270 by trueg: Only graph queries can be serialized. Fail with an error if the query is not a graph query. BUG: 204402 M +11 -4 sopranocmd.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1013270
commit 7cebda729c022156a28dbe9d712039307ad9b548 branch 2.4 Author: Sebastian Trueg <sebastian@trueg.de> Date: Wed Aug 19 12:30:09 2009 +0000 Only graph queries can be serialized. Fail with an error if the query is not a graph query. BUG: 204402 svn path=/trunk/kdesupport/soprano/; revision=1013270 diff --git a/tools/sopranocmd.cpp b/tools/sopranocmd.cpp index 49ec31c..0e77414 100644 --- a/tools/sopranocmd.cpp +++ b/tools/sopranocmd.cpp @@ -837,10 +837,17 @@ int main( int argc, char *argv[] ) success = exportFile( model->listStatements(), fileName, serialization ); } else { - success = exportFile( model->executeQuery( tuneQuery( query, queryLang ), - Soprano::Query::queryLanguageFromString( queryLang ), queryLang ).iterateStatements(), - fileName, - serialization ); + QueryResultIterator it = model->executeQuery( tuneQuery( query, queryLang ), + Soprano::Query::queryLanguageFromString( queryLang ), queryLang ); + if ( it.isGraph() ) { + success = exportFile( it.iterateStatements(), + fileName, + serialization ); + } + else { + errStream << "Can only export graph queries"; + return 1; + } } delete model;