[Nepomuk] notes deleted by Nepomuk
PierreL
pierrelud at yahoo.com
Mon Feb 15 18:48:22 CET 2010
HI,
Our application creates a new note by doing the following below. Why does Nepomuk issue "delete from ..." as soon as our appl start? In <= 4.3.5 using sesame2 as backend this never happened with the same code.
----------------------------------------------------------------------
void MainWindow::newNote()
{
QString uri = Nepomuk::ResourceManager::instance()->generateUniqueUri();
Note n = Note(uri);
m_model->insertRows(0, 1);
m_model->setData(m_model->index(0, 0, QModelIndex()), uri, Qt::EditRole);
ui->view->setCurrentIndex(m_proxyModel->mapFromSource(m_model->index(0, 0, QModelIndex())));
}
Note::Note(const QString &uriOrName)
: Nepomuk::Thing(uriOrName, Nepomuk::Vocabulary::PIMO::Note())
{
if (!isValid()) {
QDateTime now = QDateTime::currentDateTime().toTimeSpec(Qt::LocalTime);
setCreated(now);
setLastModified(now);
}
}
void Note::setCreated(QDateTime newCreated)
{
// qDebug("%s", qPrintable(newCreated.toString())); //FIXME: if i delete this it sets date time to 0. Why?
setProperty(Soprano::Vocabulary::NAO::created(), Nepomuk::Variant(newCreated));
}
/**
* Sets the time and date of the last write access to the note (by setting the \c lastModified property of the note in the RDF Repository).
*/
void Note::setLastModified(QDateTime newModified)
{
setProperty(Soprano::Vocabulary::NAO::lastModified(), Nepomuk::Variant(newModified));
}
-------------------------------------------------
KDE Platform Version 4.4.00 (KDE 4.4.0) "release 223"
Qt 4.6.1
----------------------------------------------------
nepomukserverrc:
================
[Basic Settings]
Configured repositories=main
Start Nepomuk=true
[Service-nepomukmigration1]
autostart=false
[Service-nepomukstrigiservice]
autostart=false
[main Settings]
Maximum memory=50
Storage Dir[$e]=$HOME/.kde4/share/apps/nepomuk/repository/main/
Used Soprano Backend=virtuosobackend
rebuilt index for type indexing=true
----------------------------------------------------------
pielud at quty:~/creator/semnotes/build> sopranocmd
sopranocmd 2.4.0.1
Copyright (C) 2007-2010 Sebastian Trueg <trueg at kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Using Virtuoso Version: "6.1.0.3126-pthreads"
-----------------------------------------------------
Connected to D-Bus.
Received reply from :1.103
Arguments: "virtuosobackend"
-----------------------------------------------------
Nepomuk output:
===============
pielud at quty:~/creator/semnotes/build> [/usr/bin/nepomukservicestub] void Soprano::Server::ServerCore::slotNewSocketConnection()
void Soprano::Server::ServerCore::Private::handleIncomingConnection(QIODevice*)
[/usr/bin/nepomukservicestub] Soprano::ODBC::Connection::Connection() Soprano::Server::ServerConnection(0x81b8708)
[/usr/bin/nepomukservicestub] void Soprano::Server::ServerCore::Private::handleIncomingConnection(QIODevice*) New connection. New count: 8
pielud at quty:~/creator/semnotes/build>
pielud at quty:~/creator/semnotes/build> [/usr/bin/nepomukservicestub] removeAllStatements query: "delete from <nepomuk:/ctx/d5eaa9ba-8e9c-466b-ab93-0729859e624a> { <nepomuk:/res/a7248e92-81eb-4fb6-a59b-ca4080c26db4> <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created> "2010-02-15T17:24:40.26Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> } where { graph <nepomuk:/ctx/d5eaa9ba-8e9c-466b-ab93-0729859e624a> { <nepomuk:/res/a7248e92-81eb-4fb6-a59b-ca4080c26db4> <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#created> "2010-02-15T17:24:40.26Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> . } }"
[/usr/bin/nepomukservicestub] removeAllStatements query: "delete from <nepomuk:/ctx/d5eaa9ba-8e9c-466b-ab93-0729859e624a> { <nepomuk:/res/a7248e92-81eb-4fb6-a59b-ca4080c26db4> <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified> "2010-02-15T17:24:40.285Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> } where { graph <nepomuk:/ctx/d5eaa9ba-8e9c-466b-ab93-0729859e624a> { <nepomuk:/res/a7248e92-81eb-4fb6-a59b-ca4080c26db4> <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified> "2010-02-15T17:24:40.285Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> . } }"
[/usr/bin/nepomukservicestub] removeAllStatements query: "delete from <nepomuk:/ctx/d5eaa9ba-8e9c-466b-ab93-0729859e624a> { <nepomuk:/res/a7248e92-81eb-4fb6-a59b-ca4080c26db4> <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified> ?o } where { graph <nepomuk:/ctx/d5eaa9ba-8e9c-466b-ab93-0729859e624a> { <nepomuk:/res/a7248e92-81eb-4fb6-a59b-ca4080c26db4> <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified> ?o . } }"
pielud at quty:~/creator/semnotes/build>
pielud at quty:~/creator/semnotes/build> [/usr/bin/nepomukservicestub] virtual void Soprano::Server::ServerConnection::run() thread done.
virtual Soprano::ODBC::Connection::~Connection() Soprano::Server::ServerConnection(0x81b8708)
void Soprano::Server::ServerCore::serverConnectionFinished()
virtual Soprano::Server::ServerConnection::~ServerConnection() Removing connection
void Soprano::Server::ServerCore::serverConnectionFinished() Connection removed. Current count: 7
More information about the Nepomuk
mailing list