[tracker/wip/carlosg/sparql1.1: 68/201] libtracker-data: Drop graph argument from ontology triple statements



commit 57af1e538a9283e3be72c79ed98a9e6c32ecd116
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Mar 10 12:57:26 2019 +0100

    libtracker-data: Drop graph argument from ontology triple statements
    
    On one hand, we stop lying to ourselves because the turtle file format
    does not specify graphs. On the other hand, we do want the ontology to
    be loaded in the default graph, so use NULL there.

 src/libtracker-data/tracker-data-manager.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index f9aed7b95..76c898dde 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -1922,7 +1922,6 @@ get_ontology_from_file (TrackerDataManager *manager,
 
 static void
 tracker_data_ontology_process_statement (TrackerDataManager *manager,
-                                         const gchar        *graph,
                                          const gchar        *subject,
                                          const gchar        *predicate,
                                          const gchar        *object,
@@ -2006,7 +2005,7 @@ tracker_data_ontology_process_statement (TrackerDataManager *manager,
        }
 
        if (is_uri) {
-               tracker_data_insert_statement_with_uri (manager->data_update, graph, subject,
+               tracker_data_insert_statement_with_uri (manager->data_update, NULL, subject,
                                                        predicate, object,
                                                        &error);
 
@@ -2017,7 +2016,7 @@ tracker_data_ontology_process_statement (TrackerDataManager *manager,
                }
 
        } else {
-               tracker_data_insert_statement_with_string (manager->data_update, graph, subject,
+               tracker_data_insert_statement_with_string (manager->data_update, NULL, subject,
                                                           predicate, object,
                                                           &error);
 
@@ -2046,17 +2045,14 @@ import_ontology_file (TrackerDataManager *manager,
        }
 
        while (tracker_turtle_reader_next (reader, &error)) {
-
-               const gchar *graph = tracker_turtle_reader_get_graph (reader);
                const gchar *subject = tracker_turtle_reader_get_subject (reader);
                const gchar *predicate = tracker_turtle_reader_get_predicate (reader);
                const gchar *object  = tracker_turtle_reader_get_object (reader);
 
                tracker_data_ontology_process_statement (manager,
-                                                        graph, subject, predicate, object,
+                                                        subject, predicate, object,
                                                         tracker_turtle_reader_get_object_is_uri (reader),
                                                         in_update);
-
        }
 
        g_object_unref (reader);


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