[tracker/property-changes] libtracker-data: Added some comments about post-checking



commit 3d55c4d2b0293bc08bdf4825ae468781ff8e4772
Author: Philip Van Hoof <philip codeminded be>
Date:   Fri Apr 2 14:18:15 2010 +0200

    libtracker-data: Added some comments about post-checking

 src/libtracker-data/tracker-data-manager.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 7b4030a..39cf712 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -583,6 +583,10 @@ tracker_data_ontology_post_check (GPtrArray *seen_classes,
 {
 	gint i;
 
+	/* This checks for properties of classes being removed from the ontology.
+	 * For example when going from: prefix:A rdfs:Class ; tracker:notify true .
+	 * to prefix:A rdfs:Class . */
+
 	for (i = 0; i < seen_classes->len; i++) {
 		TrackerClass *class = g_ptr_array_index (seen_classes, i);
 		GError *error = NULL;
@@ -727,6 +731,9 @@ load_ontology_file_from_path (const gchar        *ontology_path,
 		return;
 	}
 
+	/* Post checks are only needed for ontology updates, not the initial
+	 * ontology */
+
 	if (in_update) {
 		seen_classes = g_ptr_array_new ();
 		seen_properties = g_ptr_array_new ();
@@ -874,6 +881,9 @@ load_ontology_from_journal (GHashTable **classes_out,
 			subject = g_hash_table_lookup (id_uri_map, GINT_TO_POINTER (subject_id));
 			predicate = g_hash_table_lookup (id_uri_map, GINT_TO_POINTER (predicate_id));
 
+			/* Post checks are only needed for ontology updates, not the initial
+			 * ontology */
+
 			tracker_data_ontology_load_statement ("journal", subject_id, subject, predicate, 
 			                                      object, NULL, FALSE, classes, properties,
 			                                      NULL, NULL);



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