[gnome-online-miners/gnome-3-10] gdata: Create a graph based on the nie:dataSource



commit 6d8bcaf50df67cf69d4e1ce4c1a42af9a9f82194
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Sep 9 18:41:24 2013 +0200

    gdata: Create a graph based on the nie:dataSource
    
    Looks like we have to force a full reindex of Google resources to make
    sure folders are correctly linked to their children. We can take this
    opportunity to fix the use graphs in this miner.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694003

 src/gom-gdata-miner.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/src/gom-gdata-miner.c b/src/gom-gdata-miner.c
index d2af1bd..4aad8fe 100644
--- a/src/gom-gdata-miner.c
+++ b/src/gom-gdata-miner.c
@@ -99,7 +99,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
     (job->connection,
      job->cancellable, error,
      &resource_exists,
-     resource_url, identifier,
+     job->datasource_urn, identifier,
      "nfo:RemoteDataObject", class, NULL);
 
   if (*error != NULL)
@@ -133,7 +133,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
   gom_tracker_sparql_connection_insert_or_replace_triple
     (job->connection,
      job->cancellable, error,
-     identifier, resource,
+     job->datasource_urn, resource,
      "nie:url", alternate_uri);
 
   if (*error != NULL)
@@ -148,7 +148,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
   gom_tracker_sparql_connection_insert_or_replace_triple
     (job->connection,
      job->cancellable, error,
-     identifier, resource,
+     job->datasource_urn, resource,
      "nie:mimeType", mimetype_override);
 
   if (*error != NULL)
@@ -165,7 +165,8 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
 
       parent_resource_urn = gom_tracker_sparql_connection_ensure_resource
         (job->connection, job->cancellable, error,
-         NULL, NULL, parent_resource_id,
+         NULL,
+         job->datasource_urn, parent_resource_id,
          "nfo:RemoteDataObject", "nfo:DataContainer", NULL);
       g_free (parent_resource_id);
 
@@ -175,7 +176,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
       gom_tracker_sparql_connection_insert_or_replace_triple
         (job->connection,
          job->cancellable, error,
-         identifier, resource,
+         job->datasource_urn, resource,
          "nie:isPartOf", parent_resource_urn);
       g_free (parent_resource_urn);
 
@@ -205,7 +206,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
   gom_tracker_sparql_connection_insert_or_replace_triple
     (job->connection,
      job->cancellable, error,
-     identifier, resource,
+     job->datasource_urn, resource,
      "nie:description", gdata_entry_get_summary (entry));
 
   if (*error != NULL)
@@ -214,7 +215,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
   gom_tracker_sparql_connection_insert_or_replace_triple
     (job->connection,
      job->cancellable, error,
-     identifier, resource,
+     job->datasource_urn, resource,
      "nie:title", gdata_entry_get_title (entry));
 
   if (*error != NULL)
@@ -238,7 +239,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
       gom_tracker_sparql_connection_insert_or_replace_triple
         (job->connection,
          job->cancellable, error,
-         identifier, resource,
+         job->datasource_urn, resource,
          "nco:creator", contact_resource);
 
       if (*error != NULL)
@@ -280,7 +281,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
       gom_tracker_sparql_connection_insert_or_replace_triple
         (job->connection,
          job->cancellable, error,
-         identifier, resource,
+         job->datasource_urn, resource,
          "nco:contributor", contact_resource);
 
       g_free (contact_resource);
@@ -293,7 +294,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
   gom_tracker_sparql_connection_insert_or_replace_triple
     (job->connection,
      job->cancellable, error,
-     identifier, resource,
+     job->datasource_urn, resource,
      "nie:contentCreated", date);
   g_free (date);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]