[gnome-documents/wip/skydrive: 6/28] miner: insert SkyDrive created_time as nie:contentCreated



commit 339c97559f6e53808450875cbc0687f6dbf1b9bf
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 7116019..0e57953 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;
@@ -207,6 +207,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]