diff --git a/dataengines/metadata/bookmarks/bookmarksengine.cpp b/dataengines/metadata/bookmarks/bookmarksengine.cpp index e3807a11..5046559d 100644 --- a/dataengines/metadata/bookmarks/bookmarksengine.cpp +++ b/dataengines/metadata/bookmarks/bookmarksengine.cpp @@ -1,77 +1,74 @@ /* Copyright 2011 Sebastian Kügler This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ // Nepomuk #include #include #include #include #include -// Ontologies -#include "bookmark.h" - // Query API #include #include #include #include #include // Own stuff #include "bookmarksengine.h" #include "../metadatabaseengine.h" -// Ontos +// Ontologies #include "bookmark.h" #include "personcontact.h" BookmarksEngine::BookmarksEngine(QObject* parent, const QVariantList& args) : MetadataBaseEngine(parent, args) { } BookmarksEngine::~BookmarksEngine() { } bool BookmarksEngine::sourceRequestEvent(const QString &name) { if (name.startsWith("add:")) { QString massagedName = name; QUrl url = QUrl(massagedName.remove("add:")); Nepomuk::Resource r = Nepomuk::Resource(url); Nepomuk::Bookmark b = Nepomuk::Bookmark(r); b.setLabel("Active Bookmark!"); b.setDescription(massagedName); kDebug() << "Added Bookmark:" << massagedName; } Nepomuk::Types::Class bookmarkClass = Nepomuk::Types::Class(Nepomuk::Bookmark::resourceTypeUri()); //Nepomuk::Types::Class bookmarkClass = Nepomuk::Types::Class(Nepomuk::PersonContact::resourceTypeUri()); // for testing Nepomuk::Query::ResourceTypeTerm rtt = Nepomuk::Query::ResourceTypeTerm(bookmarkClass); Nepomuk::Query::Query bookmarkQuery; bookmarkQuery.setTerm(rtt); return query(bookmarkQuery); } #include "bookmarksengine.moc"