[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [nepomuk-web-extractor] runtime: More fixes to TVDB plugin
From: Artem Serebriyskiy <v.for.vandal () gmail ! com>
Date: 2011-07-16 17:42:39
Message-ID: 20110716174239.2916DA60AE () git ! kde ! org
[Download RAW message or body]
Git commit 89400a1142542f6631ff9360cd6d478d16c806ff by Artem Serebriyskiy.
Committed on 16/07/2011 at 14:03.
Pushed by artemserebriyskiy into branch 'master'.
More fixes to TVDB plugin
1. Switch to using Nepomuk SimpleResource generator
M +6 -2 runtime/webextractor/plugins/tvdb/CMakeLists.txt
M +13 -6 runtime/webextractor/plugins/tvdb/tvdbexecutivereply.cpp
M +1 -1 runtime/ddms/gui/simple/list/list.qmlproject.user
http://commits.kde.org/nepomuk-web-extractor/89400a1142542f6631ff9360cd6d478d16c806ff
diff --git a/runtime/ddms/gui/simple/list/list.qmlproject.user \
b/runtime/ddms/gui/simple/list/list.qmlproject.user index 7a324b3..251f043 100644
--- a/runtime/ddms/gui/simple/list/list.qmlproject.user
+++ b/runtime/ddms/gui/simple/list/list.qmlproject.user
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.2.81, 2011-07-08T20:37:08. -->
+<!-- Written by Qt Creator 2.2.81, 2011-07-12T17:03:22. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
diff --git a/runtime/webextractor/plugins/tvdb/CMakeLists.txt \
b/runtime/webextractor/plugins/tvdb/CMakeLists.txt index 72f7921..4aa088c 100644
--- a/runtime/webextractor/plugins/tvdb/CMakeLists.txt
+++ b/runtime/webextractor/plugins/tvdb/CMakeLists.txt
@@ -34,8 +34,12 @@ if ( LibTvdb_FOUND )
seriescache.cpp
)
- nepomuk_add_ontology_classes(tvdb_plugin_SRCS
- ONTOLOGIES ${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nmm.trig)
+ nepomuk_add_simpleresource_classes(tvdb_plugin_HEADERS
+ ONTOLOGIES
+ ${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nmm.trig
+ ${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nie.trig
+ ${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nepomuk/nao.trig
+ )
set (TVDB_PLUGIN_VERSION 0.1)
set (TVDB_PLUGIN_INTERNAL_VERSION 0.1)
diff --git a/runtime/webextractor/plugins/tvdb/tvdbexecutivereply.cpp \
b/runtime/webextractor/plugins/tvdb/tvdbexecutivereply.cpp index ef68111..9f4b4b7 \
100644
--- a/runtime/webextractor/plugins/tvdb/tvdbexecutivereply.cpp
+++ b/runtime/webextractor/plugins/tvdb/tvdbexecutivereply.cpp
@@ -24,8 +24,8 @@
#include <Soprano/Vocabulary/NAO>
/* These files are generated by nepomuk_add_ontology_classes */
-#include "tvseries.h"
-#include "tvshow.h"
+#include "nmm/tvseries.h"
+#include "nmm/tvshow.h"
#include "decisionfactory.h"
#include "decision.h"
@@ -91,8 +91,9 @@ void Nepomuk::TvdbReply::slotRequestDone( int id, const \
QList<Tvdb::Series>& res // 3. create the series resource
SimpleResource mainResource(resource().resourceUri());
SimpleResource tvSeries;
- tvSeries.addProperty(Soprano::Vocabulary::NAO::prefLabel(), \
series.name());
- tvSeries.addProperty(Soprano::Vocabulary::NAO::description(), \
series.overview()); + NMM::TVSeries tvSeriesWrapper(&tvSeries);
+ tvSeriesWrapper.addPrefLabel(series.name());
+ tvSeriesWrapper.addNaoDescription(series.overview());
/*
TVSeries tvSeries( QUrl(), d.manager() );
tvSeries.setLabel( series.name() );
@@ -100,8 +101,14 @@ void Nepomuk::TvdbReply::slotRequestDone( int id, const \
QList<Tvdb::Series>& res
*/
// 4. add the data to the file resource: the TVShow type and the rest
- mainResource.addType( QUrl( TVShow::resourceTypeUri() ) );
- //mainResource.addProperty(
+ NMM::TVShow tvShowWrapper(&mainResource);
+ tvShowWrapper.setEpisodeNumber(c_episode);
+ tvShowWrapper.setSeason(c_season);
+ tvShowWrapper.setSeries(tvSeries.uri());
+ tvShowWrapper.addDescription(series[c_season][c_episode].overview());
+
+ // 5. add data to the tvseries again - circular dependency
+ tvSeriesWrapper.addHasEpisode( mainResource.uri() );
/*
TVShow proxyRes( d.proxyUrl(resource()), d.manager() );
proxyRes.addType( QUrl( TVShow::resourceTypeUri() ) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic