tracker r2582 - branches/turtle/src/tracker-indexer
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2582 - branches/turtle/src/tracker-indexer
- Date: Wed, 26 Nov 2008 12:52:00 +0000 (UTC)
Author: pvanhoof
Date: Wed Nov 26 12:52:00 2008
New Revision: 2582
URL: http://svn.gnome.org/viewvc/tracker?rev=2582&view=rev
Log:
Cleaning up
Modified:
branches/turtle/src/tracker-indexer/tracker-removable-device.c
Modified: branches/turtle/src/tracker-indexer/tracker-removable-device.c
==============================================================================
--- branches/turtle/src/tracker-indexer/tracker-removable-device.c (original)
+++ branches/turtle/src/tracker-indexer/tracker-removable-device.c Wed Nov 26 12:52:00 2008
@@ -68,9 +68,7 @@
const gchar *ttl_file;
gchar *last_subject;
gchar *base;
- gchar *rdf_type;
raptor_serializer *serializer;
- gchar *uri, *about_uri;
GHashTable *hash;
} TurtleOptimizerInfo;
@@ -128,10 +126,8 @@
g_hash_table_destroy (info->hash);
g_free (info->last_subject);
- g_free (info->rdf_type);
info->last_subject = NULL;
info->hash = NULL;
- info->rdf_type = NULL;
}
}
@@ -231,6 +227,7 @@
{
TurtleOptimizerInfo *info = user_data;
gchar *subject;
+ gchar *predicate;
subject = (gchar *) raptor_uri_as_string ((raptor_uri *) triple->subject);
@@ -245,39 +242,11 @@
(GDestroyNotify) g_free);
}
- if (triple->object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL) {
- gchar *predicate;
-
- predicate = g_strdup ((const gchar *) raptor_uri_as_string ((raptor_uri *) triple->predicate));
-
- if (strcmp (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", triple->object);
- } else
- g_hash_table_replace (info->hash,
- predicate,
- g_strdup (triple->object));
-
- } else if (triple->object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) {
- gchar *key = g_strdup_printf ("file://%s/:", info->base);
-
- if (strcmp (key, triple->object) == 0) {
- gchar *predicate;
-
- predicate = (gchar *) raptor_uri_as_string ((raptor_uri *) triple->predicate);
-
- g_hash_table_replace (info->hash,
- predicate,
- g_strdup (triple->object));
+ predicate = g_strdup ((const gchar *) raptor_uri_as_string ((raptor_uri *) triple->predicate));
- }
-
- g_free (key);
- }
+ g_hash_table_replace (info->hash,
+ predicate,
+ g_strdup (triple->object));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]