[tracker/libtracker-miner: 261/263] Backport 86d953f8b86497974e1fba6c0fbac0e597981ffd to libtracker-miner.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-miner: 261/263] Backport 86d953f8b86497974e1fba6c0fbac0e597981ffd to libtracker-miner.
- Date: Fri, 4 Sep 2009 09:45:16 +0000 (UTC)
commit 878e9caff026bd7a1771890482f62ba6c85ab16f
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Sep 3 17:35:01 2009 +0200
Backport 86d953f8b86497974e1fba6c0fbac0e597981ffd to libtracker-miner.
src/tracker-miner-fs/tracker-miner-files.c | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/src/tracker-miner-fs/tracker-miner-files.c b/src/tracker-miner-fs/tracker-miner-files.c
index 6794db5..b7a9e2e 100644
--- a/src/tracker-miner-fs/tracker-miner-files.c
+++ b/src/tracker-miner-fs/tracker-miner-files.c
@@ -923,14 +923,6 @@ process_file_cb (GObject *object,
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "nfo:FileDataObject");
- if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY) {
- tracker_sparql_builder_object (sparql, "nfo:Folder");
- }
-
- tracker_sparql_builder_subject_iri (sparql, uri); /* Change to URN */
- tracker_sparql_builder_predicate (sparql, "nie:isStoredAs");
- tracker_sparql_builder_object_iri (sparql, uri);
-
parent = g_file_get_parent (file);
if (parent) {
parent_uri = g_file_get_uri (parent);
@@ -943,9 +935,6 @@ process_file_cb (GObject *object,
tracker_sparql_builder_predicate (sparql, "nfo:fileName");
tracker_sparql_builder_object_string (sparql, g_file_info_get_display_name (file_info));
- tracker_sparql_builder_predicate (sparql, "nie:mimeType");
- tracker_sparql_builder_object_string (sparql, mime_type);
-
tracker_sparql_builder_predicate (sparql, "nfo:fileSize");
tracker_sparql_builder_object_int64 (sparql, g_file_info_get_size (file_info));
@@ -957,6 +946,20 @@ process_file_cb (GObject *object,
tracker_sparql_builder_predicate (sparql, "nfo:fileLastAccessed");
tracker_sparql_builder_object_date (sparql, (time_t *) &time_);
+ tracker_sparql_builder_subject_iri (sparql, uri); /* Change to URN */
+ tracker_sparql_builder_predicate (sparql, "a");
+ tracker_sparql_builder_object (sparql, "nie:InformationElement");
+
+ if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY) {
+ tracker_sparql_builder_object (sparql, "nfo:Folder");
+ }
+
+ tracker_sparql_builder_predicate (sparql, "nie:isStoredAs");
+ tracker_sparql_builder_object_iri (sparql, uri);
+
+ tracker_sparql_builder_predicate (sparql, "nie:mimeType");
+ tracker_sparql_builder_object_string (sparql, mime_type);
+
miner_files_add_to_datasource (data->miner, file, sparql);
/* Next step, getting embedded metadata */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]