[tracker] rss: author field should be nco:Contact, not string
- From: Igor Gnatenko <ignatenko src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] rss: author field should be nco:Contact, not string
- Date: Wed, 15 Jul 2015 10:56:12 +0000 (UTC)
commit 92ef101289f31137482b8afef9e873916d169a10
Author: Igor Gnatenko <ignatenko src gnome org>
Date: Wed Jul 15 13:55:19 2015 +0300
rss: author field should be nco:Contact, not string
Reference: https://bugzilla.gnome.org/show_bug.cgi?id=752398
Signed-off-by: Igor Gnatenko <ignatenko src gnome org>
src/miners/rss/tracker-miner-rss.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/src/miners/rss/tracker-miner-rss.c b/src/miners/rss/tracker-miner-rss.c
index 818d2a8..72ec795 100644
--- a/src/miners/rss/tracker-miner-rss.c
+++ b/src/miners/rss/tracker-miner-rss.c
@@ -523,6 +523,18 @@ feed_item_check_exists_cb (GObject *source_object,
tracker_sparql_builder_object_double (sparql, longitude);
}
+ has_author = grss_feed_item_get_author (fiid->item);
+ if (has_author != NULL) {
+ g_message (" Author:'%s'", has_author);
+
+ tracker_sparql_builder_subject (sparql, "_:author");
+ tracker_sparql_builder_predicate (sparql, "a");
+ tracker_sparql_builder_object (sparql, "nco:Contact");
+
+ tracker_sparql_builder_predicate (sparql, "nco:fullName");
+ tracker_sparql_builder_object_unvalidated (sparql, has_author);
+ }
+
tracker_sparql_builder_subject (sparql, "_:message");
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "mfo:FeedMessage");
@@ -542,12 +554,9 @@ feed_item_check_exists_cb (GObject *source_object,
tracker_sparql_builder_object_unvalidated (sparql, tmp_string);
}
- tmp_string = grss_feed_item_get_author (fiid->item);
- if (tmp_string != NULL) {
- g_message (" Author:'%s'", tmp_string);
-
+ if (has_author != NULL) {
tracker_sparql_builder_predicate (sparql, "nco:creator");
- tracker_sparql_builder_object_unvalidated (sparql, tmp_string);
+ tracker_sparql_builder_object (sparql, "_:author");
}
tmp_string = grss_feed_item_get_description (fiid->item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]