Hello community,
here is the log from the commit of package soprano for openSUSE:Factory
checked in at Mon Nov 22 23:29:35 CET 2010.
--------
--- soprano/soprano-backend-sesame.changes 2010-10-06 09:57:11.000000000 +0200
+++ soprano/soprano-backend-sesame.changes 2010-11-19 22:33:04.000000000 +0100
@@ -1,0 +2,8 @@
+Fri Nov 19 21:28:01 UTC 2010 - tittiatcoke@gmail.com
+
+- update to 2.5.63
+ * onto2vocabularyclass now extracts the nrl graph
+ * Fixed default for ServerThreads parameter to match the docu
+ * Additional settings to limit query time of Virtuoso
+
+-------------------------------------------------------------------
soprano-backend-virtuoso.changes: same change
soprano.changes: same change
calling whatdependson for head-i586
Old:
----
soprano-2.5.0.tar.bz2
New:
----
soprano-2.5.63.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ soprano-backend-sesame.spec ++++++
--- /var/tmp/diff_new_pack.GpCyE2/_old 2010-11-22 23:28:37.000000000 +0100
+++ /var/tmp/diff_new_pack.GpCyE2/_new 2010-11-22 23:28:37.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package soprano-backend-sesame (Version 2.5.0)
+# spec file for package soprano-backend-sesame (Version 2.5.63)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -28,8 +28,8 @@
# COMMON1-BEGIN
# COMMON1-BEGIN
BuildRequires: cmake kde4-filesystem libqt4-devel libraptor-devel libredland-devel
-BuildRequires: clucene-core-devel doxygen raptor
-Version: 2.5.0
+BuildRequires: boost-devel clucene-core-devel doxygen raptor
+Version: 2.5.63
Release: 1
Source: soprano-%{version}.tar.bz2
Source2: baselibs.conf
soprano-backend-virtuoso.spec: same change
++++++ soprano.spec ++++++
--- /var/tmp/diff_new_pack.GpCyE2/_old 2010-11-22 23:28:37.000000000 +0100
+++ /var/tmp/diff_new_pack.GpCyE2/_new 2010-11-22 23:28:37.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package soprano (Version 2.5.0)
+# spec file for package soprano (Version 2.5.63)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -25,8 +25,8 @@
Summary: C++/Qt based interface library for RDF
# COMMON1-BEGIN
BuildRequires: cmake kde4-filesystem libqt4-devel libraptor-devel libredland-devel
-BuildRequires: clucene-core-devel doxygen raptor
-Version: 2.5.0
+BuildRequires: boost-devel clucene-core-devel doxygen raptor
+Version: 2.5.63
Release: 1
Source: soprano-%{version}.tar.bz2
Source2: baselibs.conf
++++++ soprano-2.5.0.tar.bz2 -> soprano-2.5.63.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/CMakeLists.txt new/soprano-2.5.63/CMakeLists.txt
--- old/soprano-2.5.0/CMakeLists.txt 2010-08-06 15:11:29.000000000 +0200
+++ new/soprano-2.5.63/CMakeLists.txt 2010-09-14 14:54:33.000000000 +0200
@@ -7,7 +7,7 @@
################## Soprano version ################################
set(CMAKE_SOPRANO_VERSION_MAJOR 2)
set(CMAKE_SOPRANO_VERSION_MINOR 5)
-set(CMAKE_SOPRANO_VERSION_RELEASE 0)
+set(CMAKE_SOPRANO_VERSION_RELEASE 63)
set(CMAKE_SOPRANO_VERSION_STRING "${CMAKE_SOPRANO_VERSION_MAJOR}.${CMAKE_SOPRANO_VERSION_MINOR}.${CMAKE_SOPRANO_VERSION_RELEASE}")
@@ -163,6 +163,13 @@
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -Wpointer-arith -Wformat-security -fno-check-new -fno-common")
endif(MINGW)
+if(WINCE)
+ set(LIBRARY_TYPE STATIC)
+ add_definitions(-DSOPRANO_STATIC_LIBS)
+else(WINCE)
+ set(LIBRARY_TYPE SHARED)
+endif(WINCE)
+
################## add subdirectories ################################
if(BUILD_CLUCENE_INDEX)
@@ -201,24 +208,50 @@
################## apidox ################################
-if(SOPRANO_BUILD_API_DOCS)
- find_package(Doxygen)
-
- if(DOXYGEN_EXECUTABLE)
- configure_file(${soprano_SOURCE_DIR}/Doxyfile.cmake ${soprano_BINARY_DIR}/Doxyfile)
+find_package(Doxygen)
- if(EXISTS ${QT_DOC_DIR}/html)
- set(QTDOCS "${QT_DOC_DIR}/html")
- else(EXISTS ${QT_DOC_DIR}/html)
- set(QTDOCS "http://doc.trolltech.com/4.3/")
- endif(EXISTS ${QT_DOC_DIR}/html)
+if(DOXYGEN_EXECUTABLE)
+ configure_file(${soprano_SOURCE_DIR}/Doxyfile.cmake ${soprano_BINARY_DIR}/Doxyfile)
+ set(QTDOCS_ONLINE "http://doc.qt.nokia.com/latest/")
+
+ if(EXISTS ${QT_DOC_DIR}/html)
+ set(QTDOCS "${QT_DOC_DIR}/html")
+ else(EXISTS ${QT_DOC_DIR}/html)
+ set(QTDOCS ${QTDOCS_ONLINE})
+ endif(EXISTS ${QT_DOC_DIR}/html)
+ if(SOPRANO_BUILD_API_DOCS)
add_custom_target(
apidox ALL
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
- COMMAND docs/html/installdox -l qt4.tag@${QTDOCS} docs/html/*.html)
- endif(DOXYGEN_EXECUTABLE)
-endif(SOPRANO_BUILD_API_DOCS)
+ COMMAND docs/html/installdox -q -l qt4.tag@${QTDOCS} docs/html/*.html
+ COMMENT "Building Soprano API docs...")
+ else(SOPRANO_BUILD_API_DOCS)
+ add_custom_target(
+ apidox
+ COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
+ COMMAND docs/html/installdox -q -l qt4.tag@${QTDOCS} docs/html/*.html
+ COMMENT "Building Soprano API docs...")
+ endif(SOPRANO_BUILD_API_DOCS)
+
+ add_custom_target(
+ onlineapidox
+ COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
+ COMMAND docs/html/installdox -q -l qt4.tag@${QTDOCS_ONLINE} docs/html/*.html
+ COMMENT "Building Soprano API docs...")
+
+ add_custom_target(
+ stabledox
+ COMMAND rsync -zrtq docs/html/ $ENV{USER},soprano@web.sf.net:/home/groups/s/so/soprano/htdocs/apidox/stable
+ DEPENDS onlineapidox
+ COMMENT "Uploading stable API docs to Sourceforge...")
+
+ add_custom_target(
+ trunkdox
+ COMMAND rsync -zrtq docs/html/ $ENV{USER},soprano@web.sf.net:/home/groups/s/so/soprano/htdocs/apidox/trunk
+ DEPENDS onlineapidox
+ COMMENT "Uploading trunk API docs to Sourceforge...")
+endif(DOXYGEN_EXECUTABLE)
################## status messages ################################
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/ChangeLog new/soprano-2.5.63/ChangeLog
--- old/soprano-2.5.0/ChangeLog 2010-07-26 13:51:14.000000000 +0200
+++ new/soprano-2.5.63/ChangeLog 2010-08-27 18:30:39.000000000 +0200
@@ -1,3 +1,7 @@
+2.6.0
+ * Fixed handling of xsd:boolean in SPARQL queries in the Virtuoso backend
+ * Added new parameter for the Virtuoso backend: QueryTimeout allows to set a maximum query exeution time.
+
2.5.0
* New public qHash method for Statement
* New Node::fromN3 method and operator>> which allows to parse nodes from N3 encoding.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/Doxyfile.cmake new/soprano-2.5.63/Doxyfile.cmake
--- old/soprano-2.5.0/Doxyfile.cmake 2010-05-24 19:23:57.000000000 +0200
+++ new/soprano-2.5.63/Doxyfile.cmake 2010-08-18 16:29:59.000000000 +0200
@@ -31,7 +31,6 @@
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
@@ -75,7 +74,7 @@
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-QUIET = NO
+QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/sesame2/sesame2backend.cpp new/soprano-2.5.63/backends/sesame2/sesame2backend.cpp
--- old/soprano-2.5.0/backends/sesame2/sesame2backend.cpp 2008-08-13 19:06:47.000000000 +0200
+++ new/soprano-2.5.63/backends/sesame2/sesame2backend.cpp 2010-09-03 23:01:48.000000000 +0200
@@ -84,7 +84,7 @@
// FIXME: support inference option
- Q_FOREACH( BackendSetting s, settings ) {
+ Q_FOREACH( const BackendSetting& s, settings ) {
if ( s.option() == BackendOptionUser ) {
// no user options ATM
qDebug() << "(Soprano::Sesame2::BackendPlugin) no user options supported.";
@@ -138,7 +138,7 @@
bool Soprano::Sesame2::BackendPlugin::deleteModelData( const BackendSettings& settings ) const
{
QString path;
- Q_FOREACH( BackendSetting s, settings ) {
+ Q_FOREACH( const BackendSetting& s, settings ) {
if ( s.option() == BackendOptionStorageDir ) {
path = s.value().toString();
break;
@@ -153,7 +153,7 @@
// FIXME: is there a way to get the actual list of files
QDir dir( path );
QStringList files = dir.entryList( QStringList() << "triples*" << "namespaces*" << "values*", QDir::Files );
- foreach( QString file, files ) {
+ foreach( const QString& file, files ) {
if ( !dir.remove( file ) ) {
setError( "Failed to remove file '" + dir.filePath( file ), Error::ErrorUnknown );
return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/Virtuoso.dox new/soprano-2.5.63/backends/virtuoso/Virtuoso.dox
--- old/soprano-2.5.0/backends/virtuoso/Virtuoso.dox 2010-02-11 12:02:36.000000000 +0100
+++ new/soprano-2.5.63/backends/virtuoso/Virtuoso.dox 2010-08-27 18:30:39.000000000 +0200
@@ -33,6 +33,8 @@
* - \c forcedstart - A boolean property which when set will result in the backend killing any Virtuoso instance accessing the
* data in the storage dir before starting its own instance. This option is ignored when connecting to an already
* running Virtuoso server.
+ * - \c QueryTimeout - The maximum time any query may take in milliseconds. See <a href="http://docs.openlinksw.com/virtuoso/anytimequeries.html">
+ * Virtuoso Anytime Queries</a> for details.
*
* The settings above are user settings and have to be provided using Soprano::BackendOptionUser:
*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/odbcconnectionpool.cpp new/soprano-2.5.63/backends/virtuoso/odbcconnectionpool.cpp
--- old/soprano-2.5.0/backends/virtuoso/odbcconnectionpool.cpp 2010-04-12 13:52:55.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/odbcconnectionpool.cpp 2010-08-27 18:30:39.000000000 +0200
@@ -81,17 +81,30 @@
conn->d->m_env = env;
conn->d->m_hdbc = hdbc;
conn->d->m_pool = this;
+
+ // run the setup commands
+ Q_FOREACH( const QString& command, m_connectionSetupCommands ) {
+ if ( conn->executeCommand( command ) != Error::ErrorNone ) {
+ setError( conn->lastError() );
+ delete conn;
+ return 0;
+ }
+ }
+
return conn;
}
-Soprano::ODBC::ConnectionPool::ConnectionPool( const QString& odbcConnectString, QObject* parent )
+Soprano::ODBC::ConnectionPool::ConnectionPool( const QString& odbcConnectString,
+ const QStringList& connectionSetupCommands,
+ QObject* parent )
: QObject( parent ),
d( new ConnectionPoolPrivate() )
{
qDebug() << Q_FUNC_INFO << odbcConnectString;
d->m_odbcConnectString = odbcConnectString;
+ d->m_connectionSetupCommands = connectionSetupCommands;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/odbcconnectionpool.h new/soprano-2.5.63/backends/virtuoso/odbcconnectionpool.h
--- old/soprano-2.5.0/backends/virtuoso/odbcconnectionpool.h 2009-11-21 13:47:29.000000000 +0100
+++ new/soprano-2.5.63/backends/virtuoso/odbcconnectionpool.h 2010-08-27 18:30:39.000000000 +0200
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project
*
- * Copyright (C) 2009 Sebastian Trueg
+ * Copyright (C) 2009-2010 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -26,6 +26,8 @@
#include "error.h"
+class QStringList;
+
namespace Soprano {
namespace ODBC {
@@ -37,7 +39,9 @@
Q_OBJECT
public:
- ConnectionPool( const QString& odbcConnectString, QObject* parent = 0 );
+ ConnectionPool( const QString& odbcConnectString,
+ const QStringList& connectionSetupCommands,
+ QObject* parent = 0 );
~ConnectionPool();
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/odbcconnectionpool_p.h new/soprano-2.5.63/backends/virtuoso/odbcconnectionpool_p.h
--- old/soprano-2.5.0/backends/virtuoso/odbcconnectionpool_p.h 2009-10-09 17:51:53.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/odbcconnectionpool_p.h 2010-08-27 18:30:39.000000000 +0200
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project
*
- * Copyright (C) 2009 Sebastian Trueg
+ * Copyright (C) 2009-2010 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -26,6 +26,7 @@
#include
#include
+#include
class QThread;
@@ -39,6 +40,7 @@
{
public:
QString m_odbcConnectString;
+ QStringList m_connectionSetupCommands;
QHash m_openConnections;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/odbcqueryresult.cpp new/soprano-2.5.63/backends/virtuoso/odbcqueryresult.cpp
--- old/soprano-2.5.0/backends/virtuoso/odbcqueryresult.cpp 2010-05-28 20:28:45.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/odbcqueryresult.cpp 2010-09-04 01:46:42.000000000 +0200
@@ -334,7 +334,7 @@
}
}
else {
- setError( Virtuoso::convertSqlError( SQL_HANDLE_STMT, d->m_hstmt, QLatin1String( "SQLGetData for data lenght failed" ) ) );
+ setError( Virtuoso::convertSqlError( SQL_HANDLE_STMT, d->m_hstmt, QLatin1String( "SQLGetData for data length failed" ) ) );
return false;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/virtuosobackend.cpp new/soprano-2.5.63/backends/virtuoso/virtuosobackend.cpp
--- old/soprano-2.5.0/backends/virtuoso/virtuosobackend.cpp 2010-08-02 16:05:34.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/virtuosobackend.cpp 2010-08-27 18:30:39.000000000 +0200
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project
*
- * Copyright (C) 2008-2009 Sebastian Trueg
+ * Copyright (C) 2008-2010 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -55,6 +55,7 @@
QString pwd = valueInSettings( settings, BackendOptionPassword ).toString();
QString path = valueInSettings( settings, BackendOptionStorageDir ).toString();
bool debugMode = valueInSettings( settings, BackendOptionUser, QLatin1String( "debugmode" ) ).toBool();
+ int queryTimeout = valueInSettings( settings, QLatin1String( "QueryTimeout" ), 0 ).toInt();
VirtuosoController* controller = 0;
if ( host.isEmpty() &&
@@ -80,20 +81,24 @@
pwd = "dba";
}
- QString driverPath = findVirtuosoDriver();
- if ( driverPath.isEmpty() ) {
+#ifdef Q_OS_WIN
+ const QString odbcDriver = QLatin1String( "{Virtuoso (Open Source)}" );
+#else
+ const QString odbcDriver = findVirtuosoDriver();
+ if ( odbcDriver.isEmpty() ) {
setError( "Could not find Virtuoso ODBC driver" );
return 0;
}
-
-#ifdef Q_OS_WIN
- QString connectString = QString( "driver={Virtuoso (Open Source)};host=%1:%2;uid=%3;pwd=%4" )
- .arg( host, QString::number( port ), uid, pwd );
-#else
- QString connectString = QString( "host=%1:%2;uid=%3;pwd=%4;driver=%5" )
- .arg( host, QString::number( port ), uid, pwd, driverPath );
#endif
- ODBC::ConnectionPool* connectionPool = new ODBC::ConnectionPool( connectString );
+
+ const QString connectString = QString( "host=%1:%2;uid=%3;pwd=%4;driver=%5" )
+ .arg( host, QString::number( port ), uid, pwd, odbcDriver );
+ QStringList connectionSetupCommands;
+ if ( queryTimeout > 1000 ) {
+ connectionSetupCommands << QString::fromLatin1( "set result_timeout=%1" ).arg( queryTimeout );
+ }
+
+ ODBC::ConnectionPool* connectionPool = new ODBC::ConnectionPool( connectString, connectionSetupCommands );
// FIXME: should configuration only be allowed on spawned servers?
if ( ODBC::Connection* conn = connectionPool->connection() ) {
@@ -183,10 +188,12 @@
bool Soprano::Virtuoso::BackendPlugin::isAvailable() const
{
+#ifndef Q_OS_WIN
if ( findVirtuosoDriver().isEmpty() ) {
qDebug() << Q_FUNC_INFO << "could not find Virtuoso ODBC driver";
return false;
}
+#endif
QString virtuosoBin = VirtuosoController::locateVirtuosoBinary();
if ( virtuosoBin.isEmpty() ) {
@@ -209,19 +216,11 @@
}
+#ifndef Q_OS_WIN
QString Soprano::Virtuoso::BackendPlugin::findVirtuosoDriver() const
{
-#ifdef Q_OS_WIN
- QStringList virtuosoDirs;
- const QString virtuosoHome = QDir::fromNativeSeparators( qgetenv("VIRTUOSO_HOME") );
- if ( !virtuosoHome.isEmpty() ) {
- virtuosoDirs << virtuosoHome + QLatin1String("/bin")
- << virtuosoHome + QLatin1String("/lib");
- }
- return Soprano::findLibraryPath( "virtodbc", virtuosoDirs );
-#else
return Soprano::findLibraryPath( "virtodbc_r", QStringList(), QStringList() << QLatin1String( "virtuoso/plugins/" ) << QLatin1String( "odbc/" ) );
-#endif
}
+#endif
#include "virtuosobackend.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/virtuosobackend.h new/soprano-2.5.63/backends/virtuoso/virtuosobackend.h
--- old/soprano-2.5.0/backends/virtuoso/virtuosobackend.h 2009-10-09 17:51:53.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/virtuosobackend.h 2010-08-19 10:09:36.000000000 +0200
@@ -48,8 +48,10 @@
BackendFeatures supportedFeatures() const;
bool isAvailable() const;
+#ifndef Q_OS_WIN
private:
QString findVirtuosoDriver() const;
+#endif
};
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/virtuosocontroller.cpp new/soprano-2.5.63/backends/virtuoso/virtuosocontroller.cpp
--- old/soprano-2.5.0/backends/virtuoso/virtuosocontroller.cpp 2010-06-10 15:02:52.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/virtuosocontroller.cpp 2010-09-14 14:56:53.000000000 +0200
@@ -138,6 +138,9 @@
#endif
qDebug() << "Starting Virtuoso server:" << virtuosoExe << args;
+ // We need to set the working directory cause virtuoso creates a temp checkpoint_in_progress file
+ // in the directory it was started.
+ m_virtuosoProcess.setWorkingDirectory( storageDir );
m_virtuosoProcess.start( virtuosoExe, args, QIODevice::ReadOnly );
m_virtuosoProcess.setReadChannel( QProcess::StandardError );
m_virtuosoProcess.closeReadChannel( QProcess::StandardOutput );
@@ -274,10 +277,11 @@
// backwards compatibility
int numberOfBuffers = valueInSettings( settings, "buffers", 2000 ).toInt();
- int numberOfThreads = valueInSettings( settings, "threads", 10 ).toInt();
+ int numberOfThreads = valueInSettings( settings, "threads", 100 ).toInt();
numberOfBuffers = valueInSettings( settings, "NumberOfBuffers", numberOfBuffers ).toInt();
numberOfThreads = valueInSettings( settings, "ServerThreads", numberOfThreads ).toInt();
+ int maxDirtyBuffers = valueInSettings( settings, "MaxDirtyBuffers", numberOfBuffers*2/3 ).toInt();
int checkpointInterval = valueInSettings( settings, "CheckpointInterval", -1 ).toInt();
int minAutoCheckpointSize = valueInSettings( settings, "MinAutoCheckpointSize", -1 ).toInt();
@@ -328,7 +332,7 @@
cfs.setValue( "NumberOfBuffers", numberOfBuffers );
// down from 1200
- cfs.setValue( "MaxDirtyBuffers", "50" );
+ cfs.setValue( "MaxDirtyBuffers", maxDirtyBuffers );
// down from 10
cfs.setValue( "SchedulerInterval", "5" );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/virtuosomodel.cpp new/soprano-2.5.63/backends/virtuoso/virtuosomodel.cpp
--- old/soprano-2.5.0/backends/virtuoso/virtuosomodel.cpp 2010-07-22 10:44:33.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/virtuosomodel.cpp 2010-08-31 15:55:01.000000000 +0200
@@ -106,10 +106,45 @@
}
+Soprano::QueryResultIterator Soprano::VirtuosoModelPrivate::sparqlQuery( const QString& query )
+{
+ QString finalQuery( query );
+ finalQuery.prepend( QLatin1String( s_queryPrefix ) + ' ' );
+
+// qDebug() << Q_FUNC_INFO << finalQuery;
+
+ if ( ODBC::Connection* conn = connectionPool->connection() ) {
+ ODBC::QueryResult* result = conn->executeQuery( finalQuery );
+ if ( result ) {
+ q->clearError();
+ Virtuoso::QueryResultIteratorBackend* backend = new Virtuoso::QueryResultIteratorBackend( this, result );
+ return backend;
+ }
+ else {
+ qDebug() << "Query failed:" << finalQuery;
+ q->setError( conn->lastError() );
+ return 0;
+ }
+ }
+ else {
+ q->setError( connectionPool->lastError() );
+ return 0;
+ }
+}
+
+
+QString Soprano::VirtuosoModelPrivate::replaceFakeTypesInQuery( const QString& query )
+{
+ QMutexLocker lock( &m_fakeBooleanRegExpMutex );
+ return QString(query).replace( m_fakeBooleanRegExp, QString::fromLatin1("'\\2'^^<%1>").arg( Virtuoso::fakeBooleanTypeString() ) );
+}
+
+
Soprano::VirtuosoModel::VirtuosoModel( ODBC::ConnectionPool* connectionPool, const Backend* b )
: StorageModel(b),
d( new VirtuosoModelPrivate() )
{
+ d->q = this;
d->connectionPool = connectionPool;
}
@@ -176,11 +211,11 @@
{
// qDebug() << Q_FUNC_INFO;
- return executeQuery( QString::fromLatin1( "select distinct ?g where { "
- "graph ?g { ?s ?p ?o . } . "
- "FILTER(?g != <%1> && ?g != <%2>) . }" )
- .arg( QLatin1String( Virtuoso::defaultGraphString() ),
- QLatin1String( Virtuoso::openlinkVirtualGraphString() ) ) )
+ return d->sparqlQuery( QString::fromLatin1( "select distinct ?g where { "
+ "graph ?g { ?s ?p ?o . } . "
+ "FILTER(?g != <%1> && ?g != <%2>) . }" )
+ .arg( QLatin1String( Virtuoso::defaultGraphString() ),
+ QLatin1String( Virtuoso::openlinkVirtualGraphString() ) ) )
.iterateBindings( 0 );
}
@@ -217,7 +252,7 @@
// return b;
// }
// return false;
- return executeQuery( query, Query::QueryLanguageSparql ).boolValue();
+ return d->sparqlQuery( query ).boolValue();
}
@@ -235,7 +270,7 @@
.arg( statementToConstructGraphPattern( partial, true ),
QLatin1String( Virtuoso::openlinkVirtualGraphString() ) );
// qDebug() << "List Statements Query" << query;
- return executeQuery( query, Query::QueryLanguageSparql )
+ return d->sparqlQuery( query )
.iterateStatementsFromBindings( partial.subject().isValid() ? QString() : QString( 's' ),
partial.predicate().isValid() ? QString() : QString( 'p' ),
partial.object().isValid() ? QString() : QString( 'o' ),
@@ -321,9 +356,9 @@
}
else {
// FIXME: do this in a fancy way, maybe an inner sql query or something
- QList<Node> allContexts = executeQuery( QString::fromLatin1( "select distinct ?g where { %1 . FILTER(?g != <%2>) . }" )
- .arg( statementToConstructGraphPattern( statement, true ),
- QLatin1String( Virtuoso::openlinkVirtualGraphString() ) ) )
+ QList<Node> allContexts = d->sparqlQuery( QString::fromLatin1( "select distinct ?g where { %1 . FILTER(?g != <%2>) . }" )
+ .arg( statementToConstructGraphPattern( statement, true ),
+ QLatin1String( Virtuoso::openlinkVirtualGraphString() ) ) )
.iterateBindings( 0 ).allNodes();
foreach( const Node& node, allContexts ) {
Statement s( statement );
@@ -378,10 +413,10 @@
{
// qDebug() << Q_FUNC_INFO;
- QueryResultIterator it = executeQuery( QString::fromLatin1( "select count(*) where { "
- "graph ?g { ?s ?p ?o . } . "
- "FILTER(?g != <%1>) . }" )
- .arg( QLatin1String( Virtuoso::openlinkVirtualGraphString() ) ) );
+ QueryResultIterator it = d->sparqlQuery( QString::fromLatin1( "select count(*) where { "
+ "graph ?g { ?s ?p ?o . } . "
+ "FILTER(?g != <%1>) . }" )
+ .arg( QLatin1String( Virtuoso::openlinkVirtualGraphString() ) ) );
if ( it.isValid() && it.next() ) {
return it.binding( 0 ).literal().toInt();
}
@@ -402,37 +437,13 @@
Query::QueryLanguage language,
const QString& userQueryLanguage ) const
{
-// qDebug() << Q_FUNC_INFO << query;
-
- QString finalQuery( query );
-
if ( language != Soprano::Query::QueryLanguageSparql ) {
setError( Error::Error( QString::fromLatin1( "Unsupported query language %1." )
.arg( Query::queryLanguageToString( language, userQueryLanguage ) ) ) );
return QueryResultIterator();
}
- finalQuery.prepend( QLatin1String( s_queryPrefix ) + ' ' );
-
-// qDebug() << Q_FUNC_INFO << finalQuery;
-
- if ( ODBC::Connection* conn = d->connectionPool->connection() ) {
- ODBC::QueryResult* result = conn->executeQuery( finalQuery );
- if ( result ) {
- clearError();
- Virtuoso::QueryResultIteratorBackend* backend = new Virtuoso::QueryResultIteratorBackend( d, result );
- return backend;
- }
- else {
- qDebug() << "Query failed:" << finalQuery;
- setError( conn->lastError() );
- return 0;
- }
- }
- else {
- setError( d->connectionPool->lastError() );
- return 0;
- }
+ return d->sparqlQuery( d->replaceFakeTypesInQuery( query ) );
}
#include "virtuosomodel.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/virtuosomodel.h new/soprano-2.5.63/backends/virtuoso/virtuosomodel.h
--- old/soprano-2.5.0/backends/virtuoso/virtuosomodel.h 2009-10-09 17:51:53.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/virtuosomodel.h 2010-08-31 15:55:01.000000000 +0200
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project
*
- * Copyright (C) 2008 Sebastian Trueg
+ * Copyright (C) 2008-2010 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -57,6 +57,8 @@
private:
VirtuosoModelPrivate* const d;
+
+ friend class VirtuosoModelPrivate;
};
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/backends/virtuoso/virtuosomodel_p.h new/soprano-2.5.63/backends/virtuoso/virtuosomodel_p.h
--- old/soprano-2.5.0/backends/virtuoso/virtuosomodel_p.h 2010-07-22 10:44:33.000000000 +0200
+++ new/soprano-2.5.63/backends/virtuoso/virtuosomodel_p.h 2010-08-31 15:55:01.000000000 +0200
@@ -23,6 +23,7 @@
#define _SOPRANO_IODBC_MODEL_P_H_
#include
+#include
#include "virtuosoqueryresultiteratorbackend.h"
@@ -32,11 +33,16 @@
class ConnectionPool;
}
+ class VirtuosoModel;
+
class VirtuosoModelPrivate
{
public:
VirtuosoModelPrivate()
: connectionPool( 0 ),
+ m_fakeBooleanRegExp( QLatin1String("([\"'])(true|false)\\1\\^\\^(|\\w+\\:boolean)"),
+ Qt::CaseInsensitive,
+ QRegExp::RegExp2 ),
m_openIteratorMutex( QMutex::Recursive ) {
}
@@ -59,10 +65,19 @@
m_openIteratorMutex.unlock();
}
+ QueryResultIterator sparqlQuery( const QString& query );
+
+ QString replaceFakeTypesInQuery( const QString& query );
+
ODBC::ConnectionPool* connectionPool;
QListVirtuoso::QueryResultIteratorBackend* m_openIterators;
+ VirtuosoModel* q;
+
private:
+ QRegExp m_fakeBooleanRegExp;
+ QMutex m_fakeBooleanRegExpMutex;
+
QMutex m_openIteratorMutex;
};
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/client/CMakeLists.txt new/soprano-2.5.63/client/CMakeLists.txt
--- old/soprano-2.5.0/client/CMakeLists.txt 2010-08-05 19:43:46.000000000 +0200
+++ new/soprano-2.5.63/client/CMakeLists.txt 2010-08-17 17:43:38.000000000 +0200
@@ -59,7 +59,7 @@
qt4_automoc(${soprano_client_SRC})
-add_library(sopranoclient SHARED ${soprano_client_SRC})
+add_library(sopranoclient ${LIBRARY_TYPE} ${soprano_client_SRC})
set_target_properties(sopranoclient PROPERTIES
VERSION 1.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/client/localsocketclient.cpp new/soprano-2.5.63/client/localsocketclient.cpp
--- old/soprano-2.5.0/client/localsocketclient.cpp 2010-07-19 17:57:41.000000000 +0200
+++ new/soprano-2.5.63/client/localsocketclient.cpp 2010-09-09 17:47:55.000000000 +0200
@@ -162,7 +162,7 @@
void Soprano::Client::LocalSocketClient::disconnect()
{
- delete d->connection;
+ d->connection->deleteLater();
d->connection = 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/server/CMakeLists.txt new/soprano-2.5.63/server/CMakeLists.txt
--- old/soprano-2.5.0/server/CMakeLists.txt 2010-04-28 09:00:41.000000000 +0200
+++ new/soprano-2.5.63/server/CMakeLists.txt 2010-08-17 17:43:38.000000000 +0200
@@ -50,7 +50,7 @@
#qt4_automoc(${soprano_serverbackend_SRC})
-add_library(sopranoserver SHARED ${soprano_server_SRC})
+add_library(sopranoserver ${LIBRARY_TYPE} ${soprano_server_SRC})
#add_library(soprano_serverclientbackend SHARED ${soprano_serverbackend_SRC})
qt4_automoc(sopranodcore.cpp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/server/datastream.cpp new/soprano-2.5.63/server/datastream.cpp
--- old/soprano-2.5.0/server/datastream.cpp 2009-05-06 13:14:09.000000000 +0200
+++ new/soprano-2.5.63/server/datastream.cpp 2010-08-13 17:29:40.000000000 +0200
@@ -82,7 +82,7 @@
bool Soprano::DataStream::writeUnsignedInt8( quint8 v )
{
- if ( m_device->write( (char*)&v, 1 ) != 1 ) {
+ if ( !m_device || m_device->write( (char*)&v, 1 ) != 1 ) {
setError( "Failed to write unsigned int8." );
return false;
}
@@ -92,7 +92,7 @@
bool Soprano::DataStream::writeUnsignedInt16( quint16 v )
{
- if ( m_device->write( (char*)&v, 2 ) != 2 ) {
+ if ( !m_device || m_device->write( (char*)&v, 2 ) != 2 ) {
setError( "Failed to write unsigned int32." );
return false;
}
@@ -102,7 +102,7 @@
bool Soprano::DataStream::writeUnsignedInt32( quint32 v )
{
- if ( m_device->write( (char*)&v, sizeof( quint32 ) ) != sizeof( quint32 ) ) {
+ if ( !m_device || m_device->write( (char*)&v, sizeof( quint32 ) ) != sizeof( quint32 ) ) {
setError( "Failed to write unsigned int32." );
return false;
}
@@ -112,7 +112,7 @@
bool Soprano::DataStream::writeInt32( qint32 v )
{
- if ( m_device->write( (char*)&v, sizeof( qint32 ) ) != sizeof( qint32 ) ) {
+ if ( !m_device || m_device->write( (char*)&v, sizeof( qint32 ) ) != sizeof( qint32 ) ) {
setError( "Failed to write int32." );
return false;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/soprano/CMakeLists.txt new/soprano-2.5.63/soprano/CMakeLists.txt
--- old/soprano-2.5.0/soprano/CMakeLists.txt 2010-07-26 13:45:10.000000000 +0200
+++ new/soprano-2.5.63/soprano/CMakeLists.txt 2010-08-17 17:43:38.000000000 +0200
@@ -100,7 +100,7 @@
qt4_automoc(${soprano_SRCS})
-add_library(soprano SHARED ${soprano_SRCS})
+add_library(soprano ${LIBRARY_TYPE} ${soprano_SRCS})
target_link_libraries(soprano ${QT_QTCORE_LIBRARY})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/soprano/soprano_export.h new/soprano-2.5.63/soprano/soprano_export.h
--- old/soprano-2.5.0/soprano/soprano_export.h 2007-09-29 02:06:37.000000000 +0200
+++ new/soprano-2.5.63/soprano/soprano_export.h 2010-08-17 17:43:38.000000000 +0200
@@ -26,7 +26,10 @@
#include
#ifndef SOPRANO_EXPORT
-# if defined(MAKE_SOPRANO_LIB)
+# if defined(SOPRANO_STATIC_LIBS)
+ /* No export/import for static libraries */
+# define SOPRANO_EXPORT
+# elif defined(MAKE_SOPRANO_LIB)
/* We are building this library */
# define SOPRANO_EXPORT Q_DECL_EXPORT
# else
@@ -36,7 +39,10 @@
#endif
#ifndef SOPRANO_SERVER_EXPORT
-# if defined(MAKE_SOPRANO_SERVER_LIB)
+# if defined(SOPRANO_STATIC_LIBS)
+ /* No export/import for static libraries */
+# define SOPRANO_SERVER_EXPORT
+# elif defined(MAKE_SOPRANO_SERVER_LIB)
/* We are building this library */
# define SOPRANO_SERVER_EXPORT Q_DECL_EXPORT
# else
@@ -46,7 +52,10 @@
#endif
#ifndef SOPRANO_CLIENT_EXPORT
-# if defined(MAKE_SOPRANO_CLIENT_LIB)
+# if defined(SOPRANO_STATIC_LIBS)
+ /* No export/import for static libraries */
+# define SOPRANO_CLIENT_EXPORT
+# elif defined(MAKE_SOPRANO_CLIENT_LIB)
/* We are building this library */
# define SOPRANO_CLIENT_EXPORT Q_DECL_EXPORT
# else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/soprano/statement.h new/soprano-2.5.63/soprano/statement.h
--- old/soprano-2.5.0/soprano/statement.h 2010-06-13 17:42:17.000000000 +0200
+++ new/soprano-2.5.63/soprano/statement.h 2010-08-18 16:29:30.000000000 +0200
@@ -163,6 +163,10 @@
class Private;
QSharedDataPointer<Private> d;
};
+
+ /**
+ * \relates Soprano::Statement
+ */
SOPRANO_EXPORT uint qHash( const Statement& s );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/soprano/vocabulary/nao.cpp new/soprano-2.5.63/soprano/vocabulary/nao.cpp
--- old/soprano-2.5.0/soprano/vocabulary/nao.cpp 2009-01-19 17:12:25.000000000 +0100
+++ new/soprano-2.5.63/soprano/vocabulary/nao.cpp 2010-08-18 16:22:26.000000000 +0200
@@ -1,6 +1,6 @@
/*
* This file has been generated by the onto2vocabularyclass tool
- * copyright (C) 2007-2008 Sebastian Trueg
+ * copyright (C) 2007-2010 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -35,6 +35,7 @@
nao_contributor( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#contributor", QUrl::StrictMode ) ),
nao_created( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created", QUrl::StrictMode ) ),
nao_creator( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#creator", QUrl::StrictMode ) ),
+ nao_deprecated( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated", QUrl::StrictMode ) ),
nao_description( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", QUrl::StrictMode ) ),
nao_engineeringTool( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#engineeringTool", QUrl::StrictMode ) ),
nao_hasDefaultNamespace( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasDefaultNamespace", QUrl::StrictMode ) ),
@@ -46,6 +47,7 @@
nao_hasTopic( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTopic", QUrl::StrictMode ) ),
nao_iconName( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#iconName", QUrl::StrictMode ) ),
nao_identifier( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#identifier", QUrl::StrictMode ) ),
+ nao_isDataGraphFor( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isDataGraphFor", QUrl::StrictMode ) ),
nao_isRelated( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated", QUrl::StrictMode ) ),
nao_isTagFor( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTagFor", QUrl::StrictMode ) ),
nao_isTopicOf( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isTopicOf", QUrl::StrictMode ) ),
@@ -61,6 +63,7 @@
nao_scoreParameter( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#scoreParameter", QUrl::StrictMode ) ),
nao_serializationLanguage( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#serializationLangua...", QUrl::StrictMode ) ),
nao_status( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#status", QUrl::StrictMode ) ),
+ nao_userVisible( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible", QUrl::StrictMode ) ),
nao_version( QUrl::fromEncoded( "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#version", QUrl::StrictMode ) ) {
}
@@ -75,6 +78,7 @@
QUrl nao_contributor;
QUrl nao_created;
QUrl nao_creator;
+ QUrl nao_deprecated;
QUrl nao_description;
QUrl nao_engineeringTool;
QUrl nao_hasDefaultNamespace;
@@ -86,6 +90,7 @@
QUrl nao_hasTopic;
QUrl nao_iconName;
QUrl nao_identifier;
+ QUrl nao_isDataGraphFor;
QUrl nao_isRelated;
QUrl nao_isTagFor;
QUrl nao_isTopicOf;
@@ -101,6 +106,7 @@
QUrl nao_scoreParameter;
QUrl nao_serializationLanguage;
QUrl nao_status;
+ QUrl nao_userVisible;
QUrl nao_version;
};
@@ -161,6 +167,11 @@
return s_nao()->nao_creator;
}
+QUrl Soprano::Vocabulary::NAO::deprecated()
+{
+ return s_nao()->nao_deprecated;
+}
+
QUrl Soprano::Vocabulary::NAO::description()
{
return s_nao()->nao_description;
@@ -216,6 +227,11 @@
return s_nao()->nao_identifier;
}
+QUrl Soprano::Vocabulary::NAO::isDataGraphFor()
+{
+ return s_nao()->nao_isDataGraphFor;
+}
+
QUrl Soprano::Vocabulary::NAO::isRelated()
{
return s_nao()->nao_isRelated;
@@ -291,6 +307,11 @@
return s_nao()->nao_status;
}
+QUrl Soprano::Vocabulary::NAO::userVisible()
+{
+ return s_nao()->nao_userVisible;
+}
+
QUrl Soprano::Vocabulary::NAO::version()
{
return s_nao()->nao_version;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/soprano/vocabulary/nao.h new/soprano-2.5.63/soprano/vocabulary/nao.h
--- old/soprano-2.5.0/soprano/vocabulary/nao.h 2009-01-19 17:12:25.000000000 +0100
+++ new/soprano-2.5.63/soprano/vocabulary/nao.h 2010-08-18 16:22:26.000000000 +0200
@@ -1,6 +1,6 @@
/*
* This file has been generated by the onto2vocabularyclass tool
- * copyright (C) 2007-2008 Sebastian Trueg
+ * copyright (C) 2007-2010 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -106,6 +106,15 @@
SOPRANO_EXPORT QUrl creator();
/**
+ * http://www.semanticdesktop.org/ontologies/2007/08/15/nao#deprecated
+ *
+ * If this property is assigned, the subject class, property,
+ * or resource, is deprecated and should not be used in production
+ * systems any longer. It may be removed without further notice.
+ */
+ SOPRANO_EXPORT QUrl deprecated();
+
+ /**
* http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description
*
* A non-technical textual annotation for a resource
@@ -187,6 +196,16 @@
SOPRANO_EXPORT QUrl identifier();
/**
+ * http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isDataGraphFor
+ *
+ * Links a named graph to the resource for which it contains metadata.
+ * Its typical usage would be to link the graph containing extracted
+ * file metadata to the file resource. This allows for easy maintenance
+ * later on.
+ */
+ SOPRANO_EXPORT QUrl isDataGraphFor();
+
+ /**
* http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated
*
* Defines an annotation for a resource in the form of a relationship
@@ -270,7 +289,7 @@
/**
* http://www.semanticdesktop.org/ontologies/2007/08/15/nao#score
*
- * An authorative score for an item valued between 0 and 1
+ * An authoritative score for an item valued between 0 and 1
*/
SOPRANO_EXPORT QUrl score();
@@ -300,6 +319,15 @@
SOPRANO_EXPORT QUrl status();
/**
+ * http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible
+ *
+ * Mark a property, class, or even resource as user visible or not.
+ * Non-user-visible entities should never be presented to the
+ * user. By default everything is user-visible.
+ */
+ SOPRANO_EXPORT QUrl userVisible();
+
+ /**
* http://www.semanticdesktop.org/ontologies/2007/08/15/nao#version
*
* Specifies the version of a graph, in numeric format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.0/tools/onto2vocabularyclass.cpp new/soprano-2.5.63/tools/onto2vocabularyclass.cpp
--- old/soprano-2.5.0/tools/onto2vocabularyclass.cpp 2010-01-24 18:14:08.000000000 +0100
+++ new/soprano-2.5.63/tools/onto2vocabularyclass.cpp 2010-09-14 14:54:33.000000000 +0200
@@ -64,7 +64,7 @@
" */\n";
-#define VERSION "0.2"
+#define VERSION "1.1"
int version()
{
@@ -330,8 +330,8 @@
return 1;
}
- // We simplify and take it as granted that all resources have the same NS
QString ontoNamespace;
+ // We simplify and take it as granted that all resources have the same NS
QUrl namespaceUri( normalizedResources.constBegin().key() );
if ( namespaceUri.hasFragment() ) {
namespaceUri.setFragment( QString() );
@@ -341,6 +341,13 @@
ontoNamespace = namespaceUri.toString().section( "/", 0, -2 ) + '/';
}
qDebug() << "namespace: " << ontoNamespace;
+
+ QUrl nrlGraph;
+ it = graph.listStatements( Node(), Vocabulary::RDF::type(), Vocabulary::NRL::Ontology() );
+ if ( it.next() ) {
+ nrlGraph = it.current().subject().uri();
+ it.close();
+ }
// ----------------------------------------------------
@@ -378,6 +385,17 @@
headerStream << QString( "%1_EXPORT " ).arg(exportModule.toUpper());
headerStream << "QUrl " << className.toLower() << "Namespace();" << endl << endl;
+ // the NRL graph
+ if ( !nrlGraph.isEmpty() ) {
+ headerStream << createIndent( indent ) << "/**" << endl
+ << createIndent( indent ) << " * " << nrlGraph.toString() << endl
+ << createIndent( indent ) << " */" << endl;
+ headerStream << createIndent( indent );
+ if ( visibilityExport )
+ headerStream << QString( "%1_EXPORT " ).arg(exportModule.toUpper());
+ headerStream << "QUrl nrlOntologyGraph();" << endl << endl;
+ }
+
for( QMap >::const_iterator it = normalizedResources.constBegin();
it != normalizedResources.constEnd(); ++it ) {
QString uri = it.key();
@@ -427,6 +445,9 @@
sourceStream << className.toLower() << "_namespace( QUrl::fromEncoded( \"" << ontoNamespace << "\", QUrl::StrictMode ) )," << endl;
+ if ( !nrlGraph.isEmpty() )
+ sourceStream << createIndent( 2 ) << " nrlOntologyGraph( QUrl::fromEncoded( \"" << nrlGraph.toString() << "\", QUrl::StrictMode ) )," << endl;
+
for( QMap >::const_iterator it = normalizedResources.constBegin();
it != normalizedResources.constEnd(); ++it ) {
QString uri = it.key();
@@ -446,6 +467,9 @@
sourceStream << createIndent( 1 ) << "QUrl " << className.toLower() << "_namespace;" << endl;
+ if ( !nrlGraph.isEmpty() )
+ sourceStream << createIndent( 1 ) << "QUrl nrlOntologyGraph;" << endl;
+
for( QMap >::const_iterator it = normalizedResources.constBegin();
it != normalizedResources.constEnd(); ++it ) {
QString name = normalizeName( it.value().first );
@@ -464,6 +488,17 @@
<< createIndent( 1 ) << "return " << singletonName << "()->" << className.toLower() << "_namespace;" << endl
<< "}" << endl << endl;
+ if ( !nrlGraph.isEmpty() ) {
+ sourceStream << "QUrl ";
+ if ( !namespaceName.isEmpty() ) {
+ sourceStream << namespaceName << "::";
+ }
+ sourceStream << className << "::nrlOntologyGraph()" << endl
+ << "{" << endl
+ << createIndent( 1 ) << "return " << singletonName << "()->nrlOntologyGraph;" << endl
+ << "}" << endl << endl;
+ }
+
for( QMap >::const_iterator it = normalizedResources.constBegin();
it != normalizedResources.constEnd(); ++it ) {
QString name = normalizeName( it.value().first );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org