[tracker/tracker-0.6] No need to do any transformations to rdf:type in ttl files.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-0.6] No need to do any transformations to rdf:type in ttl files.
- Date: Thu, 16 Apr 2009 10:25:06 -0400 (EDT)
commit 47412d17cebc78689c98ea1a94d2fe212c39a286
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Apr 16 16:21:33 2009 +0200
No need to do any transformations to rdf:type in ttl files.
Now rdf:type is mapped correctly to tracker's ontology, and "Files" isn't
used invariably anymore.
---
src/libtracker-data/tracker-data-update.c | 16 ++++------------
src/tracker-indexer/tracker-removable-device.c | 8 +++-----
2 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 2eb8005..3f596ed 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -706,22 +706,14 @@ tracker_data_update_replace_service (const gchar *path,
g_return_if_fail (path != NULL);
g_return_if_fail (metadata != NULL);
- /* When merging from the decomposed branch to trunk then pick the version
- * in the decomposed branch for this function. However, carefully
- * compare the features, as this version is more recent and has
- * implemented a few significant items, whereas the version in the
- * decomposed branch was a proof of concept implementation, and might
- * not have these needed features.
- */
-
if (!rdf_type)
return;
- /*
- service = tracker_ontology_get_service_by_name (rdf_type); */
+ service = tracker_ontology_get_service_by_name (rdf_type);
- /* The current ontology doesn't allow sanity like what above would be */
- service = tracker_ontology_get_service_by_name ("Files");
+ if (!service) {
+ return;
+ }
iface = tracker_db_manager_get_db_interface_by_type (tracker_service_get_name (service),
TRACKER_DB_CONTENT_TYPE_METADATA);
diff --git a/src/tracker-indexer/tracker-removable-device.c b/src/tracker-indexer/tracker-removable-device.c
index 5720434..4bd5cc4 100644
--- a/src/tracker-indexer/tracker-removable-device.c
+++ b/src/tracker-indexer/tracker-removable-device.c
@@ -201,11 +201,7 @@ consume_triple_storer (void *user_data,
if (g_strcmp0 (predicate, "rdf:type") == 0) {
g_free (info->rdf_type);
-
- /* TODO: ontology */
- /* Change this when Files and Emails becomes File and Email */
-
- info->rdf_type = g_strdup_printf ("%ss", (gchar *) triple->object);
+ info->rdf_type = g_strdup (triple->object);
} else {
tracker_module_metadata_add_string (info->metadata,
predicate,
@@ -542,6 +538,7 @@ tracker_removable_device_add_removal (TrackerIndexer *indexer,
info->about_uri = about_uri;
set_metadata ("rdf:type", rdf_type, info);
+
set_metadata (NULL, NULL, info);
raptor_free_uri (suri);
@@ -618,6 +615,7 @@ tracker_removable_device_add_move (TrackerIndexer *indexer,
info->about_uri = about_uri;
set_metadata ("rdf:type", rdf_type, info);
+
set_metadata (NULL, to_uri, info);
g_slice_free (AddMetadataInfo, info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]