[tracker/wip/GrssPerson] rss: use tracker_sparql_builder_object_blank_open()/close()
- From: Igor Gnatenko <ignatenko src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/GrssPerson] rss: use tracker_sparql_builder_object_blank_open()/close()
- Date: Sat, 18 Jul 2015 14:10:16 +0000 (UTC)
commit 7c021524adc57257a19bf0c20a7b68f0ae69377d
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jul 18 17:10:01 2015 +0300
rss: use tracker_sparql_builder_object_blank_open()/close()
Tested-by: Igor Gnatenko <ignatenko src gnome org>
src/miners/rss/tracker-miner-rss.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/miners/rss/tracker-miner-rss.c b/src/miners/rss/tracker-miner-rss.c
index 4f744e6..5b349ab 100644
--- a/src/miners/rss/tracker-miner-rss.c
+++ b/src/miners/rss/tracker-miner-rss.c
@@ -687,16 +687,6 @@ sparql_add_contact (TrackerSparqlBuilder *sparql,
const gchar *name = grss_person_get_name (contact);
const gchar *email = grss_person_get_email (contact);
const gchar *uri = grss_person_get_uri (contact);
- gchar *email_alias = g_strdup_printf ("%s-email", alias);
-
- if (email != NULL) {
- tracker_sparql_builder_subject (sparql, email_alias);
- tracker_sparql_builder_predicate (sparql, "a");
- tracker_sparql_builder_object (sparql, "nco:EmailAddress");
-
- tracker_sparql_builder_predicate (sparql, "nco:emailAddress");
- tracker_sparql_builder_object_unvalidated (sparql, email);
- }
tracker_sparql_builder_subject (sparql, alias);
tracker_sparql_builder_predicate (sparql, "a");
@@ -707,15 +697,21 @@ sparql_add_contact (TrackerSparqlBuilder *sparql,
if (email != NULL) {
tracker_sparql_builder_predicate (sparql, "nco:hasEmailAddress");
- tracker_sparql_builder_object (sparql, email_alias);
+
+ tracker_sparql_builder_object_blank_open (sparql);
+
+ tracker_sparql_builder_predicate (sparql, "a");
+ tracker_sparql_builder_object (sparql, "nco:EmailAddress");
+
+ tracker_sparql_builder_predicate (sparql, "nco:emailAddress");
+ tracker_sparql_builder_object_unvalidated (sparql, email);
+ tracker_sparql_builder_object_blank_close (sparql);
}
if (uri != NULL) {
tracker_sparql_builder_predicate (sparql, "nco:websiteUrl");
tracker_sparql_builder_object_unvalidated (sparql, uri);
}
-
- g_free (email_alias);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]