[tracker/domain-specific-indexes-review] libtracker-data: Test for domainIndex already being a first-class property
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/domain-specific-indexes-review] libtracker-data: Test for domainIndex already being a first-class property
- Date: Wed, 14 Jul 2010 08:45:30 +0000 (UTC)
commit 7a33d3864c57bd032cd0109e3cc75ffc7d36d803
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Jul 14 10:17:42 2010 +0200
libtracker-data: Test for domainIndex already being a first-class property
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 8006536..283b941 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -536,6 +536,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
TrackerProperty **properties;
gboolean ignore = FALSE;
gboolean had = FALSE;
+ guint n_props, i;
class = tracker_ontologies_get_class_by_uri (subject);
@@ -573,6 +574,15 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
return;
}
+ properties = tracker_ontologies_get_properties (&n_props);
+ for (i = 0; i < n_props; i++) {
+ if (tracker_property_get_domain (properties[i]) == class &&
+ properties[i] == property) {
+ g_critical ("%s: Property %s is already a first-class property of %s while trying to add it as tracker:domainIndex",
+ ontology_path, object, subject);
+ }
+ }
+
properties = tracker_class_get_domain_indexes (class);
while (*properties) {
if (property == *properties) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]