[tracker] Fixed the .desktop scanner's SPARQL queries
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] Fixed the .desktop scanner's SPARQL queries
- Date: Wed, 15 Jul 2009 14:21:34 +0000 (UTC)
commit d29e9e04aa67f00570e2b68028fbf75e5780cccb
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Jul 15 16:14:19 2009 +0200
Fixed the .desktop scanner's SPARQL queries
src/tracker-miner-fs/modules/applications.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-miner-fs/modules/applications.c b/src/tracker-miner-fs/modules/applications.c
index 8ccda19..316f727 100644
--- a/src/tracker-miner-fs/modules/applications.c
+++ b/src/tracker-miner-fs/modules/applications.c
@@ -114,6 +114,7 @@ insert_data_from_desktop_file (TrackerSparqlBuilder *sparql,
}
if (str) {
+ tracker_sparql_builder_subject_iri (sparql, subject);
tracker_sparql_builder_predicate_iri (sparql, metadata_key);
tracker_sparql_builder_object_string (sparql, str);
g_free (str);
@@ -181,7 +182,6 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
gchar *canonical_uri = tracker_uri_printf_escaped (SOFTWARE_CATEGORY_URN_PREFIX "%s", name);
gchar *icon = g_key_file_get_string (key_file, GROUP_DESKTOP_ENTRY, "Icon", NULL);
- uri = NULL;
sparql = tracker_sparql_builder_new_update ();
tracker_sparql_builder_insert_open (sparql);
@@ -200,15 +200,16 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
g_free (icon);
}
- tracker_sparql_builder_subject_iri (sparql, canonical_uri);
+ uri = canonical_uri;
+
+ tracker_sparql_builder_subject_iri (sparql, uri);
+
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "nfo:SoftwareCategory");
tracker_sparql_builder_predicate (sparql, "nie:title");
tracker_sparql_builder_object_string (sparql, name);
- g_free (canonical_uri);
-
} else if (name && g_ascii_strcasecmp (type, "Application") == 0) {
uri = tracker_module_file_get_uri (file);
@@ -220,6 +221,7 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
tracker_sparql_builder_object (sparql, "nie:DataSource");
tracker_sparql_builder_subject_iri (sparql, uri);
+
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "nfo:SoftwareApplication");
@@ -240,6 +242,7 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
/* TODO This is atm specific for Maemo */
tracker_sparql_builder_subject_iri (sparql, uri);
+
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "nfo:SoftwareApplet");
@@ -304,6 +307,7 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
}
}
+ tracker_sparql_builder_subject_iri (sparql, uri);
tracker_sparql_builder_predicate (sparql, "nie:dataSource");
tracker_sparql_builder_object_iri (sparql, APPLICATION_DATASOURCE_URN);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]