[gnome-documents/wip/skydrive] miner: Insert Skydrive created_time as nie:contentCreated
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/wip/skydrive] miner: Insert Skydrive created_time as nie:contentCreated
- Date: Thu, 24 May 2012 21:11:15 +0000 (UTC)
commit 71b96b2cc0d302128ea9d54cf0ccdc34fbc13990
Author: Debarshi Ray <debarshir gnome org>
Date: Thu May 24 14:55:11 2012 +0200
miner: Insert Skydrive created_time as nie:contentCreated
Fixes: https://bugzilla.gnome.org/666535
src/miner/gd-zpj-miner.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/miner/gd-zpj-miner.c b/src/miner/gd-zpj-miner.c
index e240f36..bfb9027 100644
--- a/src/miner/gd-zpj-miner.c
+++ b/src/miner/gd-zpj-miner.c
@@ -159,7 +159,7 @@ account_miner_job_process_entry (AccountMinerJob *job,
ZpjSkydriveEntry *entry,
GError **error)
{
- GDateTime *updated_time;
+ GDateTime *created_time, *updated_time;
gchar *resource = NULL;
gchar *date, *datasource_urn, *identifier;
const gchar *class = NULL, *id;
@@ -203,6 +203,18 @@ account_miner_job_process_entry (AccountMinerJob *job,
if (*error != NULL)
goto out;
+ created_time = zpj_skydrive_entry_get_created_time (entry);
+ date = gd_iso8601_from_timestamp (g_date_time_to_unix (created_time));
+ gd_miner_tracker_sparql_connection_insert_or_replace_triple
+ (job->connection,
+ job->cancellable, error,
+ identifier, resource,
+ "nie:contentCreated", date);
+ g_free (date);
+
+ if (*error != NULL)
+ goto out;
+
updated_time = zpj_skydrive_entry_get_updated_time (entry);
date = gd_iso8601_from_timestamp (g_date_time_to_unix (updated_time));
gd_miner_tracker_sparql_connection_insert_or_replace_triple
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]